Browse Source

move common distrib rules to main Makefile,

make -> ${MAKE}
add phony targets
remove unnecessary subshells
install kernel in a separate target from building.
some SUDO.
okay deraadt@
(checked bootstrap on i386, should be safe elsewhere, and trivial to fix
anyways)
OPENBSD_3_2
espie 22 years ago
parent
commit
4229147a96
15 changed files with 87 additions and 102 deletions
  1. +6
    -5
      src/etc/Makefile
  2. +6
    -7
      src/etc/etc.alpha/Makefile.inc
  3. +4
    -7
      src/etc/etc.amiga/Makefile.inc
  4. +8
    -10
      src/etc/etc.hp300/Makefile.inc
  5. +5
    -7
      src/etc/etc.hppa/Makefile.inc
  6. +5
    -7
      src/etc/etc.i386/Makefile.inc
  7. +9
    -7
      src/etc/etc.mac68k/Makefile.inc
  8. +9
    -8
      src/etc/etc.macppc/Makefile.inc
  9. +3
    -5
      src/etc/etc.mvme68k/Makefile.inc
  10. +5
    -5
      src/etc/etc.mvme88k/Makefile.inc
  11. +9
    -8
      src/etc/etc.mvmeppc/Makefile.inc
  12. +7
    -9
      src/etc/etc.sparc/Makefile.inc
  13. +3
    -5
      src/etc/etc.sparc64/Makefile.inc
  14. +3
    -5
      src/etc/etc.sun3/Makefile.inc
  15. +5
    -7
      src/etc/etc.vax/Makefile.inc

+ 6
- 5
src/etc/Makefile View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.159 2002/05/12 13:51:38 espie Exp $
# $OpenBSD: Makefile,v 1.160 2002/05/13 07:22:42 espie Exp $
TZDIR= /usr/share/zoneinfo
LOCALTIME= US/Pacific
@ -340,15 +340,12 @@ MAKEDEVARCHS+= sparc64
MAKEDEVARCHS+= sun3
#MAKEDEVARCHS+= vax
all:
# make M=${MACHINE} m4
clean:
rm -f etc.${MACHINE}/MAKEDEV
cleandir:
cd ${.CURDIR}; for m in ${MAKEDEVARCHS}; do \
make MACHINE=$$m clean; done
${MAKE} MACHINE=$$m clean; done
m4: etc.${M}/MAKEDEV
@ -362,6 +359,10 @@ allarchs: MAKEDEV.sub MAKEDEV.mi
cd ${.CURDIR}; for m in ${MAKEDEVARCHS}; do \
${MAKE} M=$$m m4; done
distrib:
cd ${.CURDIR}/../distrib && \
${MAKE} cleandir && ${MAKE} && exec ${SUDO} ${MAKE} install
.PHONY: distribution-etc-root-var distribution distrib-dirs \
release snapshot allarchs snap_pre snap_tar snap_md m4
.include <bsd.prog.mk>

+ 6
- 7
src/etc/etc.alpha/Makefile.inc View File

@ -1,24 +1,23 @@
# $OpenBSD: Makefile.inc,v 1.12 2001/03/05 14:32:10 deraadt Exp $
# $OpenBSD: Makefile.inc,v 1.13 2002/05/13 07:22:42 espie Exp $
# etc.alpha/Makefile.inc -- alpha-specific etc Makefile targets
.ifdef DESTDIR
snap_md: bsd distrib boot
cp ${.CURDIR}/../sys/arch/alpha/compile/GENERIC/bsd \
${DESTDIR}/snapshot/bsd
bsd:
cd ${.CURDIR}/../sys/arch/alpha/conf && config GENERIC
cd ${.CURDIR}/../sys/arch/alpha/compile/GENERIC && \
make clean && make depend && make
cp ${.CURDIR}/../sys/arch/alpha/compile/GENERIC/bsd \
${DESTDIR}/snapshot/bsd
${MAKE} clean && ${MAKE} depend && exec ${MAKE}
distrib:
cd ${.CURDIR}/../distrib && \
make cleandir && make && make install
boot:
cp ${DESTDIR}/usr/mdec/boot ${DESTDIR}/snapshot
cp ${DESTDIR}/usr/mdec/bootxx ${DESTDIR}/snapshot
cp ${DESTDIR}/usr/mdec/netboot ${DESTDIR}/snapshot
.PHONY: bsd boot
.endif # DESTDIR check

+ 4
- 7
src/etc/etc.amiga/Makefile.inc View File

@ -1,19 +1,15 @@
# $OpenBSD: Makefile.inc,v 1.15 1999/10/08 10:52:20 espie Exp $
# $OpenBSD: Makefile.inc,v 1.16 2002/05/13 07:22:42 espie Exp $
# etc.amiga/Makefile.inc -- amiga-specific etc Makefile targets
MACHINE_HAS_TOOLS=Yes
.ifdef DESTDIR
snap_md: distrib bsd tools
bsd:
# The GENERIC kernel is built as a side-effect of the miniroot
cp ${.CURDIR}/../sys/arch/amiga/compile/GENERIC/bsd \
${DESTDIR}/snapshot/bsd
distrib:
cd ${.CURDIR}/../distrib && \
${MAKE} cleandir && ${MAKE} && ${MAKE} install
bsd:
# The GENERIC kernel is built as a side-effect of the miniroot
tools:
mkdir -p ${DESTDIR}/snapshot/tools
@ -23,4 +19,5 @@ tools:
cp ${.CURDIR}/../sys/arch/amiga/stand/device-streams/obj/${I} ${DESTDIR}/snapshot/tools
.endfor
.PHONY: bsd tools
.endif # DESTDIR check

+ 8
- 10
src/etc/etc.hp300/Makefile.inc View File

@ -1,29 +1,27 @@
# $OpenBSD: Makefile.inc,v 1.16 1999/08/18 17:27:14 downsj Exp $
# $OpenBSD: Makefile.inc,v 1.17 2002/05/13 07:22:42 espie Exp $
# etc.hp300/Makefile.inc -- hp300-specific etc Makefile targets
.ifdef DESTDIR
snap_md: bsd bsd.dl bootblocks distrib
cp ${.CURDIR}/../sys/arch/hp300/compile/GENERIC/bsd \
${DESTDIR}/snapshot/bsd
cp ${.CURDIR}/../sys/arch/hp300/compile/DISKLESS/bsd \
${DESTDIR}/snapshot/bsd.dl
bsd:
cd ${.CURDIR}/../sys/arch/hp300/conf && config GENERIC
cd ${.CURDIR}/../sys/arch/hp300/compile/GENERIC && \
make clean && make depend && make
cp ${.CURDIR}/../sys/arch/hp300/compile/GENERIC/bsd \
${DESTDIR}/snapshot/bsd
${MAKE} clean && ${MAKE} depend && exec ${MAKE}
bsd.dl:
cd ${.CURDIR}/../sys/arch/hp300/conf && config DISKLESS
cd ${.CURDIR}/../sys/arch/hp300/compile/DISKLESS && \
make clean && make depend && make
cp ${.CURDIR}/../sys/arch/hp300/compile/DISKLESS/bsd \
${DESTDIR}/snapshot/bsd.dl
${MAKE} clean && ${MAKE} depend && exec ${MAKE}
bootblocks:
cp ${DESTDIR}/usr/mdec/uboot.lif ${DESTDIR}/snapshot/SYS_UBOOT
cp ${DESTDIR}/usr/mdec/cdboot.lif ${DESTDIR}/snapshot/SYS_CDBOOT
distrib:
cd ${.CURDIR}/../distrib && make cleandir && \
make && make install
.PHONY: bsd bsd.dl bootblocks
.endif # DESTDIR check

+ 5
- 7
src/etc/etc.hppa/Makefile.inc View File

@ -1,17 +1,15 @@
# $OpenBSD: Makefile.inc,v 1.1 1999/11/30 21:25:38 mickey Exp $
# $OpenBSD: Makefile.inc,v 1.2 2002/05/13 07:22:42 espie Exp $
.ifdef DESTDIR
snap_md: bsd distrib
cp ${.CURDIR}/../sys/arch/hppa/compile/GENERIC/bsd \
${DESTDIR}/snapshot/bsd
bsd:
cd ${.CURDIR}/../sys/arch/hppa/conf && config GENERIC
cd ${.CURDIR}/../sys/arch/hppa/compile/GENERIC && \
make clean && make depend && make
cp ${.CURDIR}/../sys/arch/hppa/compile/GENERIC/bsd \
${DESTDIR}/snapshot/bsd
${MAKE} clean && ${MAKE} depend && exec ${MAKE}
distrib:
cd ${.CURDIR}/../distrib && make cleandir && \
make && make install
.PHONY: bsd
.endif # DESTDIR check

+ 5
- 7
src/etc/etc.i386/Makefile.inc View File

@ -1,21 +1,19 @@
# $OpenBSD: Makefile.inc,v 1.10 1997/09/26 19:51:28 deraadt Exp $
# $OpenBSD: Makefile.inc,v 1.11 2002/05/13 07:22:42 espie Exp $
# etc.i386/Makefile.inc -- i386-specific etc Makefile targets
.ifdef DESTDIR
snap_md: bsd notes distrib
cp ${.CURDIR}/../sys/arch/i386/compile/GENERIC/bsd \
${DESTDIR}/snapshot/bsd
bsd:
cd ${.CURDIR}/../sys/arch/i386/conf && config GENERIC
cd ${.CURDIR}/../sys/arch/i386/compile/GENERIC && \
make clean && make depend && make
cp ${.CURDIR}/../sys/arch/i386/compile/GENERIC/bsd \
${DESTDIR}/snapshot/bsd
${MAKE} clean && ${MAKE} depend && exec ${MAKE}
notes:
cp ${.CURDIR}/etc.i386/INSTALL.* ${DESTDIR}/snapshot
distrib:
cd ${.CURDIR}/../distrib && make cleandir && \
make && make install
.PHONY: bsd notes
.endif # DESTDIR check

+ 9
- 7
src/etc/etc.mac68k/Makefile.inc View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile.inc,v 1.6 1998/02/19 20:58:00 ryker Exp $
# $OpenBSD: Makefile.inc,v 1.7 2002/05/13 07:22:43 espie Exp $
# etc.mac68k/Makefile.inc -- mac68k-specific etc Makefile targets
.ifdef DESTDIR
@ -10,12 +10,14 @@ snap_md: bsd-generic bsd-genericsbc
tar cf - bsd \
| ${GZIP} ${GZIPFLAGS} >${DESTDIR}/snapshot/bsd-genericsbc.tar${GZIPEXT})
bsd-generic:
(cd ${.CURDIR}/../sys/arch/mac68k/conf && config GENERIC)
(cd ${.CURDIR}/../sys/arch/mac68k/compile/GENERIC && \
make clean && make depend && make)
cd ${.CURDIR}/../sys/arch/mac68k/conf && config GENERIC
cd ${.CURDIR}/../sys/arch/mac68k/compile/GENERIC && \
${MAKE} clean && ${MAKE} depend && exec ${MAKE}
bsd-genericsbc:
(cd ${.CURDIR}/../sys/arch/mac68k/conf && config GENERICSBC)
(cd ${.CURDIR}/../sys/arch/mac68k/compile/GENERICSBC && \
make clean && make depend && make)
cd ${.CURDIR}/../sys/arch/mac68k/conf && config GENERICSBC
cd ${.CURDIR}/../sys/arch/mac68k/compile/GENERICSBC && \
${MAKE} clean && ${MAKE} depend && exec ${MAKE}
.PHONY: bsd-generic bsd-genericsbc
.endif # DESTDIR check

+ 9
- 8
src/etc/etc.macppc/Makefile.inc View File

@ -1,22 +1,21 @@
# $OpenBSD: Makefile.inc,v 1.3 2002/04/22 01:50:51 deraadt Exp $
# $OpenBSD: Makefile.inc,v 1.4 2002/05/13 07:22:43 espie Exp $
# etc.macppc/Makefile.inc -- macppc-specific etc Makefile targets
.ifdef DESTDIR
snap_md: bsd distrib
snap_md: bsd distrib1
cp ${.CURDIR}/../sys/arch/macppc/compile/GENERIC/bsd \
${DESTDIR}/snapshot/bsd
bsd:
cd ${.CURDIR}/../sys/arch/macppc/conf && config GENERIC
cd ${.CURDIR}/../sys/arch/macppc/compile/GENERIC && \
make clean && make depend && make
cp ${.CURDIR}/../sys/arch/macppc/compile/GENERIC/bsd \
${DESTDIR}/snapshot/bsd
${MAKE} clean && ${MAKE} depend && exec ${MAKE}
# knows about bsd.rd
distrib:
distrib1:
cp ${DESTDIR}/usr/mdec/ofwboot ${DESTDIR}/snapshot/ofwboot
cp ${DESTDIR}/usr/mdec/bsd.tbxi ${DESTDIR}/snapshot/bsd.tbxi
cd ${.CURDIR}/../distrib && make cleandir && \
make && make install
${MAKE} distrib
mkdir ${DESTDIR}/snapshot/boot
cp ${DESTDIR}/snapshot/bsd.rd ${DESTDIR}/snapshot/boot/bsd.rd
strip ${DESTDIR}/snapshot/boot/bsd.rd
@ -28,4 +27,6 @@ distrib:
gzip -9 ${DESTDIR}/snapshot/bsd.rd
mv ${DESTDIR}/snapshot/bsd.rd.gz ${DESTDIR}/snapshot/bsd.rd
.PHONY: bsd distrib1
.endif # DESTDIR check

+ 3
- 5
src/etc/etc.mvme68k/Makefile.inc View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile.inc,v 1.7 1997/09/21 11:50:30 deraadt Exp $
# $OpenBSD: Makefile.inc,v 1.8 2002/05/13 07:22:43 espie Exp $
# etc.mvme68k/Makefile.inc -- mvme68k-specific etc Makefile targets
.ifdef DESTDIR
@ -9,13 +9,11 @@ snap_md: bsd-generic bootblocks distrib
bsd-generic:
cd ${.CURDIR}/../sys/arch/mvme68k/conf && config GENERIC
cd ${.CURDIR}/../sys/arch/mvme68k/compile/GENERIC && \
make clean && make depend && make
${MAKE} clean && ${MAKE} depend && exec ${MAKE}
bootblocks:
cp ${DESTDIR}/usr/mdec/* ${DESTDIR}/snapshot/
distrib:
cd ${.CURDIR}/../distrib && make cleandir && \
make && make install
.PHONY: bsd-generic bootblocks
.endif # DESTDIR check

+ 5
- 5
src/etc/etc.mvme88k/Makefile.inc View File

@ -1,18 +1,18 @@
# $OpenBSD: Makefile.inc,v 1.3 1999/03/03 05:47:08 smurph Exp $
# $OpenBSD: Makefile.inc,v 1.4 2002/05/13 07:22:43 espie Exp $
# etc.mvme88k/Makefile.inc -- mvme88k-specific etc Makefile targets
.ifdef DESTDIR
snap_md: bsd-generic bootblocks
cp ${.CURDIR}/../sys/arch/mvme88k/compile/GENERIC/bsd.gz \
${DESTDIR}/snapshot/bsd-generic.gz
bsd-generic:
cd ${.CURDIR}/../sys/arch/mvme88k/conf && config GENERIC
cd ${.CURDIR}/../sys/arch/mvme88k/compile/GENERIC && \
make clean && make depend && make && gzip -9 bsd
${MAKE} clean && ${MAKE} depend && ${MAKE} && gzip -9 bsd
bootblocks:
cp ${DESTDIR}/usr/mdec/* ${DESTDIR}/snapshot/
distrib:
cd ${.CURDIR}/../distrib && make cleandir && \
make && make install
.PHONY: bsd-generic bootblocks
.endif # DESTDIR check

+ 9
- 8
src/etc/etc.mvmeppc/Makefile.inc View File

@ -1,23 +1,22 @@
# $OpenBSD: Makefile.inc,v 1.1 2001/06/26 22:37:37 smurph Exp $
# $OpenBSD: Makefile.inc,v 1.2 2002/05/13 07:22:43 espie Exp $
# etc.mvmeppc/Makefile.inc -- mvmeppc-specific etc Makefile targets
.ifdef DESTDIR
snap_md: bsd distrib
snap_md: bsd distrib1
cp ${.CURDIR}/../sys/arch/mvmeppc/compile/GENERIC/bsd \
${DESTDIR}/snapshot/bsd
bsd:
cd ${.CURDIR}/../sys/arch/mvmeppc/conf && config GENERIC
cd ${.CURDIR}/../sys/arch/mvmeppc/compile/GENERIC && \
make clean && make depend && make
cp ${.CURDIR}/../sys/arch/mvmeppc/compile/GENERIC/bsd \
${DESTDIR}/snapshot/bsd
${MAKE} clean && ${MAKE} depend && exec ${MAKE}
# knows about bsd.rd and bsdofw.rd
distrib:
distrib1:
cp ${DESTDIR}/usr/mdec/bootxx ${DESTDIR}/snapshot/bootxx
cp ${DESTDIR}/usr/mdec/bootsd ${DESTDIR}/snapshot/bootsd
cp ${DESTDIR}/usr/mdec/installboot ${DESTDIR}/snapshot/installboot
cd ${.CURDIR}/../distrib && make cleandir && \
make && make install
${MAKE} distrib
mkdir ${DESTDIR}/snapshot/boot
cp ${DESTDIR}/snapshot/bsd.rd ${DESTDIR}/snapshot/boot/bsd.rd
strip ${DESTDIR}/snapshot/boot/bsd.rd
@ -33,4 +32,6 @@ distrib:
mv ${DESTDIR}/snapshot/bsd.rd.gz ${DESTDIR}/snapshot/bsd.rd
.PHONY: bsd distrib1
.endif # DESTDIR check

+ 7
- 9
src/etc/etc.sparc/Makefile.inc View File

@ -1,13 +1,8 @@
# $OpenBSD: Makefile.inc,v 1.10 2002/04/26 18:57:11 deraadt Exp $
# $OpenBSD: Makefile.inc,v 1.11 2002/05/13 07:22:43 espie Exp $
# etc.sparc/Makefile.inc -- sparc-specific etc Makefile targets
.ifdef DESTDIR
snap_md: bsd bootblocks distrib
bsd:
cd ${.CURDIR}/../sys/arch/sparc/conf && config GENERIC
cd ${.CURDIR}/../sys/arch/sparc/compile/GENERIC && \
make clean && make depend && make
cp ${.CURDIR}/../sys/arch/sparc/compile/GENERIC/bsd \
${DESTDIR}/snapshot/bsd
s=`printf "find sd\nexit" | config -e ${DESTDIR}/snapshot/bsd | \
@ -15,13 +10,16 @@ bsd:
printf "add sd0\n%s\n%s\nchange %s\ny\n3\n\n\nquit\n" $$s $$s $$s | \
config -e -o ${DESTDIR}/snapshot/bsd.scsi3 ${DESTDIR}/snapshot/bsd
bsd:
cd ${.CURDIR}/../sys/arch/sparc/conf && config GENERIC
cd ${.CURDIR}/../sys/arch/sparc/compile/GENERIC && \
${MAKE} clean && ${MAKE} depend && exec ${MAKE}
bootblocks:
cp ${DESTDIR}/usr/mdec/*boot* ${DESTDIR}/snapshot
${DESTDIR}/usr/mdec/binstall net /tmp && \
mv /tmp/boot.sparc.openbsd ${DESTDIR}/snapshot/boot.net
distrib:
cd ${.CURDIR}/../distrib && make cleandir && \
make && make install
.PHONY: bsd bootblocks
.endif # DESTDIR check

+ 3
- 5
src/etc/etc.sparc64/Makefile.inc View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile.inc,v 1.1 2001/09/11 15:51:50 jason Exp $
# $OpenBSD: Makefile.inc,v 1.2 2002/05/13 07:22:43 espie Exp $
# etc.sparc64/Makefile.inc -- sparc64-specific etc Makefile targets
.ifdef DESTDIR
@ -9,13 +9,11 @@ snap_md: bsd bootblocks distrib
bsd:
cd ${.CURDIR}/../sys/arch/sparc64/conf && config GENERIC
cd ${.CURDIR}/../sys/arch/sparc64/compile/GENERIC && \
make clean && make depend && make
${MAKE} clean && ${MAKE} depend && exec ${MAKE}
bootblocks:
cp ${DESTDIR}/usr/mdec/*boot* ${DESTDIR}/snapshot
distrib:
cd ${.CURDIR}/../distrib && make cleandir && \
make && make install
.PHONY: bsd bootblocks
.endif # DESTDIR check

+ 3
- 5
src/etc/etc.sun3/Makefile.inc View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile.inc,v 1.4 2000/06/19 01:49:30 miod Exp $
# $OpenBSD: Makefile.inc,v 1.5 2002/05/13 07:22:43 espie Exp $
# etc.sun3/Makefile.inc -- sun3-specific etc Makefile targets
.ifdef DESTDIR
@ -9,13 +9,11 @@ snap_md: bsd bootblocks distrib
bsd:
cd ${.CURDIR}/../sys/arch/sun3/conf && config GENERIC
cd ${.CURDIR}/../sys/arch/sun3/compile/GENERIC && \
make clean && make depend && make
${MAKE} clean && ${MAKE} depend && exec ${MAKE}
bootblocks:
cp ${DESTDIR}/usr/mdec/*boot* ${DESTDIR}/snapshot
distrib:
cd ${.CURDIR}/../distrib && make cleandir && \
make && make install
.PHONY: bsd bootblocks
.endif # DESTDIR check

+ 5
- 7
src/etc/etc.vax/Makefile.inc View File

@ -1,24 +1,22 @@
# $OpenBSD: Makefile.inc,v 1.3 2002/02/15 01:33:31 deraadt Exp $
# $OpenBSD: Makefile.inc,v 1.4 2002/05/13 07:22:43 espie Exp $
#
# etc.vax/Makefile.inc -- vax-specific etc Makefile targets
#
.ifdef DESTDIR
snap_md: bsd bootblocks distrib
cp ${.CURDIR}/../sys/arch/vax/compile/GENERIC/bsd \
${DESTDIR}/snapshot/bsd
bsd:
cd ${.CURDIR}/../sys/arch/vax/conf && config GENERIC
cd ${.CURDIR}/../sys/arch/vax/compile/GENERIC && \
make clean && make depend && make
cp ${.CURDIR}/../sys/arch/vax/compile/GENERIC/bsd \
${DESTDIR}/snapshot/bsd
${MAKE} clean && ${MAKE} depend && exec ${MAKE}
bootblocks:
cp ${DESTDIR}/usr/mdec/boot ${DESTDIR}/snapshot
mopa.out ${DESTDIR}/usr/mdec/boot ${DESTDIR}/snapshot/boot.mop
distrib:
cd ${.CURDIR}/../distrib && make cleandir && \
make && make install
.PHONY: bsd bootblocks
.endif # DESTDIR check

Loading…
Cancel
Save