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.

317 lines
12 KiB

16 years ago
27 years ago
22 years ago
  1. # $OpenBSD: Makefile,v 1.285 2010/01/23 19:27:59 matthieu Exp $
  2. TZDIR= /usr/share/zoneinfo
  3. LOCALTIME= Canada/Mountain
  4. NOOBJ=
  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= changelist ccd.conf csh.cshrc csh.login csh.logout daily dhcpd.conf \
  12. exports ftpusers ftpchroot gettytab group hosts hosts.lpd inetd.conf \
  13. ksh.kshrc locate.rc man.conf monthly motd mrouted.conf myname \
  14. netstart networks newsyslog.conf phones printcap protocols \
  15. rbootd.conf rc rc.conf rc.local rc.securelevel rc.shutdown \
  16. remote rpc security services shells syslog.conf weekly \
  17. etc.${MACHINE}/disktab dhclient.conf mailer.conf ntpd.conf \
  18. moduli pf.os sensorsd.conf ifstated.conf
  19. .if ${MACHINE} != "aviion" && ${MACHINE} != "mvme68k" && \
  20. ${MACHINE} != "mvme88k"
  21. BIN1+= wsconsctl.conf
  22. .endif
  23. # -rw-rw-r--
  24. BIN2= motd
  25. MISETS= base${OSrev}.tgz comp${OSrev}.tgz misc${OSrev}.tgz \
  26. man${OSrev}.tgz game${OSrev}.tgz etc${OSrev}.tgz
  27. PCS= pcs750.bin
  28. # Use NOGZIP on architectures where the gzip'ing would take too much time
  29. # (pmax or slower :-)). This way you get only tar'ed snap files and you can
  30. # gzip them on a faster machine
  31. .ifndef NOGZIP
  32. GZIPCMD?= gzip
  33. GZIPFLAGS?= -9
  34. GZIPEXT?= .gz
  35. .else
  36. GZIPCMD= cat
  37. GZIPFLAGS=
  38. GZIPEXT=
  39. .endif
  40. all clean cleandir depend etc install lint:
  41. .ifndef DESTDIR
  42. distribution-etc-root-var distribution distrib-dirs release:
  43. @echo setenv DESTDIR before doing that!
  44. @false
  45. .else
  46. distribution-etc-root-var: distrib-dirs
  47. ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${BIN1} ${DESTDIR}/etc
  48. ksh ttys.pty | cat etc.${MACHINE}/ttys - > ${DESTDIR}/etc/ttys && \
  49. chown ${BINOWN} ${DESTDIR}/etc/ttys && \
  50. chgrp ${BINGRP} ${DESTDIR}/etc/ttys && \
  51. chmod 644 ${DESTDIR}/etc/ttys
  52. cat sysctl.conf etc.${MACHINE}/sysctl.conf > ${DESTDIR}/etc/sysctl.conf && \
  53. chown ${BINOWN} ${DESTDIR}/etc/sysctl.conf && \
  54. chgrp ${BINGRP} ${DESTDIR}/etc/sysctl.conf && \
  55. chmod 644 ${DESTDIR}/etc/sysctl.conf
  56. cat fbtab.head etc.${MACHINE}/fbtab fbtab.tail > ${DESTDIR}/etc/fbtab && \
  57. chown ${BINOWN} ${DESTDIR}/etc/fbtab && \
  58. chgrp ${BINGRP} ${DESTDIR}/etc/fbtab && \
  59. chmod 644 ${DESTDIR}/etc/fbtab
  60. awk -f ${.CURDIR}/mklogin.conf `test -f etc.${MACHINE}/login.conf.overrides && echo etc.${MACHINE}/login.conf.overrides` < ${.CURDIR}/login.conf.in > \
  61. ${DESTDIR}/etc/login.conf && \
  62. chown ${BINOWN}:${BINGRP} ${DESTDIR}/etc/login.conf && \
  63. chmod 644 ${DESTDIR}/etc/login.conf
  64. ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 ${BIN2} ${DESTDIR}/etc
  65. ${INSTALL} -c -o root -g wheel -m 600 hosts.equiv ${DESTDIR}/etc
  66. ${INSTALL} -c -o root -g crontab -m 600 crontab ${DESTDIR}/var/cron/tabs/root
  67. ${INSTALL} -c -o root -g wheel -m 600 master.passwd ${DESTDIR}/etc
  68. pwd_mkdb -p -d ${DESTDIR}/etc /etc/master.passwd
  69. ${INSTALL} -c -o root -g wheel -m 600 bgpd.conf ${DESTDIR}/etc
  70. ${INSTALL} -c -o root -g wheel -m 600 ospfd.conf ${DESTDIR}/etc
  71. ${INSTALL} -c -o root -g wheel -m 600 ospf6d.conf ${DESTDIR}/etc
  72. ${INSTALL} -c -o root -g wheel -m 600 ripd.conf ${DESTDIR}/etc
  73. ${INSTALL} -c -o root -g wheel -m 600 dvmrpd.conf ${DESTDIR}/etc
  74. ${INSTALL} -c -o root -g wheel -m 600 pf.conf ${DESTDIR}/etc
  75. ${INSTALL} -c -o root -g operator -m 644 chio.conf ${DESTDIR}/etc
  76. ${INSTALL} -c -o root -g wheel -m 600 hostapd.conf ${DESTDIR}/etc
  77. ${INSTALL} -c -o root -g wheel -m 600 relayd.conf ${DESTDIR}/etc
  78. ${INSTALL} -c -o root -g wheel -m 600 ipsec.conf ${DESTDIR}/etc
  79. ${INSTALL} -c -o root -g wheel -m 600 sasyncd.conf ${DESTDIR}/etc
  80. ${INSTALL} -c -o root -g wheel -m 600 snmpd.conf ${DESTDIR}/etc
  81. ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 555 \
  82. etc.${MACHINE}/MAKEDEV ${DESTDIR}/dev
  83. cd root; \
  84. ${INSTALL} -c -o root -g wheel -m 644 dot.cshrc \
  85. ${DESTDIR}/root/.cshrc; \
  86. ${INSTALL} -c -o root -g wheel -m 600 dot.klogin \
  87. ${DESTDIR}/root/.klogin; \
  88. ${INSTALL} -c -o root -g wheel -m 644 dot.login \
  89. ${DESTDIR}/root/.login; \
  90. ${INSTALL} -c -o root -g wheel -m 644 dot.profile \
  91. ${DESTDIR}/root/.profile; \
  92. ${INSTALL} -c -o root -g wheel -m 644 dot.Xdefaults \
  93. ${DESTDIR}/root/.Xdefaults; \
  94. rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
  95. ${INSTALL} -c -o root -g wheel -m 644 dot.cshrc \
  96. ${DESTDIR}/.cshrc; \
  97. ${INSTALL} -c -o root -g wheel -m 644 dot.profile \
  98. ${DESTDIR}/.profile
  99. cd skel; \
  100. ${INSTALL} -c -o root -g wheel -m 644 dot.cshrc \
  101. ${DESTDIR}/etc/skel/.cshrc; \
  102. ${INSTALL} -c -o root -g wheel -m 644 dot.login \
  103. ${DESTDIR}/etc/skel/.login; \
  104. ${INSTALL} -c -o root -g wheel -m 644 dot.mailrc \
  105. ${DESTDIR}/etc/skel/.mailrc; \
  106. ${INSTALL} -c -o root -g wheel -m 644 dot.profile \
  107. ${DESTDIR}/etc/skel/.profile; \
  108. ${INSTALL} -c -o root -g wheel -m 644 dot.Xdefaults \
  109. ${DESTDIR}/etc/skel/.Xdefaults; \
  110. ${INSTALL} -c -o root -g wheel -m 600 /dev/null \
  111. ${DESTDIR}/etc/skel/.ssh/authorized_keys
  112. cd kerberosV; \
  113. ${INSTALL} -c -o root -g wheel -m 644 README \
  114. ${DESTDIR}/etc/kerberosV; \
  115. ${INSTALL} -c -o root -g wheel -m 644 krb5.conf.example \
  116. ${DESTDIR}/etc/kerberosV
  117. cd amd; \
  118. ${INSTALL} -c -o root -g wheel -m 644 master.sample \
  119. ${DESTDIR}/etc/amd
  120. cd mtree; \
  121. ${INSTALL} -c -o root -g wheel -m 600 special \
  122. ${DESTDIR}/etc/mtree; \
  123. ${INSTALL} -c -o root -g wheel -m 444 4.4BSD.dist \
  124. ${DESTDIR}/etc/mtree; \
  125. ${INSTALL} -c -o root -g wheel -m 444 BSD.local.dist \
  126. ${DESTDIR}/etc/mtree; \
  127. ${INSTALL} -c -o root -g wheel -m 444 BSD.x11.dist \
  128. ${DESTDIR}/etc/mtree
  129. cd ppp; \
  130. ${INSTALL} -c -o root -g wheel -m 600 chap-secrets \
  131. ${DESTDIR}/etc/ppp; \
  132. ${INSTALL} -c -o root -g wheel -m 600 options \
  133. ${DESTDIR}/etc/ppp; \
  134. ${INSTALL} -c -o root -g wheel -m 600 options.leaf \
  135. ${DESTDIR}/etc/ppp; \
  136. ${INSTALL} -c -o root -g wheel -m 600 options.sample \
  137. ${DESTDIR}/etc/ppp; \
  138. ${INSTALL} -c -o root -g wheel -m 600 chatscript.sample \
  139. ${DESTDIR}/etc/ppp; \
  140. ${INSTALL} -c -o root -g wheel -m 600 pap-secrets \
  141. ${DESTDIR}/etc/ppp; \
  142. ${INSTALL} -c -o root -g wheel -m 600 ppp.conf.sample \
  143. ${DESTDIR}/etc/ppp; \
  144. ${INSTALL} -c -o root -g wheel -m 644 ppp.linkup.sample \
  145. ${DESTDIR}/etc/ppp; \
  146. ${INSTALL} -c -o root -g wheel -m 644 ppp.linkdown.sample \
  147. ${DESTDIR}/etc/ppp; \
  148. ${INSTALL} -c -o root -g wheel -m 644 ppp.secret.sample \
  149. ${DESTDIR}/etc/ppp
  150. cd afs; \
  151. ${INSTALL} -c -o root -g wheel -m 644 afsd.conf \
  152. ${DESTDIR}/etc/afs; \
  153. ${INSTALL} -c -o root -g wheel -m 644 ThisCell \
  154. ${DESTDIR}/etc/afs; \
  155. ${INSTALL} -c -o root -g wheel -m 644 CellServDB \
  156. ${DESTDIR}/etc/afs; \
  157. ${INSTALL} -c -o root -g wheel -m 644 SuidCells \
  158. ${DESTDIR}/etc/afs; \
  159. ${INSTALL} -c -o root -g wheel -m 644 README \
  160. ${DESTDIR}/etc/afs
  161. cd systrace; \
  162. ${INSTALL} -c -o root -g wheel -m 600 usr_sbin_lpd \
  163. ${DESTDIR}/etc/systrace; \
  164. ${INSTALL} -c -o root -g wheel -m 600 usr_sbin_named \
  165. ${DESTDIR}/etc/systrace
  166. cd bind; \
  167. ${INSTALL} -c -o root -g named -m 640 named-simple.conf \
  168. ${DESTDIR}/var/named/etc/named.conf; \
  169. ${INSTALL} -c -o root -g named -m 640 named-*.conf \
  170. ${DESTDIR}/var/named/etc; \
  171. ${INSTALL} -c -o root -g wheel -m 644 root.hint \
  172. ${DESTDIR}/var/named/etc; \
  173. ${INSTALL} -c -o root -g wheel -m 644 db.localhost \
  174. ${DESTDIR}/var/named/standard/localhost; \
  175. ${INSTALL} -c -o root -g wheel -m 644 db.loopback \
  176. ${DESTDIR}/var/named/standard/loopback; \
  177. ${INSTALL} -c -o root -g wheel -m 644 db.loopback6.arpa \
  178. ${DESTDIR}/var/named/standard/loopback6.arpa
  179. /bin/rm -f ${DESTDIR}/etc/localtime
  180. ln -s ${TZDIR}/${LOCALTIME} ${DESTDIR}/etc/localtime
  181. /bin/rm -f ${DESTDIR}/etc/rmt
  182. ln -s /usr/sbin/rmt ${DESTDIR}/etc/rmt
  183. ${INSTALL} -c -o root -g wheel -m 644 minfree \
  184. ${DESTDIR}/var/crash
  185. ${INSTALL} -c -o ${BINOWN} -g operator -m 664 /dev/null \
  186. ${DESTDIR}/etc/dumpdates
  187. ${INSTALL} -c -o root -g crontab -m 660 /dev/null \
  188. ${DESTDIR}/var/cron/at.deny
  189. ${INSTALL} -c -o root -g crontab -m 660 /dev/null \
  190. ${DESTDIR}/var/cron/cron.deny
  191. ${INSTALL} -c -o root -g wheel -m 600 /dev/null \
  192. ${DESTDIR}/var/cron/log
  193. ${INSTALL} -c -o root -g wheel -m 444 /dev/null \
  194. ${DESTDIR}/var/db/locate.database
  195. ${INSTALL} -c -o ${BINOWN} -g wheel -m 640 /dev/null \
  196. ${DESTDIR}/var/log/authlog
  197. ${INSTALL} -c -o ${BINOWN} -g wheel -m 640 /dev/null \
  198. ${DESTDIR}/var/log/daemon
  199. ${INSTALL} -c -o ${BINOWN} -g wheel -m 600 /dev/null \
  200. ${DESTDIR}/var/log/failedlogin
  201. ${INSTALL} -c -o ${BINOWN} -g wheel -m 640 /dev/null \
  202. ${DESTDIR}/var/log/ftpd
  203. ${INSTALL} -c -o ${BINOWN} -g wheel -m 644 /dev/null \
  204. ${DESTDIR}/var/log/lastlog
  205. ${INSTALL} -c -o ${BINOWN} -g wheel -m 640 /dev/null \
  206. ${DESTDIR}/var/log/lpd-errs
  207. ${INSTALL} -c -o ${BINOWN} -g wheel -m 600 /dev/null \
  208. ${DESTDIR}/var/log/maillog
  209. ${INSTALL} -c -o ${BINOWN} -g wheel -m 644 /dev/null \
  210. ${DESTDIR}/var/log/messages
  211. ${INSTALL} -c -o ${BINOWN} -g wheel -m 600 /dev/null \
  212. ${DESTDIR}/var/log/secure
  213. ${INSTALL} -c -o ${BINOWN} -g wheel -m 664 /dev/null \
  214. ${DESTDIR}/var/log/sendmail.st
  215. ${INSTALL} -c -o ${BINOWN} -g wheel -m 644 /dev/null \
  216. ${DESTDIR}/var/log/wtmp
  217. ${INSTALL} -c -o ${BINOWN} -g wheel -m 640 /dev/null \
  218. ${DESTDIR}/var/log/xferlog
  219. ${INSTALL} -c -o daemon -g staff -m 664 /dev/null \
  220. ${DESTDIR}/var/msgs/bounds
  221. ${INSTALL} -c -o ${BINOWN} -g utmp -m 664 /dev/null \
  222. ${DESTDIR}/var/run/utmp
  223. .if ${MACHINE} == "vax"
  224. uudecode -p etc.vax/${PCS}.uu > ${DESTDIR}/${PCS} && \
  225. chown ${BINOWN} ${DESTDIR}/${PCS} && \
  226. chgrp ${BINGRP} ${DESTDIR}/${PCS} && \
  227. chmod 644 ${DESTDIR}/${PCS}
  228. .endif
  229. cd ../gnu/usr.sbin/sendmail/cf/cf && exec ${MAKE} distribution
  230. cd ../usr.sbin/ypserv/ypinit && exec ${MAKE} distribution
  231. cd ../usr.bin/ssh && exec ${MAKE} distribution
  232. cd ../usr.sbin/httpd && exec ${MAKE} -f Makefile.bsd-wrapper distribution
  233. cd ../lib/libssl && exec ${MAKE} distribution
  234. cd ../gnu/usr.bin/lynx && exec ${MAKE} -f Makefile.bsd-wrapper distribution
  235. cd ../usr.bin/bgplg && exec ${MAKE} distribution
  236. cd ../usr.bin/mail && exec ${MAKE} distribution
  237. cd mail && exec ${MAKE} distribution
  238. ${INSTALL} -c -o root -g wheel -m 600 root/root.mail \
  239. ${DESTDIR}/var/mail/root
  240. ${INSTALL} -c -o root -g wheel -m 440 ../usr.bin/sudo/sudoers \
  241. ${DESTDIR}/etc/sudoers
  242. distribution:
  243. exec ${SUDO} ${MAKE} distribution-etc-root-var
  244. cd .. && exec ${SUDO} ${MAKE} install
  245. touch ${DESTDIR}/var/db/sysmerge/etcsum
  246. TMPSUM=`mktemp /tmp/_etcsum.XXXXXXXXXX` || exit 1; \
  247. sort ../distrib/sets/lists/etc/{mi,md.${MACHINE}} > $${TMPSUM}; \
  248. cd ${DESTDIR} && \
  249. xargs cksum < $${TMPSUM} > ${DESTDIR}/var/db/sysmerge/etcsum; \
  250. rm -f $${TMPSUM}
  251. distrib-dirs:
  252. if [ ! -d ${DESTDIR}/. ]; then \
  253. ${INSTALL} -d -o root -g wheel -m 755 ${DESTDIR}; \
  254. fi
  255. mtree -qdef mtree/4.4BSD.dist -p ${DESTDIR}/ -U
  256. if [ ! -d ${DESTDIR}/usr/src ]; then \
  257. ${INSTALL} -d -o root -g wsrc -m 775 ${DESTDIR}/usr/src; \
  258. fi
  259. cd ${DESTDIR}/; rm -f sys; ln -s usr/src/sys sys
  260. .ifndef RELEASEDIR
  261. release:
  262. @echo setenv RELEASEDIR before building a release.
  263. @false
  264. .else
  265. release-sets:
  266. cd ${.CURDIR}/../distrib/sets && exec ${SUDO} sh maketars ${OSrev}
  267. sha:
  268. -cd ${RELEASEDIR}; \
  269. sum -a sha256 INSTALL.`arch -ks` ${MDEXT} ${MISETS} > SHA256
  270. release: distribution kernels release-sets distrib sha
  271. .endif
  272. .endif # DESTDIR check
  273. distrib:
  274. cd ${.CURDIR}/../distrib && \
  275. ${MAKE} && exec ${SUDO} ${MAKE} install
  276. DHSIZE=1024 1536 2048 3072 4096
  277. update-moduli:
  278. ( \
  279. echo -n '# $$Open'; echo 'BSD$$'; \
  280. echo '# Time Type Tests Tries Size Generator Modulus'; \
  281. ( for i in ${DHSIZE}; do \
  282. ssh-keygen -b $$i -G /dev/stdout; \
  283. done) | \
  284. ssh-keygen -T /dev/stdout \
  285. ) > moduli
  286. .PHONY: distribution-etc-root-var distribution distrib-dirs \
  287. release allarchs kernels release-sets m4
  288. SUBDIR+= etc.alpha etc.amd64 etc.armish etc.aviion etc.hp300 etc.hppa
  289. SUBDIR+= etc.hppa64 etc.i386 etc.landisk etc.loongson etc.luna88k
  290. SUBDIR+= etc.mac68k etc.macppc etc.mvme68k etc.mvme88k etc.palm
  291. SUBDIR+= etc.sgi etc.socppc etc.sparc etc.sparc64 etc.vax etc.zaurus
  292. .include <bsd.subdir.mk>
  293. .include <bsd.prog.mk>