Browse Source

Remove unnecessary subshells

make -> ${MAKE}
add exec at end of lines
sprinkle with SUDO where needed (not enough for a full release yet)
PHONY targets.
ok millert@, deraadt@
OPENBSD_3_2
espie 22 years ago
parent
commit
20e1d3d9f6
1 changed files with 38 additions and 35 deletions
  1. +38
    -35
      src/etc/Makefile

+ 38
- 35
src/etc/Makefile View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.158 2002/05/11 18:41:19 millert Exp $
# $OpenBSD: Makefile,v 1.159 2002/05/12 13:51:38 espie Exp $
TZDIR= /usr/share/zoneinfo TZDIR= /usr/share/zoneinfo
LOCALTIME= US/Pacific LOCALTIME= US/Pacific
@ -78,7 +78,7 @@ distribution-etc-root-var: distrib-dirs
${INSTALL} -c -o root -g wheel -m 644 moduli ${DESTDIR}/etc ${INSTALL} -c -o root -g wheel -m 644 moduli ${DESTDIR}/etc
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 555 \ ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 555 \
MAKEDEV.local etc.${MACHINE}/MAKEDEV ${DESTDIR}/dev MAKEDEV.local etc.${MACHINE}/MAKEDEV ${DESTDIR}/dev
(cd root; \
cd root; \
${INSTALL} -c -o root -g wheel -m 644 dot.cshrc \ ${INSTALL} -c -o root -g wheel -m 644 dot.cshrc \
${DESTDIR}/root/.cshrc; \ ${DESTDIR}/root/.cshrc; \
${INSTALL} -c -o root -g wheel -m 600 dot.klogin \ ${INSTALL} -c -o root -g wheel -m 600 dot.klogin \
@ -89,8 +89,8 @@ distribution-etc-root-var: distrib-dirs
${DESTDIR}/root/.profile; \ ${DESTDIR}/root/.profile; \
rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \ rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \ ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile)
(cd skel; \
ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile
cd skel; \
${INSTALL} -c -o root -g wheel -m 644 dot.cshrc \ ${INSTALL} -c -o root -g wheel -m 644 dot.cshrc \
${DESTDIR}/etc/skel/.cshrc; \ ${DESTDIR}/etc/skel/.cshrc; \
${INSTALL} -c -o root -g wheel -m 644 dot.login \ ${INSTALL} -c -o root -g wheel -m 644 dot.login \
@ -100,8 +100,8 @@ distribution-etc-root-var: distrib-dirs
${INSTALL} -c -o root -g wheel -m 644 dot.profile \ ${INSTALL} -c -o root -g wheel -m 644 dot.profile \
${DESTDIR}/etc/skel/.profile; \ ${DESTDIR}/etc/skel/.profile; \
${INSTALL} -c -o root -g wheel -m 600 dot.rhosts \ ${INSTALL} -c -o root -g wheel -m 600 dot.rhosts \
${DESTDIR}/etc/skel/.rhosts)
(cd kerberosIV; \
${DESTDIR}/etc/skel/.rhosts
cd kerberosIV; \
${INSTALL} -c -o root -g wheel -m 644 README \ ${INSTALL} -c -o root -g wheel -m 644 README \
${DESTDIR}/etc/kerberosIV; \ ${DESTDIR}/etc/kerberosIV; \
${INSTALL} -c -o root -g wheel -m 644 krb.conf \ ${INSTALL} -c -o root -g wheel -m 644 krb.conf \
@ -111,16 +111,16 @@ distribution-etc-root-var: distrib-dirs
${INSTALL} -c -o root -g wheel -m 644 krb.extra \ ${INSTALL} -c -o root -g wheel -m 644 krb.extra \
${DESTDIR}/etc/kerberosIV; \ ${DESTDIR}/etc/kerberosIV; \
${INSTALL} -c -o root -g wheel -m 644 krb.equiv \ ${INSTALL} -c -o root -g wheel -m 644 krb.equiv \
${DESTDIR}/etc/kerberosIV)
(cd kerberosV; \
${DESTDIR}/etc/kerberosIV
cd kerberosV; \
${INSTALL} -c -o root -g wheel -m 644 README \ ${INSTALL} -c -o root -g wheel -m 644 README \
${DESTDIR}/etc/kerberosV; \ ${DESTDIR}/etc/kerberosV; \
${INSTALL} -c -o root -g wheel -m 644 krb5.conf.example \ ${INSTALL} -c -o root -g wheel -m 644 krb5.conf.example \
${DESTDIR}/etc/kerberosV)
(cd amd; \
${DESTDIR}/etc/kerberosV
cd amd; \
${INSTALL} -c -o root -g wheel -m 644 master.sample \ ${INSTALL} -c -o root -g wheel -m 644 master.sample \
${DESTDIR}/etc/amd)
(cd mtree; \
${DESTDIR}/etc/amd
cd mtree; \
${INSTALL} -c -o root -g wheel -m 600 special \ ${INSTALL} -c -o root -g wheel -m 600 special \
${DESTDIR}/etc/mtree; \ ${DESTDIR}/etc/mtree; \
${INSTALL} -c -o root -g wheel -m 444 4.4BSD.dist \ ${INSTALL} -c -o root -g wheel -m 444 4.4BSD.dist \
@ -128,8 +128,8 @@ distribution-etc-root-var: distrib-dirs
${INSTALL} -c -o root -g wheel -m 444 BSD.local.dist \ ${INSTALL} -c -o root -g wheel -m 444 BSD.local.dist \
${DESTDIR}/etc/mtree; \ ${DESTDIR}/etc/mtree; \
${INSTALL} -c -o root -g wheel -m 444 BSD.x11.dist \ ${INSTALL} -c -o root -g wheel -m 444 BSD.x11.dist \
${DESTDIR}/etc/mtree)
(cd photuris; \
${DESTDIR}/etc/mtree
cd photuris; \
${INSTALL} -c -o root -g wheel -m 600 secrets.conf \ ${INSTALL} -c -o root -g wheel -m 600 secrets.conf \
${DESTDIR}/etc/photuris; \ ${DESTDIR}/etc/photuris; \
${INSTALL} -c -o root -g wheel -m 600 attributes.conf \ ${INSTALL} -c -o root -g wheel -m 600 attributes.conf \
@ -137,8 +137,8 @@ distribution-etc-root-var: distrib-dirs
${INSTALL} -c -o root -g wheel -m 600 photuris.conf \ ${INSTALL} -c -o root -g wheel -m 600 photuris.conf \
${DESTDIR}/etc/photuris; \ ${DESTDIR}/etc/photuris; \
${INSTALL} -c -o root -g wheel -m 600 photuris.startup \ ${INSTALL} -c -o root -g wheel -m 600 photuris.startup \
${DESTDIR}/etc/photuris)
(cd ppp; \
${DESTDIR}/etc/photuris
cd ppp; \
${INSTALL} -c -o root -g wheel -m 600 chap-secrets \ ${INSTALL} -c -o root -g wheel -m 600 chap-secrets \
${DESTDIR}/etc/ppp; \ ${DESTDIR}/etc/ppp; \
${INSTALL} -c -o root -g wheel -m 600 options \ ${INSTALL} -c -o root -g wheel -m 600 options \
@ -158,8 +158,8 @@ distribution-etc-root-var: distrib-dirs
${INSTALL} -c -o root -g wheel -m 644 ppp.linkdown.sample \ ${INSTALL} -c -o root -g wheel -m 644 ppp.linkdown.sample \
${DESTDIR}/etc/ppp; \ ${DESTDIR}/etc/ppp; \
${INSTALL} -c -o root -g wheel -m 644 ppp.secret.sample \ ${INSTALL} -c -o root -g wheel -m 644 ppp.secret.sample \
${DESTDIR}/etc/ppp)
(cd afs; \
${DESTDIR}/etc/ppp
cd afs; \
${INSTALL} -c -o root -g wheel -m 644 afsd.conf \ ${INSTALL} -c -o root -g wheel -m 644 afsd.conf \
${DESTDIR}/etc/afs; \ ${DESTDIR}/etc/afs; \
${INSTALL} -c -o root -g wheel -m 644 ThisCell \ ${INSTALL} -c -o root -g wheel -m 644 ThisCell \
@ -169,12 +169,12 @@ distribution-etc-root-var: distrib-dirs
${INSTALL} -c -o root -g wheel -m 644 SuidCells \ ${INSTALL} -c -o root -g wheel -m 644 SuidCells \
${DESTDIR}/etc/afs; \ ${DESTDIR}/etc/afs; \
${INSTALL} -c -o root -g wheel -m 644 README \ ${INSTALL} -c -o root -g wheel -m 644 README \
${DESTDIR}/etc/afs)
(cd namedb; \
${DESTDIR}/etc/afs
cd namedb; \
${INSTALL} -c -o root -g ${BINGRP} -m 644 named.boot \ ${INSTALL} -c -o root -g ${BINGRP} -m 644 named.boot \
${DESTDIR}/var/named; \ ${DESTDIR}/var/named; \
${INSTALL} -c -o named -g ${BINGRP} -m 644 ${NAMEDB} \ ${INSTALL} -c -o named -g ${BINGRP} -m 644 ${NAMEDB} \
${DESTDIR}/var/named/namedb)
${DESTDIR}/var/named/namedb
/bin/rm -f ${DESTDIR}/etc/localtime /bin/rm -f ${DESTDIR}/etc/localtime
ln -s ${TZDIR}/${LOCALTIME} ${DESTDIR}/etc/localtime ln -s ${TZDIR}/${LOCALTIME} ${DESTDIR}/etc/localtime
/bin/rm -f ${DESTDIR}/etc/rmt /bin/rm -f ${DESTDIR}/etc/rmt
@ -223,13 +223,13 @@ distribution-etc-root-var: distrib-dirs
chgrp ${BINGRP} ${DESTDIR}/${PCS} && \ chgrp ${BINGRP} ${DESTDIR}/${PCS} && \
chmod 644 ${DESTDIR}/${PCS} chmod 644 ${DESTDIR}/${PCS}
.endif .endif
(cd ../gnu/usr.sbin/sendmail/cf/cf; ${MAKE} distribution)
(cd ../usr.sbin/ypserv/ypinit; ${MAKE} distribution)
(cd ../usr.bin/ssh; ${MAKE} distribution)
(cd ../usr.sbin/httpd; ${MAKE} -f Makefile.bsd-wrapper distribution)
(cd ../lib/libssl; ${MAKE} -f Makefile.bsd-wrapper distribution)
(cd ../gnu/usr.bin/lynx; ${MAKE} -f Makefile.bsd-wrapper distribution)
(cd ../usr.bin/mail; ${MAKE} distribution)
cd ../gnu/usr.sbin/sendmail/cf/cf && exec ${MAKE} distribution
cd ../usr.sbin/ypserv/ypinit && exec ${MAKE} distribution
cd ../usr.bin/ssh && exec ${MAKE} distribution
cd ../usr.sbin/httpd && exec ${MAKE} -f Makefile.bsd-wrapper distribution
cd ../lib/libssl && exec ${MAKE} -f Makefile.bsd-wrapper distribution
cd ../gnu/usr.bin/lynx && exec ${MAKE} -f Makefile.bsd-wrapper distribution
cd ../usr.bin/mail && exec ${MAKE} distribution
${INSTALL} -c -o root -g ${BINGRP} -m 644 aliases \ ${INSTALL} -c -o root -g ${BINGRP} -m 644 aliases \
${DESTDIR}/etc/mail/aliases ${DESTDIR}/etc/mail/aliases
/usr/libexec/sendmail/sendmail -C${DESTDIR}/etc/mail/sendmail.cf \ /usr/libexec/sendmail/sendmail -C${DESTDIR}/etc/mail/sendmail.cf \
@ -240,8 +240,9 @@ distribution-etc-root-var: distrib-dirs
${INSTALL} -c -o root -g wheel -m 440 ../usr.bin/sudo/sudoers \ ${INSTALL} -c -o root -g wheel -m 440 ../usr.bin/sudo/sudoers \
${DESTDIR}/etc/sudoers ${DESTDIR}/etc/sudoers
distribution: distribution-etc-root-var
(cd ..; ${MAKE} install)
distribution:
exec ${SUDO} ${MAKE} distribution-etc-root-var
cd .. && exec ${SUDO} ${MAKE} install
distrib-dirs: distrib-dirs:
if [ ! -d ${DESTDIR}/. ]; then \ if [ ! -d ${DESTDIR}/. ]; then \
@ -259,8 +260,8 @@ release:
@false @false
.else .else
release: distribution snap_pre snap_md release: distribution snap_pre snap_md
cd ${.CURDIR}/../distrib/notes; ${MAKE}; ${MAKE} install
cd ${.CURDIR}/../distrib/sets; sh maketars ${OSrev}
cd ${.CURDIR}/../distrib/notes && ${MAKE} && exec ${SUDO} ${MAKE} install
cd ${.CURDIR}/../distrib/sets && exec ${SUDO} sh maketars ${OSrev}
-cp ${DESTDIR}/snapshot/bsd* ${RELEASEDIR} -cp ${DESTDIR}/snapshot/bsd* ${RELEASEDIR}
-cp ${DESTDIR}/snapshot/*boot* ${RELEASEDIR} -cp ${DESTDIR}/snapshot/*boot* ${RELEASEDIR}
-cp ${DESTDIR}/snapshot/*BOOT* ${RELEASEDIR} -cp ${DESTDIR}/snapshot/*BOOT* ${RELEASEDIR}
@ -285,8 +286,8 @@ snapshot: distribution snap_pre snap_tar snap_md
cd ${DESTDIR}/snapshot && md5 * > MD5 cd ${DESTDIR}/snapshot && md5 * > MD5
snap_pre: snap_pre:
/bin/rm -rf ${DESTDIR}/snapshot
${INSTALL} -d -o root -g wheel -m 755 ${DESTDIR}/snapshot
${SUDO} /bin/rm -rf ${DESTDIR}/snapshot
${SUDO} ${INSTALL} -d -o root -g wheel -m 755 ${DESTDIR}/snapshot
snap_tar: snap_tar:
cd ${DESTDIR} && tar cf - bin \ cd ${DESTDIR} && tar cf - bin \
@ -359,6 +360,8 @@ etc.${M}/MAKEDEV: MAKEDEV.sub MAKEDEV.mi etc.${M}/MAKEDEV.md
allarchs: MAKEDEV.sub MAKEDEV.mi allarchs: MAKEDEV.sub MAKEDEV.mi
cd ${.CURDIR}; for m in ${MAKEDEVARCHS}; do \ cd ${.CURDIR}; for m in ${MAKEDEVARCHS}; do \
make M=$$m m4; done
${MAKE} M=$$m m4; done
.PHONY: distribution-etc-root-var distribution distrib-dirs \
release snapshot allarchs snap_pre snap_tar snap_md m4
.include <bsd.prog.mk> .include <bsd.prog.mk>

Loading…
Cancel
Save