Source code pulled from OpenBSD for OpenNTPD. The place to contribute to this code is via the OpenBSD CVS tree.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

309 lines
12 KiB

25 years ago
27 years ago
27 years ago
27 years ago
28 years ago
26 years ago
  1. # $OpenBSD: Makefile,v 1.111 2000/04/29 22:04:55 deraadt Exp $
  2. TZDIR= /usr/share/zoneinfo
  3. LOCALTIME= US/Pacific
  4. NOOBJ= oobj
  5. .if exists(etc.${MACHINE}/Makefile.inc)
  6. .include "etc.${MACHINE}/Makefile.inc"
  7. .endif
  8. # -rw-r--r--
  9. BINOWN= root
  10. BINGRP= wheel
  11. BIN1= bootptab changelist ccd.conf csh.cshrc csh.login csh.logout \
  12. daily dhcpd.conf dhcpd.interfaces dm.conf exports ftpusers \
  13. ftpchroot gettytab group hosts hosts.lpd ifaliases inetd.conf \
  14. ipf.rules ksh.kshrc locate.rc man.conf monthly motd mrouted.conf \
  15. myname ipnat.rules netstart networks newsyslog.conf passwd.conf \
  16. phones printcap protocols rbootd.conf rc rc.conf rc.local \
  17. rc.securelevel rc.shutdown remote rpc rtadvd.conf security services \
  18. shells syslog.conf weekly etc.${MACHINE}/disktab dhclient.conf \
  19. mailer.conf
  20. # -rw-rw-r--
  21. BIN2= motd
  22. NAMEDB= localhost.rev root.cache
  23. PCS= pcs750.bin
  24. WCS1= wcs fppwcs poc poc1 poc2 fppoc
  25. WCS2= fpevent fppwcs fppwcs_dual hdcwcs load_diags start_fpp wcs wcs_dual
  26. # Use NOGZIP on architectures where the gzip'ing would take too much time
  27. # (pmax or slower :-)). This way you get only tar'ed snap files and you can
  28. # gzip them on a faster machine
  29. .ifndef NOGZIP
  30. GZIP?= gzip
  31. GZIPFLAGS?= -9
  32. GZIPEXT?= .gz
  33. .else
  34. GZIP= cat
  35. GZIPFLAGS=
  36. GZIPEXT=
  37. .endif
  38. all clean cleandir depend etc install lint:
  39. .ifndef DESTDIR
  40. distribution-etc-root-var distribution distrib-dirs release snapshot:
  41. @echo setenv DESTDIR before doing that!
  42. @false
  43. .else
  44. distribution-etc-root-var: distrib-dirs
  45. ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${BIN1} ${DESTDIR}/etc
  46. cat etc.${MACHINE}/ttys ttys.pty > ${DESTDIR}/etc/ttys && \
  47. chown ${BINOWN} ${DESTDIR}/etc/ttys && \
  48. chgrp ${BINGRP} ${DESTDIR}/etc/ttys && \
  49. chmod 644 ${DESTDIR}/etc/ttys
  50. cat sysctl.conf etc.${MACHINE}/sysctl.conf > ${DESTDIR}/etc/sysctl.conf && \
  51. chown ${BINOWN} ${DESTDIR}/etc/sysctl.conf && \
  52. chgrp ${BINGRP} ${DESTDIR}/etc/sysctl.conf && \
  53. chmod 644 ${DESTDIR}/etc/ttys
  54. cat fbtab.head etc.${MACHINE}/fbtab fbtab.tail > ${DESTDIR}/etc/fbtab && \
  55. chown ${BINOWN} ${DESTDIR}/etc/fbtab && \
  56. chgrp ${BINGRP} ${DESTDIR}/etc/fbtab && \
  57. chmod 644 ${DESTDIR}/etc/fbtab
  58. ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 ${BIN2} ${DESTDIR}/etc
  59. ${INSTALL} -c -o root -g wheel -m 600 hosts.equiv ${DESTDIR}/etc
  60. ${INSTALL} -c -o root -g wheel -m 600 crontab ${DESTDIR}/var/cron/tabs/root
  61. ${INSTALL} -c -o root -g wheel -m 600 master.passwd ${DESTDIR}/etc
  62. pwd_mkdb -p -d ${DESTDIR}/etc /etc/master.passwd
  63. ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 555 \
  64. MAKEDEV.local etc.${MACHINE}/MAKEDEV ${DESTDIR}/dev
  65. (cd root; \
  66. ${INSTALL} -c -o root -g wheel -m 644 dot.cshrc \
  67. ${DESTDIR}/root/.cshrc; \
  68. ${INSTALL} -c -o root -g wheel -m 600 dot.klogin \
  69. ${DESTDIR}/root/.klogin; \
  70. ${INSTALL} -c -o root -g wheel -m 644 dot.login \
  71. ${DESTDIR}/root/.login; \
  72. ${INSTALL} -c -o root -g wheel -m 644 dot.profile \
  73. ${DESTDIR}/root/.profile; \
  74. rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
  75. ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
  76. ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile)
  77. (cd skel; \
  78. ${INSTALL} -c -o root -g wheel -m 644 dot.cshrc \
  79. ${DESTDIR}/etc/skel/.cshrc; \
  80. ${INSTALL} -c -o root -g wheel -m 644 dot.login \
  81. ${DESTDIR}/etc/skel/.login; \
  82. ${INSTALL} -c -o root -g wheel -m 644 dot.mailrc \
  83. ${DESTDIR}/etc/skel/.mailrc; \
  84. ${INSTALL} -c -o root -g wheel -m 644 dot.profile \
  85. ${DESTDIR}/etc/skel/.profile; \
  86. ${INSTALL} -c -o root -g wheel -m 600 dot.rhosts \
  87. ${DESTDIR}/etc/skel/.rhosts)
  88. (cd kerberosIV; \
  89. ${INSTALL} -c -o root -g wheel -m 644 README \
  90. ${DESTDIR}/etc/kerberosIV; \
  91. ${INSTALL} -c -o root -g wheel -m 644 krb.conf \
  92. ${DESTDIR}/etc/kerberosIV; \
  93. ${INSTALL} -c -o root -g wheel -m 644 krb.realms \
  94. ${DESTDIR}/etc/kerberosIV)
  95. (cd amd; \
  96. ${INSTALL} -c -o root -g wheel -m 644 master.sample \
  97. ${DESTDIR}/etc/amd)
  98. (cd mtree; \
  99. ${INSTALL} -c -o root -g wheel -m 600 special \
  100. ${DESTDIR}/etc/mtree; \
  101. ${INSTALL} -c -o root -g wheel -m 444 4.4BSD.dist \
  102. ${DESTDIR}/etc/mtree; \
  103. ${INSTALL} -c -o root -g wheel -m 444 BSD.local.dist \
  104. ${DESTDIR}/etc/mtree; \
  105. ${INSTALL} -c -o root -g wheel -m 444 BSD.x11.dist \
  106. ${DESTDIR}/etc/mtree)
  107. (cd photuris; \
  108. ${INSTALL} -c -o root -g wheel -m 600 secrets.conf \
  109. ${DESTDIR}/etc/photuris; \
  110. ${INSTALL} -c -o root -g wheel -m 600 attributes.conf \
  111. ${DESTDIR}/etc/photuris; \
  112. ${INSTALL} -c -o root -g wheel -m 600 photuris.conf \
  113. ${DESTDIR}/etc/photuris; \
  114. ${INSTALL} -c -o root -g wheel -m 600 photuris.startup \
  115. ${DESTDIR}/etc/photuris)
  116. (cd ppp; \
  117. ${INSTALL} -c -o root -g wheel -m 600 chap-secrets \
  118. ${DESTDIR}/etc/ppp; \
  119. ${INSTALL} -c -o root -g wheel -m 600 options \
  120. ${DESTDIR}/etc/ppp; \
  121. ${INSTALL} -c -o root -g wheel -m 600 options.leaf \
  122. ${DESTDIR}/etc/ppp; \
  123. ${INSTALL} -c -o root -g wheel -m 600 options.sample \
  124. ${DESTDIR}/etc/ppp; \
  125. ${INSTALL} -c -o root -g wheel -m 600 chatscript.sample \
  126. ${DESTDIR}/etc/ppp; \
  127. ${INSTALL} -c -o root -g wheel -m 600 pap-secrets \
  128. ${DESTDIR}/etc/ppp; \
  129. ${INSTALL} -c -o root -g wheel -m 644 ppp.conf.sample \
  130. ${DESTDIR}/etc/ppp; \
  131. ${INSTALL} -c -o root -g wheel -m 644 ppp.linkup.sample \
  132. ${DESTDIR}/etc/ppp; \
  133. ${INSTALL} -c -o root -g wheel -m 644 ppp.linkdown.sample \
  134. ${DESTDIR}/etc/ppp; \
  135. ${INSTALL} -c -o root -g wheel -m 644 ppp.secret.sample \
  136. ${DESTDIR}/etc/ppp)
  137. (cd afs; \
  138. ${INSTALL} -c -o root -g wheel -m 644 afsd.conf \
  139. ${DESTDIR}/etc/afs; \
  140. ${INSTALL} -c -o root -g wheel -m 644 ThisCell \
  141. ${DESTDIR}/etc/afs; \
  142. ${INSTALL} -c -o root -g wheel -m 644 CellServDB \
  143. ${DESTDIR}/etc/afs; \
  144. ${INSTALL} -c -o root -g wheel -m 644 SuidCells \
  145. ${DESTDIR}/etc/afs; \
  146. ${INSTALL} -c -o root -g wheel -m 644 README \
  147. ${DESTDIR}/etc/afs)
  148. (cd namedb; \
  149. ${INSTALL} -c -o root -g ${BINGRP} -m 644 named.boot \
  150. ${DESTDIR}/var/named; \
  151. ${INSTALL} -c -o named -g ${BINGRP} -m 644 ${NAMEDB} \
  152. ${DESTDIR}/var/named/namedb)
  153. /bin/rm -f ${DESTDIR}/etc/localtime
  154. ln -s ${TZDIR}/${LOCALTIME} ${DESTDIR}/etc/localtime
  155. /bin/rm -f ${DESTDIR}/etc/rmt
  156. ln -s /usr/sbin/rmt ${DESTDIR}/etc/rmt
  157. ${INSTALL} -c -o root -g wheel -m 644 minfree \
  158. ${DESTDIR}/var/crash
  159. ${INSTALL} -c -o ${BINOWN} -g operator -m 664 /dev/null \
  160. ${DESTDIR}/etc/dumpdates
  161. ${INSTALL} -c -o ${BINOWN} -g wheel -m 600 /dev/null \
  162. ${DESTDIR}/etc/skeykeys
  163. ${INSTALL} -c -o root -g wheel -m 600 /dev/null \
  164. ${DESTDIR}/var/at/at.deny
  165. ${INSTALL} -c -o root -g wheel -m 600 /dev/null \
  166. ${DESTDIR}/var/cron/log
  167. ${INSTALL} -c -o root -g wheel -m 444 /dev/null \
  168. ${DESTDIR}/var/db/locate.database
  169. ${INSTALL} -c -o ${BINOWN} -g wheel -m 640 /dev/null \
  170. ${DESTDIR}/var/log/authlog
  171. ${INSTALL} -c -o ${BINOWN} -g wheel -m 640 /dev/null \
  172. ${DESTDIR}/var/log/daemon
  173. ${INSTALL} -c -o ${BINOWN} -g wheel -m 640 /dev/null \
  174. ${DESTDIR}/var/log/ftpd
  175. ${INSTALL} -c -o ${BINOWN} -g wheel -m 640 /dev/null \
  176. ${DESTDIR}/var/log/ipflog
  177. ${INSTALL} -c -o ${BINOWN} -g wheel -m 644 /dev/null \
  178. ${DESTDIR}/var/log/lastlog
  179. ${INSTALL} -c -o ${BINOWN} -g wheel -m 640 /dev/null \
  180. ${DESTDIR}/var/log/lpd-errs
  181. ${INSTALL} -c -o ${BINOWN} -g wheel -m 600 /dev/null \
  182. ${DESTDIR}/var/log/maillog
  183. ${INSTALL} -c -o ${BINOWN} -g wheel -m 640 /dev/null \
  184. ${DESTDIR}/var/log/messages
  185. ${INSTALL} -c -o ${BINOWN} -g wheel -m 600 /dev/null \
  186. ${DESTDIR}/var/log/secure
  187. ${INSTALL} -c -o ${BINOWN} -g wheel -m 644 /dev/null \
  188. ${DESTDIR}/var/log/wtmp
  189. ${INSTALL} -c -o ${BINOWN} -g wheel -m 640 /dev/null \
  190. ${DESTDIR}/var/log/xferlog
  191. ${INSTALL} -c -o daemon -g staff -m 664 /dev/null \
  192. ${DESTDIR}/var/msgs/bounds
  193. ${INSTALL} -c -o ${BINOWN} -g utmp -m 664 /dev/null \
  194. ${DESTDIR}/var/run/utmp
  195. .if (${MACHINE_ARCH} == "mips")
  196. (cd etc.${MACHINE}; ${INSTALL} -c -o ${BINOWN} -g wheel -m 444 \
  197. ld.so.conf ${DESTDIR}/etc)
  198. .endif
  199. (cd ${DESTDIR}/dev; ./MAKEDEV all)
  200. .if ${MACHINE} == "vax"
  201. (cd etc.vax; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${PCS} \
  202. ${DESTDIR}/)
  203. .endif
  204. (cd ../gnu/usr.sbin/sendmail/cf/cf; ${MAKE} distribution)
  205. (cd ../usr.sbin/ypserv/ypinit; ${MAKE} distribution)
  206. (cd ../usr.bin/ssh; ${MAKE} distribution)
  207. (cd ../usr.sbin/httpd; ${MAKE} -f Makefile.bsd-wrapper distribution)
  208. (cd ../lib/libssl; ${MAKE} -f Makefile.bsd-wrapper distribution)
  209. (cd ../gnu/usr.bin/lynx; ${MAKE} -f Makefile.bsd-wrapper distribution)
  210. (cd ../usr.bin/mail; ${MAKE} distribution)
  211. ${INSTALL} -c -o root -g ${BINGRP} -m 644 aliases \
  212. ${DESTDIR}/etc/mail/aliases
  213. /usr/libexec/sendmail/sendmail -C${DESTDIR}/etc/mail/sendmail.cf \
  214. -bi -O AliasFile=${DESTDIR}/etc/mail/aliases
  215. ${INSTALL} -c -o root -g wheel -m 600 root/root.mail \
  216. ${DESTDIR}/var/mail/root
  217. distribution: distribution-etc-root-var
  218. (cd ..; ${MAKE} install)
  219. distrib-dirs:
  220. ${INSTALL} -d -o root -g wheel -m 755 ${DESTDIR}
  221. -mtree -qdef mtree/4.4BSD.dist -p ${DESTDIR}/ -u
  222. if [ ! -d ${DESTDIR}/usr/src ]; then \
  223. ${INSTALL} -d -o root -g wsrc -m 775 ${DESTDIR}/usr/src; \
  224. fi
  225. cd ${DESTDIR}/; rm -f sys; ln -s usr/src/sys sys
  226. .ifndef RELEASEDIR
  227. release:
  228. @echo setenv RELEASEDIR before building a release.
  229. @false
  230. .else
  231. release: distribution snap_pre snap_md
  232. cd ${.CURDIR}/../distrib/notes; ${MAKE}; ${MAKE} install
  233. cd ${.CURDIR}/../distrib/sets; csh maketars ${OSrev}
  234. -cp ${DESTDIR}/snapshot/bsd* ${RELEASEDIR}
  235. -cp ${DESTDIR}/snapshot/*boot* ${RELEASEDIR}
  236. -cp ${DESTDIR}/snapshot/*BOOT* ${RELEASEDIR}
  237. -cp ${DESTDIR}/snapshot/INSTALL.* ${RELEASEDIR}
  238. -cp ${DESTDIR}/snapshot/*.fs ${DESTDIR}/snapshot/*.fs.gz ${RELEASEDIR}
  239. -cd ${RELEASEDIR}; \
  240. md5 bsd!(*.gz) *boot* *BOOT* INSTALL.* *.fs *.gz *.tgz > MD5
  241. -cd ${RELEASEDIR}; \
  242. cksum bsd!(*.gz) *boot* *BOOT* INSTALL.* *.fs *.gz *.tgz > CKSUM
  243. .if defined(MACHINE_HAS_TOOLS)
  244. mkdir -p ${RELEASEDIR}/tools
  245. cp ${DESTDIR}/snapshot/tools/* ${RELEASEDIR}/tools
  246. cd ${RELEASEDIR} && md5 tools/* >>MD5
  247. cd ${RELEASEDIR} && cksum tools/* >>CKSUM
  248. .endif
  249. -cd ${RELEASEDIR} && sort -o MD5 MD5
  250. -cd ${RELEASEDIR} && sort -o CKSUM -k 3 CKSUM
  251. .endif
  252. snapshot: distribution snap_pre snap_tar snap_md
  253. cd ${DESTDIR}/snapshot && cksum * > CKSUMS
  254. cd ${DESTDIR}/snapshot && md5 * > MD5
  255. snap_pre:
  256. /bin/rm -rf ${DESTDIR}/snapshot
  257. ${INSTALL} -d -o root -g wheel -m 755 ${DESTDIR}/snapshot
  258. snap_tar:
  259. cd ${DESTDIR} && tar cf - bin \
  260. | ${GZIP} ${GZIPFLAGS} > snapshot/bin.tar${GZIPEXT}
  261. cd ${DESTDIR} && tar cf - dev \
  262. | ${GZIP} ${GZIPFLAGS} > snapshot/dev.tar${GZIPEXT}
  263. cd ${DESTDIR} && tar cf - .profile .cshrc altroot etc home mnt \
  264. root stand sys tmp | ${GZIP} ${GZIPFLAGS} \
  265. > snapshot/etc.tar${GZIPEXT}
  266. cd ${DESTDIR} && tar cf - sbin \
  267. | ${GZIP} ${GZIPFLAGS} > snapshot/sbin.tar${GZIPEXT}
  268. cd ${DESTDIR} && tar cf - usr/bin \
  269. | ${GZIP} ${GZIPFLAGS} > snapshot/usr.bin.tar${GZIPEXT}
  270. cd ${DESTDIR} && tar cf - usr/games \
  271. | ${GZIP} ${GZIPFLAGS} > snapshot/usr.games.tar${GZIPEXT}
  272. cd ${DESTDIR} && tar cf - usr/include \
  273. | ${GZIP} ${GZIPFLAGS} > snapshot/usr.include.tar${GZIPEXT}
  274. cd ${DESTDIR} && tar cf - usr/lib \
  275. | ${GZIP} ${GZIPFLAGS} > snapshot/usr.lib.tar${GZIPEXT}
  276. cd ${DESTDIR} && tar cf - usr/libexec \
  277. | ${GZIP} ${GZIPFLAGS} > snapshot/usr.libexec.tar${GZIPEXT}
  278. cd ${DESTDIR} && tar cf - usr/mdec usr/libdata usr/lkm usr/local \
  279. usr/src usr/obj | ${GZIP} ${GZIPFLAGS} \
  280. > snapshot/usr.misc.tar${GZIPEXT}
  281. cd ${DESTDIR} && tar cf - usr/sbin \
  282. | ${GZIP} ${GZIPFLAGS} > snapshot/usr.sbin.tar${GZIPEXT}
  283. cd ${DESTDIR} && tar cf - usr/share \
  284. | ${GZIP} ${GZIPFLAGS} > snapshot/usr.share.tar${GZIPEXT}
  285. cd ${DESTDIR} && tar cf - var \
  286. | ${GZIP} ${GZIPFLAGS} > snapshot/var.tar${GZIPEXT}
  287. cd ../distrib/notes; ${MAKE}; ${MAKE} install
  288. snap_md:
  289. # nothing here -- look in the machine-dependent Makefile.inc
  290. .endif # DESTDIR check
  291. .include <bsd.prog.mk>