From 6bde859f40f5bcb38ea48b207faf7c31e461a0f5 Mon Sep 17 00:00:00 2001 From: Ruslan Ermilov Date: Fri, 26 Apr 2002 17:55:27 +0000 Subject: [PATCH] Milestone #1 in cross-arch make releases. Do not install games and profiled libraries to the ${CHROOTDIR} with the initial installworld. Eliminate the need in the second installworld. For that, make sure _everything_ is built in the "world" environment, using the right tool chain. Added SUBDIR_OVERRIDE helper stuff to Makefile.inc1. Split the buildworld process into stages, and skip some stages when SUBDIR_OVERRIDE is set (used to build crypto, krb4, and krb5 dists). Added NO_MAKEDB_RUN knob to Makefile.inc1 to avoid running makewhatis(1) at the end of installworld (used when making crypto, krb4, and krb5 dists). In release/scripts/doFS.sh, ensure that the correct boot blocks are used. Moved the creation of the "crypto" dist from release.5 to release.2. In release.3 and doMFSKERN, build kernels in the "world" environment. KERNELS now means "additional" kernels, GENERIC is always built. Ensure we build crunched binaries in the "world" environment. Obfuscate release/Makefile some more (WMAKEENV) to achieve this. Inline createBOOTMFS target. Use already built GENERIC kernel modules to augment mfsfd's /stand/modules. GC doMODULES as such. Assorted fixes: Get rid of the "afterdistribute" target by moving the single use of it from sys/Makefile to etc/Makefile's "distribute". Makefile.inc1: apparently "etc" no longer needs to be last for "distribute" to succeed. gnu/usr.bin/perl/library/Makefile.inc: do not override the "install" and "distribute" targets, do it the "canonical" way. release/scripts/{man,cat}pages-make.sh: make sure Perl manpages and catpages appear in the right dists. Note that because Perl does not respect the MANBUILDCAT (and NOMAN), this results in a loss of /usr/share/perl/man/cat* empty directories. This will be fixed soon. Turn MAKE_KERBEROS4 into a plain boolean variable (if it is set it means "make KerberosIV"), as documented in the make.conf(5) manpage. Most of the userland makefiles did not test it for "YES" anyway. XXX Should specialized kerberized libpam versions be included into the krb4 and krb5 dists? (libpam.a would be incorrect anyway if both krb4 and krb5 dists were choosen.) Make sure "games" dist is made before "catpages", otherwise games catpages settle in the wrong dist. Fast build machine provided by: Igor Kucherenko --- Makefile | 2 +- Makefile.inc1 | 50 +++--- etc/Makefile | 4 +- gnu/usr.bin/perl/library/Makefile.inc | 8 +- kerberos5/Makefile | 41 ++--- kerberos5/Makefile.inc | 9 +- kerberos5/lib/Makefile | 3 +- kerberos5/lib/libkrb5/Makefile | 3 +- kerberos5/libexec/hprop/Makefile | 3 +- kerberos5/libexec/hpropd/Makefile | 3 +- kerberos5/libexec/ipropd-master/Makefile | 3 +- kerberos5/libexec/ipropd-slave/Makefile | 3 +- kerberos5/libexec/k5admind/Makefile | 3 +- kerberos5/libexec/k5passwdd/Makefile | 3 +- kerberos5/libexec/kadmind/Makefile | 3 +- kerberos5/libexec/kdc/Makefile | 3 +- kerberos5/libexec/kpasswdd/Makefile | 3 +- kerberos5/usr.bin/k5admin/Makefile | 3 +- kerberos5/usr.bin/k5destroy/Makefile | 3 +- kerberos5/usr.bin/k5init/Makefile | 3 +- kerberos5/usr.bin/k5list/Makefile | 3 +- kerberos5/usr.bin/k5passwd/Makefile | 3 +- kerberos5/usr.bin/k5su/Makefile | 3 +- kerberos5/usr.bin/kadmin/Makefile | 3 +- kerberos5/usr.bin/kdestroy/Makefile | 3 +- kerberos5/usr.bin/kinit/Makefile | 3 +- kerberos5/usr.bin/klist/Makefile | 3 +- kerberos5/usr.bin/kpasswd/Makefile | 3 +- kerberos5/usr.bin/ksu/Makefile | 3 +- kerberos5/usr.sbin/k5stash/Makefile | 3 +- kerberos5/usr.sbin/kstash/Makefile | 3 +- kerberos5/usr.sbin/ktutil/Makefile | 3 +- kerberosIV/Makefile | 87 ++++------- kerberosIV/Makefile.inc | 6 +- release/Makefile | 185 +++++++++-------------- release/scripts/catpages-make.sh | 5 + release/scripts/doFS.sh | 7 +- release/scripts/manpages-make.sh | 5 + secure/usr.bin/ssh/Makefile | 10 +- secure/usr.sbin/sshd/Makefile | 10 +- share/mk/bsd.subdir.mk | 16 +- sys/Makefile | 5 - 42 files changed, 211 insertions(+), 317 deletions(-) diff --git a/Makefile b/Makefile index 53a532686778..88c94c3100d5 100644 --- a/Makefile +++ b/Makefile @@ -82,7 +82,7 @@ # Define the user-driven targets. These are listed here in alphabetical # order, but that's not important. # -TGTS= afterdistribute all all-man buildkernel buildworld checkdpadd clean \ +TGTS= all all-man buildkernel buildworld checkdpadd clean \ cleandepend cleandir depend distribute distribworld everything \ hierarchy includes install installcheck installkernel kernel \ reinstallkernel installmost installworld libraries lint \ diff --git a/Makefile.inc1 b/Makefile.inc1 index 5468f0f3b083..051f6c18871a 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -57,6 +57,9 @@ SUBDIR+= lib .if exists(${.CURDIR}/bin) SUBDIR+= bin .endif +.if exists(${.CURDIR}/etc) +SUBDIR+= etc +.endif .if exists(${.CURDIR}/games) && !defined(NOGAMES) SUBDIR+= games .endif @@ -93,11 +96,6 @@ SUBDIR+= usr.bin SUBDIR+= usr.sbin .endif -# etc must be last for "distribute" to work -.if exists(${.CURDIR}/etc) -SUBDIR+= etc -.endif - # These are last, since it is nice to at least get the base system # rebuilt before you do them. .if defined(LOCAL_DIRS) @@ -108,6 +106,10 @@ SUBDIR+= ${_DIR} .endfor .endif +.if defined(SUBDIR_OVERRIDE) +SUBDIR= ${SUBDIR_OVERRIDE} +.endif + .if defined(NOCLEANDIR) CLEANDIR= clean cleandepend .else @@ -239,7 +241,7 @@ INCDIRS= arpa dev fs g++/std isc isofs objc protocols \ # Attempt to rebuild the entire system, with reasonable chance of # success, regardless of how old your existing system is. # -buildworld: +_worldtmp: @echo @echo "--------------------------------------------------------------" @echo ">>> Rebuilding the temporary build tree" @@ -258,11 +260,13 @@ buildworld: mkdir -p ${WORLDTMP}/usr/include/${_dir} .endfor ln -sf ${.CURDIR}/sys ${WORLDTMP} +_bootstrap-tools: @echo @echo "--------------------------------------------------------------" @echo ">>> stage 1: bootstrap tools" @echo "--------------------------------------------------------------" cd ${.CURDIR}; ${BMAKE} bootstrap-tools +_cleanobj: .if !defined(NOCLEAN) @echo @echo "--------------------------------------------------------------" @@ -270,47 +274,62 @@ buildworld: @echo "--------------------------------------------------------------" cd ${.CURDIR}; ${WMAKE} ${CLEANDIR:S/^/par-/} .endif +_obj: @echo @echo "--------------------------------------------------------------" @echo ">>> stage 2: rebuilding the object tree" @echo "--------------------------------------------------------------" cd ${.CURDIR}; ${WMAKE} par-obj +_build-tools: @echo @echo "--------------------------------------------------------------" @echo ">>> stage 2: build tools" @echo "--------------------------------------------------------------" cd ${.CURDIR}; ${TMAKE} build-tools +_cross-tools: @echo @echo "--------------------------------------------------------------" @echo ">>> stage 3: cross tools" @echo "--------------------------------------------------------------" cd ${.CURDIR}; ${XMAKE} cross-tools +_includes: @echo @echo "--------------------------------------------------------------" @echo ">>> stage 4: populating ${WORLDTMP}/usr/include" @echo "--------------------------------------------------------------" cd ${.CURDIR}; ${WMAKE} SHARED=symlinks includes +_libraries: @echo @echo "--------------------------------------------------------------" @echo ">>> stage 4: building libraries" @echo "--------------------------------------------------------------" cd ${.CURDIR}; ${WMAKE} -DNOHTML -DNOINFO -DNOMAN -DNOFSCHG libraries +_depend: @echo @echo "--------------------------------------------------------------" @echo ">>> stage 4: make dependencies" @echo "--------------------------------------------------------------" cd ${.CURDIR}; ${WMAKE} par-depend +everything: @echo @echo "--------------------------------------------------------------" @echo ">>> stage 4: building everything.." @echo "--------------------------------------------------------------" cd ${.CURDIR}; ${WMAKE} all -everything: - @echo "--------------------------------------------------------------" - @echo ">>> Building everything.." - @echo "--------------------------------------------------------------" - cd ${.CURDIR}; ${WMAKE} all + +WMAKE_TGTS= +.if !defined(SUBDIR_OVERRIDE) +WMAKE_TGTS+= _worldtmp _bootstrap-tools +.endif +WMAKE_TGTS+= _cleanobj _obj _build-tools +.if !defined(SUBDIR_OVERRIDE) +WMAKE_TGTS+= _cross-tools +.endif +WMAKE_TGTS+= _includes _libraries _depend everything + +buildworld: ${WMAKE_TGTS} +.ORDER: ${WMAKE_TGTS} # # installcheck @@ -361,7 +380,7 @@ reinstall: @echo ">>> Installing everything.." @echo "--------------------------------------------------------------" cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install -.if !defined(NOMAN) +.if !defined(NOMAN) && !defined(NO_MAKEDB_RUN) @echo @echo "--------------------------------------------------------------" @echo ">>> Rebuilding man page indices" @@ -472,12 +491,9 @@ buildkernel: # # Install the kernel defined by INSTALLKERNEL # -installkernel: +installkernel reinstallkernel: cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \ - ${CROSSENV} ${MAKE} KERNEL=${INSTKERNNAME} install -reinstallkernel: - cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \ - ${CROSSENV} ${MAKE} KERNEL=${INSTKERNNAME} reinstall + ${CROSSENV} ${MAKE} KERNEL=${INSTKERNNAME} ${.TARGET:S/kernel$//} # # kernel diff --git a/etc/Makefile b/etc/Makefile index 986aa16d0a33..66ec5d923469 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -64,7 +64,9 @@ distribute: .if defined(OBJFORMAT) echo OBJFORMAT=${OBJFORMAT} > ${DISTDIR}/${DISTRIBUTION}/etc/objformat .endif - @echo + ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 444 \ + ${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints \ + ${DISTDIR}/${DISTRIBUTION}/boot/device.hints distribution: (cd ${.CURDIR}; \ diff --git a/gnu/usr.bin/perl/library/Makefile.inc b/gnu/usr.bin/perl/library/Makefile.inc index 6835a0aadaa5..fee144edc979 100644 --- a/gnu/usr.bin/perl/library/Makefile.inc +++ b/gnu/usr.bin/perl/library/Makefile.inc @@ -27,16 +27,10 @@ ext/${MODULEDIR}/Makefile: scripts INST_ARCHLIB=${.OBJDIR}/build/${MODULEDIR}; \ make -B config PERL_SRC=${.OBJDIR} -install: +realinstall: @cd ${.OBJDIR}/ext/${MODULEDIR} ;\ make -B install \ INSTALLPRIVLIB=${DESTDIR}/usr/libdata/perl/${VERSION} \ INSTALLARCHLIB=${DESTDIR}/usr/libdata/perl/${VERSION}/mach -distribute: - @cd ${.OBJDIR}/ext/${MODULEDIR} ;\ - make -B install DESTDIR=${DISTDIR}/${dist} SHARED=copies \ - INSTALLPRIVLIB=${DESTDIR}/usr/libdata/perl/${VERSION} \ - INSTALLARCHLIB=${DESTDIR}/usr/libdata/perl/${VERSION}/mach - .PATH: ${PERL5SRC} diff --git a/kerberos5/Makefile b/kerberos5/Makefile index 1648d0f9a6eb..673192e2231b 100644 --- a/kerberos5/Makefile +++ b/kerberos5/Makefile @@ -2,26 +2,29 @@ SUBDIR= lib libexec usr.bin usr.sbin -SDIR= ${.CURDIR}/../secure +# These are the programs which depend on Kerberos. +KPROGS= secure/usr.bin/ssh secure/usr.sbin/sshd -bootstrap: cleandir obj depend all install kprog +# This target is used to rebuild these programs WITH Kerberos. +kerberize: +.for entry in ${KPROGS} + cd ${.CURDIR}/../${entry}; \ + ${MAKE} ${MFLAGS} -DMAKE_KERBEROS5 cleandir; \ + ${MAKE} ${MFLAGS} -DMAKE_KERBEROS5 obj; \ + ${MAKE} ${MFLAGS} -DMAKE_KERBEROS5 depend; \ + ${MAKE} ${MFLAGS} -DMAKE_KERBEROS5 all; \ + ${MAKE} ${MFLAGS} -DMAKE_KERBEROS5 install +.endfor -help-distribute: distribute - -CODAI= ${MAKE} ${MFLAGS} MAKE_KERBEROS5=yes cleandir && \ - ${MAKE} ${MFLAGS} MAKE_KERBEROS5=yes obj && \ - ${MAKE} ${MFLAGS} MAKE_KERBEROS5=yes depend all install - -CODAD= ${MAKE} ${MFLAGS} MAKE_KERBEROS5=yes cleandir && \ - ${MAKE} ${MFLAGS} MAKE_KERBEROS5=yes obj && \ - ${MAKE} ${MFLAGS} MAKE_KERBEROS5=yes depend all distribute - -kprog: - cd ${SDIR}/usr.bin/ssh; ${CODAI} - cd ${SDIR}/usr.sbin/sshd; ${CODAI} - -help-distribute: distribute - cd ${SDIR}/usr.bin/ssh; ${CODAD} - cd ${SDIR}/usr.sbin/sshd; ${CODAD} +# This target is used to rebuild these programs WITHOUT Kerberos. +dekerberize: +.for entry in ${KPROGS} + cd ${.CURDIR}/../${entry}; \ + ${MAKE} ${MFLAGS} cleandir; \ + ${MAKE} ${MFLAGS} obj; \ + ${MAKE} ${MFLAGS} depend; \ + ${MAKE} ${MFLAGS} all; \ + ${MAKE} ${MFLAGS} install +.endfor .include diff --git a/kerberos5/Makefile.inc b/kerberos5/Makefile.inc index 447a53dd2b3a..882c268b8d5a 100644 --- a/kerberos5/Makefile.inc +++ b/kerberos5/Makefile.inc @@ -1,8 +1,6 @@ # $FreeBSD$ -.if !defined(DISTRIBUTION) - -DISTRIBUTION= krb5 +DISTRIBUTION?= krb5 .if !defined(INCLUDEOBJDIR) @@ -14,8 +12,7 @@ TELNETDIR= ${.CURDIR}/../../../crypto/telnet CFLAGS+=-Wall -I${INCLUDEDIR} -I${INCLUDEOBJDIR} -DHAVE_CONFIG_H -.if defined(MAKE_KERBEROS4) && \ - (${MAKE_KERBEROS4} == "YES" || ${MAKE_KERBEROS4} == "yes") +.if defined(MAKE_KERBEROS4) CFLAGS+=-DKRB5_KRB4_COMPAT -DKRB4 .endif @@ -177,5 +174,3 @@ KRB5DIR= ${.CURDIR}/../../crypto/heimdal ROKENDIR= ${.CURDIR}/../../lib/libroken .endif - -.endif diff --git a/kerberos5/lib/Makefile b/kerberos5/lib/Makefile index c0d5cab9df14..f34d30e6dc37 100644 --- a/kerberos5/lib/Makefile +++ b/kerberos5/lib/Makefile @@ -1,8 +1,7 @@ # $FreeBSD$ SUBDIR= libroken libvers libasn1 libhdb libkrb5 libkadm5clnt libkadm5srv libsl libgssapi -.if defined(MAKE_KERBEROS4) && \ - (${MAKE_KERBEROS4} == "YES" || ${MAKE_KERBEROS4} == "yes") +.if defined(MAKE_KERBEROS4) SUBDIR+=libkafs5 .endif SUBDIR+=libtelnet diff --git a/kerberos5/lib/libkrb5/Makefile b/kerberos5/lib/libkrb5/Makefile index 3c347aa71849..fd58464def9e 100644 --- a/kerberos5/lib/libkrb5/Makefile +++ b/kerberos5/lib/libkrb5/Makefile @@ -8,8 +8,7 @@ CFLAGS+=-I${KRB5DIR}/lib/krb5 \ -I${KRB5DIR}/include \ -I${KRB5OBJDIR} \ -I${ASN1OBJDIR} -.if defined(MAKE_KERBEROS4) && \ - (${MAKE_KERBEROS4} == "YES" || ${MAKE_KERBEROS4} == "yes") +.if defined(MAKE_KERBEROS4) CFLAGS+=-I${KRB4DIR}/include .endif SRCS= \ diff --git a/kerberos5/libexec/hprop/Makefile b/kerberos5/libexec/hprop/Makefile index eecbe84d0c18..a49f27bd2141 100644 --- a/kerberos5/libexec/hprop/Makefile +++ b/kerberos5/libexec/hprop/Makefile @@ -12,8 +12,7 @@ CFLAGS+= -I${KRB5DIR}/include \ -I${ASN1OBJDIR} \ -I${HDBOBJDIR} \ -I${.OBJDIR} -.if defined(MAKE_KERBEROS4) && \ - (${MAKE_KERBEROS4} == "YES" || ${MAKE_KERBEROS4} == "yes") +.if defined(MAKE_KERBEROS4) _krb4libs= -lkrb -lkafs -lkdb _krb4deps= ${LIBKRB} ${LIBKAFS} ${LIBKDB} .endif diff --git a/kerberos5/libexec/hpropd/Makefile b/kerberos5/libexec/hpropd/Makefile index 0197478132c7..6fcdf8d09bdc 100644 --- a/kerberos5/libexec/hpropd/Makefile +++ b/kerberos5/libexec/hpropd/Makefile @@ -12,8 +12,7 @@ CFLAGS+= -I${KRB5DIR}/include \ -I${ASN1OBJDIR} \ -I${HDBOBJDIR} \ -I${.OBJDIR} -.if defined(MAKE_KERBEROS4) && \ - (${MAKE_KERBEROS4} == "YES" || ${MAKE_KERBEROS4} == "yes") +.if defined(MAKE_KERBEROS4) _krb4libs= -lkrb -lkafs -lkdb _krb4deps= ${LIBKRB} ${LIBKAFS} ${LIBKDB} .endif diff --git a/kerberos5/libexec/ipropd-master/Makefile b/kerberos5/libexec/ipropd-master/Makefile index c692972dae33..eae62ee26841 100644 --- a/kerberos5/libexec/ipropd-master/Makefile +++ b/kerberos5/libexec/ipropd-master/Makefile @@ -12,8 +12,7 @@ CFLAGS+= -I${KRB5DIR}/include \ -I${ASN1OBJDIR} \ -I${HDBOBJDIR} \ -I${.OBJDIR} -.if defined(MAKE_KERBEROS4) && \ - (${MAKE_KERBEROS4} == "YES" || ${MAKE_KERBEROS4} == "yes") +.if defined(MAKE_KERBEROS4) _krb4libs= -lkrb -lkafs _krb4deps= ${LIBKRB} ${LIBKAFS} .endif diff --git a/kerberos5/libexec/ipropd-slave/Makefile b/kerberos5/libexec/ipropd-slave/Makefile index b7220ae5c16c..9ad1c460508b 100644 --- a/kerberos5/libexec/ipropd-slave/Makefile +++ b/kerberos5/libexec/ipropd-slave/Makefile @@ -12,8 +12,7 @@ CFLAGS+= -I${KRB5DIR}/include \ -I${ASN1OBJDIR} \ -I${HDBOBJDIR} \ -I${.OBJDIR} -.if defined(MAKE_KERBEROS4) && \ - (${MAKE_KERBEROS4} == "YES" || ${MAKE_KERBEROS4} == "yes") +.if defined(MAKE_KERBEROS4) _krb4libs= -lkrb -lkafs _krb4deps= ${LIBKRB} ${LIBKAFS} .endif diff --git a/kerberos5/libexec/k5admind/Makefile b/kerberos5/libexec/k5admind/Makefile index fe56f8dc9f98..c4b41cbf02af 100644 --- a/kerberos5/libexec/k5admind/Makefile +++ b/kerberos5/libexec/k5admind/Makefile @@ -14,8 +14,7 @@ CFLAGS+= -I${KRB5DIR}/include \ -I${ASN1OBJDIR} \ -I${HDBOBJDIR} \ -I${.OBJDIR} -.if defined(MAKE_KERBEROS4) && \ - (${MAKE_KERBEROS4} == "YES" || ${MAKE_KERBEROS4} == "yes") +.if defined(MAKE_KERBEROS4) SRCS+= version4.c _krb4libs= -lkrb -lkafs _krb4deps= ${LIBKRB} ${LIBKAFS} diff --git a/kerberos5/libexec/k5passwdd/Makefile b/kerberos5/libexec/k5passwdd/Makefile index 0878e6b220ec..3e0596dd677f 100644 --- a/kerberos5/libexec/k5passwdd/Makefile +++ b/kerberos5/libexec/k5passwdd/Makefile @@ -13,8 +13,7 @@ CFLAGS+= -I${KRB5DIR}/include \ -I${ASN1OBJDIR} \ -I${HDBOBJDIR} \ -I${.OBJDIR} -.if defined(MAKE_KERBEROS4) && \ - (${MAKE_KERBEROS4} == "YES" || ${MAKE_KERBEROS4} == "yes") +.if defined(MAKE_KERBEROS4) _krb4libs= -lkrb -lkafs _krb4deps= ${LIBKRB} ${LIBKAFS} .endif diff --git a/kerberos5/libexec/kadmind/Makefile b/kerberos5/libexec/kadmind/Makefile index fe56f8dc9f98..c4b41cbf02af 100644 --- a/kerberos5/libexec/kadmind/Makefile +++ b/kerberos5/libexec/kadmind/Makefile @@ -14,8 +14,7 @@ CFLAGS+= -I${KRB5DIR}/include \ -I${ASN1OBJDIR} \ -I${HDBOBJDIR} \ -I${.OBJDIR} -.if defined(MAKE_KERBEROS4) && \ - (${MAKE_KERBEROS4} == "YES" || ${MAKE_KERBEROS4} == "yes") +.if defined(MAKE_KERBEROS4) SRCS+= version4.c _krb4libs= -lkrb -lkafs _krb4deps= ${LIBKRB} ${LIBKAFS} diff --git a/kerberos5/libexec/kdc/Makefile b/kerberos5/libexec/kdc/Makefile index 001d77aaad5e..d1e1c24622ec 100644 --- a/kerberos5/libexec/kdc/Makefile +++ b/kerberos5/libexec/kdc/Makefile @@ -20,8 +20,7 @@ CFLAGS+= -I${KRB5DIR}/include \ -I${ASN1OBJDIR} \ -I${HDBOBJDIR} \ -I${.OBJDIR} -.if defined(MAKE_KERBEROS4) && \ - (${MAKE_KERBEROS4} == "YES" || ${MAKE_KERBEROS4} == "yes") +.if defined(MAKE_KERBEROS4) SRCS+= 524.c kerberos4.c kaserver.c rx.h _krb4libs= -lkrb -lkafs _krb4deps= ${LIBKRB} ${LIBKAFS} diff --git a/kerberos5/libexec/kpasswdd/Makefile b/kerberos5/libexec/kpasswdd/Makefile index 0878e6b220ec..3e0596dd677f 100644 --- a/kerberos5/libexec/kpasswdd/Makefile +++ b/kerberos5/libexec/kpasswdd/Makefile @@ -13,8 +13,7 @@ CFLAGS+= -I${KRB5DIR}/include \ -I${ASN1OBJDIR} \ -I${HDBOBJDIR} \ -I${.OBJDIR} -.if defined(MAKE_KERBEROS4) && \ - (${MAKE_KERBEROS4} == "YES" || ${MAKE_KERBEROS4} == "yes") +.if defined(MAKE_KERBEROS4) _krb4libs= -lkrb -lkafs _krb4deps= ${LIBKRB} ${LIBKAFS} .endif diff --git a/kerberos5/usr.bin/k5admin/Makefile b/kerberos5/usr.bin/k5admin/Makefile index b9d7fc2086d2..6f2f13dcc447 100644 --- a/kerberos5/usr.bin/k5admin/Makefile +++ b/kerberos5/usr.bin/k5admin/Makefile @@ -33,8 +33,7 @@ CFLAGS+= -I${KRB5DIR}/include \ -I${ASN1OBJDIR} \ -I${HDBOBJDIR} \ -I${.OBJDIR} -.if defined(MAKE_KERBEROS4) && \ - (${MAKE_KERBEROS4} == "YES" || ${MAKE_KERBEROS4} == "yes") +.if defined(MAKE_KERBEROS4) _krb4libs= -lkrb -lkafs _krb4deps= ${LIBKRB} ${LIBKAFS} .endif diff --git a/kerberos5/usr.bin/k5destroy/Makefile b/kerberos5/usr.bin/k5destroy/Makefile index c504e832acec..9d823afbbd3b 100644 --- a/kerberos5/usr.bin/k5destroy/Makefile +++ b/kerberos5/usr.bin/k5destroy/Makefile @@ -10,8 +10,7 @@ CFLAGS+= -I${KRB5DIR}/include \ -I${KRB5DIR}/kuser \ -I${ASN1OBJDIR} \ -I${.OBJDIR} -.if defined(MAKE_KERBEROS4) && \ - (${MAKE_KERBEROS4} == "YES" || ${MAKE_KERBEROS4} == "yes") +.if defined(MAKE_KERBEROS4) _krb4libs= -lkrb -lkafs _krb4deps= ${LIBKRB} ${LIBKAFS} .endif diff --git a/kerberos5/usr.bin/k5init/Makefile b/kerberos5/usr.bin/k5init/Makefile index 9664d5d67b5b..8ccdf87a3c00 100644 --- a/kerberos5/usr.bin/k5init/Makefile +++ b/kerberos5/usr.bin/k5init/Makefile @@ -11,8 +11,7 @@ CFLAGS+= -I${KRB5DIR}/include \ -I${KRB5DIR}/kuser \ -I${ASN1OBJDIR} \ -I${.OBJDIR} -.if defined(MAKE_KERBEROS4) && \ - (${MAKE_KERBEROS4} == "YES" || ${MAKE_KERBEROS4} == "yes") +.if defined(MAKE_KERBEROS4) _krb4libs= -L${KAFS5OBJDIR} -lkafs5 -lkrb -lkafs _krb4deps= ${LIBKAFS5} ${LIBKRB} ${LIBKAFS} .endif diff --git a/kerberos5/usr.bin/k5list/Makefile b/kerberos5/usr.bin/k5list/Makefile index 3e260572802d..ec7b8f9a8f2e 100644 --- a/kerberos5/usr.bin/k5list/Makefile +++ b/kerberos5/usr.bin/k5list/Makefile @@ -10,8 +10,7 @@ CFLAGS+= -I${KRB5DIR}/include \ -I${KRB5DIR}/kuser \ -I${ASN1OBJDIR} \ -I${.OBJDIR} -.if defined(MAKE_KERBEROS4) && \ - (${MAKE_KERBEROS4} == "YES" || ${MAKE_KERBEROS4} == "yes") +.if defined(MAKE_KERBEROS4) _krb4libs= -lkrb -lkafs _krb4deps= ${LIBKRB} ${LIBKAFS} .endif diff --git a/kerberos5/usr.bin/k5passwd/Makefile b/kerberos5/usr.bin/k5passwd/Makefile index 50f4400ecde5..79426338151d 100644 --- a/kerberos5/usr.bin/k5passwd/Makefile +++ b/kerberos5/usr.bin/k5passwd/Makefile @@ -9,8 +9,7 @@ CFLAGS+= -I${KRB5DIR}/include \ -I${KRB5DIR}/kpasswd \ -I${ASN1OBJDIR} \ -I${.OBJDIR} -.if defined(MAKE_KERBEROS4) && \ - (${MAKE_KERBEROS4} == "YES" || ${MAKE_KERBEROS4} == "yes") +.if defined(MAKE_KERBEROS4) _krb4libs= -lkrb -lkafs _krb4deps= ${LIBKRB} ${LIBKAFS} .endif diff --git a/kerberos5/usr.bin/k5su/Makefile b/kerberos5/usr.bin/k5su/Makefile index 0ec631471a64..a9303ef6b1a5 100644 --- a/kerberos5/usr.bin/k5su/Makefile +++ b/kerberos5/usr.bin/k5su/Makefile @@ -11,8 +11,7 @@ CFLAGS+= -I${KRB5DIR}/include \ -I${ASN1OBJDIR} \ -I${.OBJDIR} NOMAN= true -.if defined(MAKE_KERBEROS4) && \ - (${MAKE_KERBEROS4} == "YES" || ${MAKE_KERBEROS4} == "yes") +.if defined(MAKE_KERBEROS4) _krb4libs= -L${KAFS5OBJDIR} -lkafs -lkrb -lkafs5 _krb4deps= ${LIBKAFS5} ${LIBKRB} ${LIBKAFS} .endif diff --git a/kerberos5/usr.bin/kadmin/Makefile b/kerberos5/usr.bin/kadmin/Makefile index b9d7fc2086d2..6f2f13dcc447 100644 --- a/kerberos5/usr.bin/kadmin/Makefile +++ b/kerberos5/usr.bin/kadmin/Makefile @@ -33,8 +33,7 @@ CFLAGS+= -I${KRB5DIR}/include \ -I${ASN1OBJDIR} \ -I${HDBOBJDIR} \ -I${.OBJDIR} -.if defined(MAKE_KERBEROS4) && \ - (${MAKE_KERBEROS4} == "YES" || ${MAKE_KERBEROS4} == "yes") +.if defined(MAKE_KERBEROS4) _krb4libs= -lkrb -lkafs _krb4deps= ${LIBKRB} ${LIBKAFS} .endif diff --git a/kerberos5/usr.bin/kdestroy/Makefile b/kerberos5/usr.bin/kdestroy/Makefile index c504e832acec..9d823afbbd3b 100644 --- a/kerberos5/usr.bin/kdestroy/Makefile +++ b/kerberos5/usr.bin/kdestroy/Makefile @@ -10,8 +10,7 @@ CFLAGS+= -I${KRB5DIR}/include \ -I${KRB5DIR}/kuser \ -I${ASN1OBJDIR} \ -I${.OBJDIR} -.if defined(MAKE_KERBEROS4) && \ - (${MAKE_KERBEROS4} == "YES" || ${MAKE_KERBEROS4} == "yes") +.if defined(MAKE_KERBEROS4) _krb4libs= -lkrb -lkafs _krb4deps= ${LIBKRB} ${LIBKAFS} .endif diff --git a/kerberos5/usr.bin/kinit/Makefile b/kerberos5/usr.bin/kinit/Makefile index 9664d5d67b5b..8ccdf87a3c00 100644 --- a/kerberos5/usr.bin/kinit/Makefile +++ b/kerberos5/usr.bin/kinit/Makefile @@ -11,8 +11,7 @@ CFLAGS+= -I${KRB5DIR}/include \ -I${KRB5DIR}/kuser \ -I${ASN1OBJDIR} \ -I${.OBJDIR} -.if defined(MAKE_KERBEROS4) && \ - (${MAKE_KERBEROS4} == "YES" || ${MAKE_KERBEROS4} == "yes") +.if defined(MAKE_KERBEROS4) _krb4libs= -L${KAFS5OBJDIR} -lkafs5 -lkrb -lkafs _krb4deps= ${LIBKAFS5} ${LIBKRB} ${LIBKAFS} .endif diff --git a/kerberos5/usr.bin/klist/Makefile b/kerberos5/usr.bin/klist/Makefile index 3e260572802d..ec7b8f9a8f2e 100644 --- a/kerberos5/usr.bin/klist/Makefile +++ b/kerberos5/usr.bin/klist/Makefile @@ -10,8 +10,7 @@ CFLAGS+= -I${KRB5DIR}/include \ -I${KRB5DIR}/kuser \ -I${ASN1OBJDIR} \ -I${.OBJDIR} -.if defined(MAKE_KERBEROS4) && \ - (${MAKE_KERBEROS4} == "YES" || ${MAKE_KERBEROS4} == "yes") +.if defined(MAKE_KERBEROS4) _krb4libs= -lkrb -lkafs _krb4deps= ${LIBKRB} ${LIBKAFS} .endif diff --git a/kerberos5/usr.bin/kpasswd/Makefile b/kerberos5/usr.bin/kpasswd/Makefile index 50f4400ecde5..79426338151d 100644 --- a/kerberos5/usr.bin/kpasswd/Makefile +++ b/kerberos5/usr.bin/kpasswd/Makefile @@ -9,8 +9,7 @@ CFLAGS+= -I${KRB5DIR}/include \ -I${KRB5DIR}/kpasswd \ -I${ASN1OBJDIR} \ -I${.OBJDIR} -.if defined(MAKE_KERBEROS4) && \ - (${MAKE_KERBEROS4} == "YES" || ${MAKE_KERBEROS4} == "yes") +.if defined(MAKE_KERBEROS4) _krb4libs= -lkrb -lkafs _krb4deps= ${LIBKRB} ${LIBKAFS} .endif diff --git a/kerberos5/usr.bin/ksu/Makefile b/kerberos5/usr.bin/ksu/Makefile index 0ec631471a64..a9303ef6b1a5 100644 --- a/kerberos5/usr.bin/ksu/Makefile +++ b/kerberos5/usr.bin/ksu/Makefile @@ -11,8 +11,7 @@ CFLAGS+= -I${KRB5DIR}/include \ -I${ASN1OBJDIR} \ -I${.OBJDIR} NOMAN= true -.if defined(MAKE_KERBEROS4) && \ - (${MAKE_KERBEROS4} == "YES" || ${MAKE_KERBEROS4} == "yes") +.if defined(MAKE_KERBEROS4) _krb4libs= -L${KAFS5OBJDIR} -lkafs -lkrb -lkafs5 _krb4deps= ${LIBKAFS5} ${LIBKRB} ${LIBKAFS} .endif diff --git a/kerberos5/usr.sbin/k5stash/Makefile b/kerberos5/usr.sbin/k5stash/Makefile index f4bd8bfd4691..707bf93f3e8b 100644 --- a/kerberos5/usr.sbin/k5stash/Makefile +++ b/kerberos5/usr.sbin/k5stash/Makefile @@ -11,8 +11,7 @@ CFLAGS+= -I${KRB5DIR}/include \ -I${ASN1OBJDIR} \ -I${HDBOBJDIR} \ -I${.OBJDIR} -.if defined(MAKE_KERBEROS4) && \ - (${MAKE_KERBEROS4} == "YES" || ${MAKE_KERBEROS4} == "yes") +.if defined(MAKE_KERBEROS4) _krb4libs= -lkrb -lkafs _krb4deps= ${LIBKRB} ${LIBKAFS} .endif diff --git a/kerberos5/usr.sbin/kstash/Makefile b/kerberos5/usr.sbin/kstash/Makefile index f4bd8bfd4691..707bf93f3e8b 100644 --- a/kerberos5/usr.sbin/kstash/Makefile +++ b/kerberos5/usr.sbin/kstash/Makefile @@ -11,8 +11,7 @@ CFLAGS+= -I${KRB5DIR}/include \ -I${ASN1OBJDIR} \ -I${HDBOBJDIR} \ -I${.OBJDIR} -.if defined(MAKE_KERBEROS4) && \ - (${MAKE_KERBEROS4} == "YES" || ${MAKE_KERBEROS4} == "yes") +.if defined(MAKE_KERBEROS4) _krb4libs= -lkrb -lkafs _krb4deps= ${LIBKRB} ${LIBKAFS} .endif diff --git a/kerberos5/usr.sbin/ktutil/Makefile b/kerberos5/usr.sbin/ktutil/Makefile index d4976e060757..96ad7df84eb1 100644 --- a/kerberos5/usr.sbin/ktutil/Makefile +++ b/kerberos5/usr.sbin/ktutil/Makefile @@ -25,8 +25,7 @@ CFLAGS+= -I${KRB5DIR}/include \ -I${KRB5DIR}/admin \ -I${ASN1OBJDIR} \ -I${.OBJDIR} -.if defined(MAKE_KERBEROS4) && \ - (${MAKE_KERBEROS4} == "YES" || ${MAKE_KERBEROS4} == "yes") +.if defined(MAKE_KERBEROS4) _krb4libs= -lkrb -lkafs _krb4deps= ${LIBKRB} ${LIBKAFS} .endif diff --git a/kerberosIV/Makefile b/kerberosIV/Makefile index 9c962efbb200..e3681558e2d1 100644 --- a/kerberosIV/Makefile +++ b/kerberosIV/Makefile @@ -4,68 +4,33 @@ MAINTAINER= markm@FreeBSD.org SUBDIR= include lib libexec usr.bin usr.sbin -SDIR= ${.CURDIR}/.. +# These are the programs which depend on Kerberos. +KPROGS= bin/rcp libexec/ftpd libexec/rlogind libexec/rshd \ + sbin/dump sbin/restore usr.bin/login usr.bin/passwd \ + usr.bin/rlogin usr.bin/rsh usr.bin/su +# kerberosIV'ed cvs is broken +#KPROGS+=gnu/usr.bin/cvs -CODAI= ${MAKE} ${MFLAGS} MAKE_KERBEROS4=yes cleandir && \ - ${MAKE} ${MFLAGS} MAKE_KERBEROS4=yes obj && \ - ${MAKE} ${MFLAGS} MAKE_KERBEROS4=yes depend all install +# This target is used to rebuild these programs WITH Kerberos. +kerberize: +.for entry in ${KPROGS} + cd ${.CURDIR}/../${entry}; \ + ${MAKE} ${MFLAGS} -DMAKE_KERBEROS4 cleandir; \ + ${MAKE} ${MFLAGS} -DMAKE_KERBEROS4 obj; \ + ${MAKE} ${MFLAGS} -DMAKE_KERBEROS4 depend; \ + ${MAKE} ${MFLAGS} -DMAKE_KERBEROS4 all; \ + ${MAKE} ${MFLAGS} -DMAKE_KERBEROS4 install +.endfor -CODAIN= ${MAKE} ${MFLAGS} cleandir && \ - ${MAKE} ${MFLAGS} obj && \ - ${MAKE} ${MFLAGS} depend all install - -CODAD= ${MAKE} ${MFLAGS} MAKE_KERBEROS4=yes cleandir && \ - ${MAKE} ${MFLAGS} MAKE_KERBEROS4=yes obj && \ - ${MAKE} ${MFLAGS} MAKE_KERBEROS4=yes depend all distribute - -# These are the programs which depend on kerberos -kprog: - cd ${SDIR}/bin/rcp; ${CODAI} - echo "WARNING: kerberosIV'ed cvs broken" - #cd ${SDIR}/gnu/usr.bin/cvs; ${CODAI} - cd ${SDIR}/libexec/ftpd; ${CODAI} - cd ${SDIR}/libexec/rlogind; ${CODAI} - cd ${SDIR}/libexec/rshd; ${CODAI} - cd ${SDIR}/usr.bin/login; ${CODAI} - cd ${SDIR}/usr.bin/passwd; ${CODAI} - cd ${SDIR}/usr.bin/rlogin; ${CODAI} - cd ${SDIR}/usr.bin/rsh; ${CODAI} - cd ${SDIR}/usr.bin/su; ${CODAI} - cd ${SDIR}/sbin/dump; ${CODAI} - cd ${SDIR}/sbin/restore; ${CODAI} - -# These are the programs which depend on kerberos -# This target us used to rebuild these programs WITHOUT kerberos -dekerberise: - cd ${SDIR}/bin/rcp; ${CODAIN} - echo "WARNING: kerberosIV'ed cvs broken" - #cd ${SDIR}/gnu/usr.bin/cvs; ${CODAIN} - cd ${SDIR}/libexec/ftpd; ${CODAIN} - cd ${SDIR}/libexec/rlogind; ${CODAIN} - cd ${SDIR}/libexec/rshd; ${CODAIN} - cd ${SDIR}/usr.bin/login; ${CODAIN} - cd ${SDIR}/usr.bin/passwd; ${CODAIN} - cd ${SDIR}/usr.bin/rlogin; ${CODAIN} - cd ${SDIR}/usr.bin/rsh; ${CODAIN} - cd ${SDIR}/usr.bin/su; ${CODAIN} - cd ${SDIR}/sbin/dump; ${CODAIN} - cd ${SDIR}/sbin/restore; ${CODAIN} - -bootstrap: cleandir obj depend all install kprog - -help-distribute: distribute - cd ${SDIR}/bin/rcp; ${CODAD} - echo "WARNING: kerberosIV'ed cvs broken" - #cd ${SDIR}/gnu/usr.bin/cvs; ${CODAD} - cd ${SDIR}/libexec/ftpd; ${CODAD} - cd ${SDIR}/libexec/rlogind; ${CODAD} - cd ${SDIR}/libexec/rshd; ${CODAD} - cd ${SDIR}/usr.bin/login; ${CODAD} - cd ${SDIR}/usr.bin/passwd; ${CODAD} - cd ${SDIR}/usr.bin/rlogin; ${CODAD} - cd ${SDIR}/usr.bin/rsh; ${CODAD} - cd ${SDIR}/usr.bin/su; ${CODAD} - cd ${SDIR}/sbin/dump; ${CODAD} - cd ${SDIR}/sbin/restore; ${CODAD} +# This target is used to rebuild these programs WITHOUT Kerberos. +dekerberize: +.for entry in ${KPROGS} + cd ${.CURDIR}/../${entry}; \ + ${MAKE} ${MFLAGS} cleandir; \ + ${MAKE} ${MFLAGS} obj; \ + ${MAKE} ${MFLAGS} depend; \ + ${MAKE} ${MFLAGS} all; \ + ${MAKE} ${MFLAGS} install +.endfor .include diff --git a/kerberosIV/Makefile.inc b/kerberosIV/Makefile.inc index e41579265309..d21105cb9855 100644 --- a/kerberosIV/Makefile.inc +++ b/kerberosIV/Makefile.inc @@ -1,8 +1,6 @@ # $FreeBSD$ -.if !defined(DISTRIBUTION) - -DISTRIBUTION= krb4 +DISTRIBUTION?= krb4 .if !defined(INCLUDEOBJDIR) @@ -106,5 +104,3 @@ beforeinstall: ${INCLUDES} KRB4DIR= ${.CURDIR}/../../crypto/kerberosIV .endif - -.endif diff --git a/release/Makefile b/release/Makefile index 4795be4c0365..ffbe74a13d77 100644 --- a/release/Makefile +++ b/release/Makefile @@ -46,8 +46,6 @@ PORTSRELEASETAG?= ${AUXRELEASETAG} .endif .endif -KERNCONF?=GENERIC - # If you want to pass flags to the world build such as -j X, use # WORLD_FLAGS. Similarly, you can specify make flags for kernel # builds via KERNEL_FLAGS. @@ -129,11 +127,10 @@ COMPAT_DISTS?= compat1x compat20 compat21 compat22 compat3x compat4x .else COMPAT_DISTS?= compat4x .endif -OTHER_DISTS?= catpages manpages games proflibs dict info doc +OTHER_DISTS?= games catpages manpages proflibs dict info doc CRYPTO_DISTS?= crypto krb4 krb5 BASE_DISTS?= base DISTRIBUTIONS?= ${BASE_DISTS} ${OTHER_DISTS} ${COMPAT_DISTS} ${CRYPTO_DISTS} -KERNELS?= GENERIC BOOT1= etc/defaults/rc.conf @@ -185,6 +182,10 @@ BIGBOOTLABEL= minimum2 ZIPNSPLIT= gzip --no-name -9 -c | split -b 240640 - +# Things that need to be recompiled with Kerberos support. +K4PROGS!= cd ${.CURDIR}/../kerberosIV; ${MAKE} -V KPROGS +K5PROGS!= cd ${.CURDIR}/../kerberos5; ${MAKE} -V KPROGS + # Things that need to be compiled without crypto support in releases .if !defined(FIXCRYPTO) FIXCRYPTO= bin/ed usr.sbin/ppp usr.sbin/pppd usr.sbin/tcpdump/tcpdump @@ -244,6 +245,9 @@ MAKEREADMES= make readmes PORTSDIR=${CHROOTDIR}/usr/ports MAKEREADMES= true .endif +WMAKEENV!= cd ${.CURDIR}/..; ${MAKE} -f Makefile.inc1 -V WMAKEENV +WMAKE= ${WMAKEENV} ${MAKE} + rerelease release: .if !defined(CHROOTDIR) || !defined(BUILDNAME) || !defined(CVSROOT) @echo "To make a release you must set CHROOTDIR, BUILDNAME and CVSROOT" && false @@ -263,13 +267,12 @@ rerelease release: .endif mkdir -p ${CHROOTDIR} @echo ">>> make release started on `LC_ALL=C TZ=GMT date`" - cd ${.CURDIR}/../etc && ${MAKE} distrib-dirs DESTDIR=${CHROOTDIR} + cd ${.CURDIR}/.. && ${MAKE} -DNOGAMES -DNOHTML -DNOINFO -DNOMAN \ + -DNOPROFILE installworld DESTDIR=${CHROOTDIR} cd ${.CURDIR}/../etc && ${MAKE} distribution DESTDIR=${CHROOTDIR} if [ -f /etc/resolv.conf ]; then \ cp -p /etc/resolv.conf ${CHROOTDIR}/etc; \ fi - cd ${.CURDIR}/.. && ${MAKE} -DNOHTML -DNOINFO -DNOMAN installworld \ - DESTDIR=${CHROOTDIR} mkdir ${CHROOTDIR}/${BOOTSTRAPDIR} for i in ${BOOTSTRAPUTILS} ; do \ cp -p ${CHROOTDIR}$$i ${CHROOTDIR}/${BOOTSTRAPDIR} ; \ @@ -316,7 +319,7 @@ rerelease release: .if make(rerelease) .if !defined(RELEASENOUPDATE) .if !defined(RELEASETAG) - cd ${CHROOTDIR}/usr/src && cvs -R -q update -P -d + cd ${CHROOTDIR}/usr/src && cvs -R -q update -P -d -A .else cd ${CHROOTDIR}/usr/src && cvs -R -q update -P -d -r ${RELEASETAG} .endif @@ -381,6 +384,9 @@ rerelease release: .if defined(BOOT_CONFIG) echo "export BOOT_CONFIG=\"${BOOT_CONFIG}\"">> ${CHROOTDIR}/mk .endif +.if defined(WORLD_FLAGS) + echo "export WORLD_FLAGS=\"${WORLD_FLAGS}\"" >> ${CHROOTDIR}/mk +.endif .if defined(KERNEL_FLAGS) echo "export KERNEL_FLAGS=\"${KERNEL_FLAGS}\"" >> ${CHROOTDIR}/mk .endif @@ -393,11 +399,10 @@ rerelease release: echo "if [ ! -f /tmp/.world_done ]; then" >> ${CHROOTDIR}/mk echo " cd /usr/src" >> ${CHROOTDIR}/mk .if make(release) - echo " (cd etc; make distrib-dirs distribution)" >> ${CHROOTDIR}/mk - echo " make ${WORLD_FLAGS} world && \\" >> ${CHROOTDIR}/mk + echo " make ${WORLD_FLAGS} buildworld && \\" >> ${CHROOTDIR}/mk .endif .if make(rerelease) - echo " make ${WORLD_FLAGS} -DNOCLEAN world && \\" >> ${CHROOTDIR}/mk + echo " make ${WORLD_FLAGS} -DNOCLEAN buildworld && \\" >> ${CHROOTDIR}/mk .endif echo " touch /tmp/.world_done" >> ${CHROOTDIR}/mk echo "fi" >> ${CHROOTDIR}/mk @@ -420,11 +425,9 @@ release.1: mkdir ${RD} mkdir ${RD}/floppies mkdir ${RD}/trees - mkdir ${RD}/dists mkdir ${RD}/kernels for i in ${DISTRIBUTIONS} ; do \ mkdir ${RD}/trees/$$i && \ - mkdir ${RD}/dists/$$i && \ mtree -deU -f ${MTREEFILES}/BSD.root.dist \ -p ${RD}/trees/$$i > /dev/null && \ mtree -deU -f ${MTREEFILES}/BSD.usr.dist \ @@ -440,19 +443,22 @@ release.1: release.2: cd ${.CURDIR}/../etc && make distrib-dirs DESTDIR=${RD}/trees/base cd ${.CURDIR}/.. && make distribworld DISTDIR=${RD}/trees + # Handle some grief caused by the munition braindeadness. + cd ${.CURDIR}/..; \ + ${MAKE} ${WORLD_FLAGS} -DNO_MAKEDB_RUN -DNOCRYPT \ + SUBDIR_OVERRIDE="${FIXCRYPTO}" \ + buildworld distribworld DISTDIR=${RD}/trees .if exists(${.CURDIR}/../kerberosIV) && exists(${.CURDIR}/../crypto) && !defined(NOKERBEROS) - cd ${.CURDIR}/../kerberosIV && ( \ - make bootstrap &&\ - make obj all help-distribute DISTDIR=${RD}/trees &&\ - make kprog \ - ) + cd ${.CURDIR}/..; \ + ${MAKE} ${WORLD_FLAGS} -DNO_MAKEDB_RUN -DMAKE_KERBEROS4 \ + SUBDIR_OVERRIDE="kerberosIV ${K4PROGS}" \ + buildworld distribworld DISTDIR=${RD}/trees .endif .if exists(${.CURDIR}/../kerberos5) && exists(${.CURDIR}/../crypto) && !defined(NOKERBEROS) - cd ${.CURDIR}/../kerberos5 && ( \ - make bootstrap &&\ - make obj all help-distribute DISTDIR=${RD}/trees &&\ - make kprog \ - ) + cd ${.CURDIR}/..; \ + ${MAKE} ${WORLD_FLAGS} -DNO_MAKEDB_RUN -DMAKE_KERBEROS5 \ + SUBDIR_OVERRIDE="kerberos5 ${K5PROGS}" \ + buildworld distribworld DISTDIR=${RD}/trees .endif -chflags -R noschg ${RD}/trees touch release.2 @@ -460,23 +466,25 @@ release.2: # Make and install the generic kernel(s). release.3: .for kernel in ${KERNELS} - -chflags -R noschg ${RD}/kernels/${kernel} - rm -rf ${RD}/kernels/${kernel} - rm -rf ${.CURDIR}/../sys/${MACHINE}/compile/${kernel} - cd ${.CURDIR} && ${MAKE} doSTDKERNEL KERNEL=${kernel} KODIR=/${kernel} - rm -rf ${.CURDIR}/../sys/${MACHINE}/compile/${kernel} - -mkdir ${RD}/trees/base/boot/${kernel} - cp -p ${RD}/kernels/${kernel}/kernel ${RD}/trees/base/boot/${kernel} + cd ${.CURDIR}/..; \ + ${MAKE} ${KERNEL_FLAGS} -DNO_WERROR -DNO_MODULES \ + KERNCONF=${kernel} INSTKERNNAME=${kernel} kernel \ + DESTDIR=${RD}/trees/base .endfor - # Install a standard boot kernel+modules - mkdir -p ${RD}/trees/base/boot/kernel - cp -Rp ${RD}/kernels/GENERIC/* ${RD}/trees/base/boot/kernel + # Install a standard boot kernel+modules. + cd ${.CURDIR}/..; \ + ${MAKE} ${KERNEL_FLAGS} -DNO_WERROR \ + kernel \ + DESTDIR=${RD}/trees/base; \ + cd ${.CURDIR}/..; \ + ${MAKE} ${KERNEL_FLAGS} -DNO_MODULES \ + reinstallkernel -DINSTALL_DEBUG \ + DESTDIR=${RD}/trees/base touch release.3 # Make and install the three crunched binaries which live on the floppies. # You are not supposed to like this :-) release.4: - @mkdir -p /stand rm -rf ${RD}/crunch mkdir -p ${RD}/crunch for j in ${CRUNCH_TARGETS} ; do \ @@ -486,7 +494,7 @@ release.4: ( ( [ -f ${.CURDIR}/${MACHINE}/$${j}_crunch.conf ] && \ crunchgen ${.CURDIR}/${MACHINE}/$${j}_crunch.conf ) || \ ( crunchgen ${.CURDIR}/$${j}_crunch.conf ) ) && \ - ${MAKE} -f $${j}_crunch.mk subclean all ) && \ + ${WMAKE} -f $${j}_crunch.mk subclean all ) && \ mv $${j}_crunch/$${j}_crunch ${RD}/crunch/$${j} && \ true || { rm -rf $${j}_crunch ; false ; } ; \ done @@ -496,12 +504,6 @@ release.4: # --==## Fix up the distributions. ##==-- # release.5: - # Handle some grief caused by the munition braindeadness. - for i in ${FIXCRYPTO}; do \ - ( cd ${.CURDIR}/../$$i; \ - make -DNOCRYPT clean all distribute DISTDIR=${RD}/trees ) ; \ - done - # Create any "synthetic dists" now. @for i in ${DISTRIBUTIONS}; do \ if [ -f ${.CURDIR}/scripts/$${i}-make.sh ]; then \ @@ -624,12 +626,12 @@ release.8: ${RD}/trees/base/etc/$$F > ${RD}/mfsfd/stand/etc/$$F ; \ done ) grep -E '^(ftp|nameserver|domain|sunrpc|cmd|nfsd)[^-\w]' \ - ${.CURDIR}/../etc/services | \ + ${RD}/trees/base/etc/services | \ sed -e '/^#.*$$/d' -e 's/[:space:]*#.*$$//g' \ > ${RD}/mfsfd/stand/etc/services ln ${RD}/mfsfd/stand/etc/services ${RD}/mfsfd/etc/services ln ${RD}/mfsfd/stand/etc/netconfig ${RD}/mfsfd/etc/netconfig - gzip -9c ${.CURDIR}/../COPYRIGHT > ${RD}/mfsfd/stand/help/COPYRIGHT.hlp.gz + gzip -9c ${RD}/trees/base/COPYRIGHT > ${RD}/mfsfd/stand/help/COPYRIGHT.hlp.gz .if !defined(NODOC) @for i in ${DIST_DOCS_ARCH_INDEP}; do \ gzip -9c ${RND}/${RELNOTES_LANG}/$$i/article.txt > ${RD}/mfsfd/stand/help/`echo $${i} | tr 'a-z' 'A-Z'`.TXT.gz; \ @@ -641,28 +643,30 @@ release.8: .endif -test -f ${.CURDIR}/install.cfg && cp ${.CURDIR}/install.cfg ${RD}/mfsfd @mkdir -p ${RD}/mfsfd/boot - @cp /boot/boot* ${RD}/mfsfd/boot + @cp ${RD}/trees/base/boot/boot* ${RD}/mfsfd/boot .if ${MACHINE} == "i386" - @cp /boot/mbr ${RD}/mfsfd/boot + @cp ${RD}/trees/base/boot/mbr ${RD}/mfsfd/boot .endif - @cp /boot/loader.help ${RD}/mfsfd/boot - @cd ${.CURDIR} && ${MAKE} createBOOTMFS + @cp ${RD}/trees/base/boot/loader.help ${RD}/mfsfd/boot + @cd ${.CURDIR}/../sys/${MACHINE}/conf && \ + sh ${.CURDIR}/${MACHINE_ARCH}/dokern.sh ${FDSIZE} < GENERIC > BOOTMFS && \ + [ -r GENERIC.hints ] && cp GENERIC.hints BOOTMFS.hints .if exists(${.CURDIR}/${MACHINE}/drivers.conf) - @cd ${.CURDIR} && ${MAKE} doMODULES KERNEL=BOOTMFS KERNEL_KO=BOOTMFS KODIR="" + @perl ${.CURDIR}/scripts/driver-remove.pl \ + ${.CURDIR}/${MACHINE}/drivers.conf \ + ${.CURDIR}/../sys/${MACHINE}/conf/BOOTMFS + @mkdir -p ${RD}/mfsfd/stand/modules + @perl ${.CURDIR}/scripts/driver-copy2.pl \ + ${.CURDIR}/${MACHINE}/drivers.conf \ + ${RD}/trees/base/boot/kernel ${RD}/mfsfd/stand/modules .endif @echo "Making the regular boot floppy." - @tar --exclude CVS -cf - -C /usr/src/usr.sbin/sysinstall help | \ + @tar --exclude CVS -cf - -C ${.CURDIR}/../usr.sbin/sysinstall help | \ tar xf - -C ${RD}/mfsfd/stand @echo "Compressing doc files..." @gzip -9 ${RD}/mfsfd/stand/help/*.hlp .if ${MACHINE_ARCH} == "alpha" rm -rf ${RD}/mfsfd/stand/help/* -.endif -.if exists(${.CURDIR}/${MACHINE}/drivers.conf) - @mkdir -p ${RD}/mfsfd/stand/modules - @perl ${.CURDIR}/scripts/driver-copy2.pl \ - ${.CURDIR}/${MACHINE}/drivers.conf \ - ${RD}/kernels ${RD}/mfsfd/stand/modules .endif sh -e ${.CURDIR}/scripts/doFS.sh -s mfsroot ${RD} ${MNT} \ ${MFSSIZE} ${RD}/mfsfd ${MFSINODE} ${MFSLABEL} @@ -922,71 +926,22 @@ installCRUNCH: done \ fi -# -# --==## BOOTMFS config file ##==-- -# - -createBOOTMFS: - @cd ${.CURDIR}/../sys/${MACHINE}/conf && \ - sh ${.CURDIR}/${MACHINE_ARCH}/dokern.sh ${FDSIZE} < ${KERNCONF} > BOOTMFS && \ - [ -r ${KERNCONF}.hints ] && cp ${KERNCONF}.hints BOOTMFS.hints -.if 0 && ${MACHINE_ARCH} == "i386" - @echo "options INTRO_USERCONFIG" >> \ - ${.CURDIR}/../sys/${MACHINE}/conf/BOOTMFS -.endif -.if exists(${.CURDIR}/${MACHINE}/drivers.conf) - @perl ${.CURDIR}/scripts/driver-remove.pl \ - ${.CURDIR}/${MACHINE}/drivers.conf \ - ${.CURDIR}/../sys/${MACHINE}/conf/BOOTMFS -.endif - -# -# --==## Compile a kernel by name ${KERNEL} ##==-- -# -# We don't erase the sys/${MACHINE}/compile/${KERNEL} directory, since somebody -# may want to reuse it (release.8 presently) -# -doKERNEL: - @rm -f ${RD}/kernels/${KERNEL} - @cd ${.CURDIR}/../sys/${MACHINE}/conf && config ${KERNEL} - @cd ${.CURDIR}/../sys/${MACHINE}/compile/${KERNEL} && \ - make kernel-depend && \ - make -DNO_WERROR ${KERNEL_FLAGS} ${KERNEL_KO} && \ - make kernel-reinstall DESTDIR=${RD}/kernels && \ - [ -r ${.CURDIR}/../sys/${MACHINE}/conf/${KERNEL}.hints ] && \ - cp ${.CURDIR}/../sys/${MACHINE}/conf/${KERNEL}.hints ${RD}/kernels - -doMODULES: - @rm -f ${RD}/kernels/*.ko - @cd ${.CURDIR}/../sys/${MACHINE}/conf && config ${KERNEL} - @cd ${.CURDIR}/../sys/${MACHINE}/compile/${KERNEL} && \ - make modules-depend && \ - make -DNO_WERROR ${KERNEL_FLAGS} modules && \ - make modules-reinstall DESTDIR=${RD}/kernels && \ - -doSTDKERNEL: - @rm -f ${RD}/kernels/${KERNEL} - @cd ${.CURDIR}/../sys/${MACHINE}/conf && config ${KERNEL} - @cd ${.CURDIR}/../sys/${MACHINE}/compile/${KERNEL} && \ - make depend && \ - make -DNO_WERROR ${KERNEL_FLAGS} KERNEL=${KERNEL} && \ - make KERNEL=${KERNEL} DESTDIR=${RD}/kernels install && \ - [ -r ${.CURDIR}/../sys/${MACHINE}/conf/${KERNEL}.hints ] && \ - cp ${.CURDIR}/../sys/${MACHINE}/conf/${KERNEL}.hints ${RD}/kernels - @-cd ${.CURDIR}/../sys/${MACHINE}/compile/${KERNEL} && \ - make KERNEL=${KERNEL} DESTDIR=${RD}/kernels \ - kernel-reinstall.debug - # # --==## Put a filesystem into a BOOTMFS kernel ##==-- # doMFSKERN: - @echo "Running doMFSKERN for ${FSIMAGE}" - @rm -f ${RD}/kernels/BOOTMFS.${FSIMAGE} - @cd ${.CURDIR} && ${MAKE} createBOOTMFS - @cd ${.CURDIR} && ${MAKE} doKERNEL KERNEL=BOOTMFS KERNEL_KO=BOOTMFS KODIR="" + @echo "Running ${.TARGET} for ${FSIMAGE}" + @rm -f ${RD}/kernels/BOOTMFS ${RD}/kernels/BOOTMFS.${FSIMAGE} + cd ${.CURDIR}/..; \ + KERNEL_KO=BOOTMFS KODIR= \ + ${MAKE} ${KERNEL_FLAGS} -DNO_WERROR -DNO_MODULES -DNO_KERNELCLEAN \ + KERNCONF=BOOTMFS buildkernel reinstallkernel \ + DESTDIR=${RD}/kernels +.if exists(${.CURDIR}/../sys/${MACHINE}/conf/BOOTMFS.hints) + cp ${.CURDIR}/../sys/${MACHINE}/conf/BOOTMFS.hints ${RD}/kernels +.endif @rm -rf ${RD}/image.${FSIMAGE} - @mkdir ${RD}/image.${FSIMAGE} + @mkdir ${RD}/image.${FSIMAGE} @cd ${RD}/kernels && \ (chflags noschg BOOTMFS || true) && \ strip BOOTMFS && \ diff --git a/release/scripts/catpages-make.sh b/release/scripts/catpages-make.sh index 755057d40ccb..042d1048f183 100755 --- a/release/scripts/catpages-make.sh +++ b/release/scripts/catpages-make.sh @@ -10,3 +10,8 @@ if [ -d ${RD}/trees/base/usr/share/man ]; then find cat* whatis | cpio -dumpl ${RD}/trees/catpages/usr/share/man > /dev/null 2>&1) && rm -rf ${RD}/trees/base/usr/share/man/cat*; fi +if [ -d ${RD}/trees/base/usr/share/perl/man ]; then + ( cd ${RD}/trees/base/usr/share/perl/man; + find cat* whatis | cpio -dumpl ${RD}/trees/catpages/usr/share/perl/man > /dev/null 2>&1) && + rm -rf ${RD}/trees/base/usr/share/perl/man/cat*; +fi diff --git a/release/scripts/doFS.sh b/release/scripts/doFS.sh index 12aceaa9cd7b..985f7ed96d59 100644 --- a/release/scripts/doFS.sh +++ b/release/scripts/doFS.sh @@ -21,6 +21,9 @@ FSPROTO=$1 ; shift FSINODE=$1 ; shift FSLABEL=$1 ; shift +BOOT1=${RD}/trees/base/boot/boot1 +BOOT2=${RD}/trees/base/boot/boot2 + deadlock=20 dofs_vn () { @@ -47,7 +50,7 @@ dofs_vn () { dd of=${FSIMG} if=/dev/zero count=${FSSIZE} bs=1k 2>/dev/null vnconfig -s labels -c /dev/r${VNDEVICE} ${FSIMG} - disklabel -Brw ${VNDEVICE} ${FSLABEL} + disklabel -w -B -b ${BOOT1} -s ${BOOT2} ${VNDEVICE} ${FSLABEL} newfs -i ${FSINODE} -o space -m 1 /dev/r${VNDEVICE}c mount /dev/${VNDEVICE}c ${MNT} @@ -98,7 +101,7 @@ dofs_md () { exit 1 fi fi - disklabel -Brw ${MDDEVICE} ${FSLABEL} + disklabel -w -B -b ${BOOT1} -s ${BOOT2} ${MDDEVICE} ${FSLABEL} newfs -i ${FSINODE} -o space -m 0 /dev/${MDDEVICE}c mount /dev/${MDDEVICE}c ${MNT} diff --git a/release/scripts/manpages-make.sh b/release/scripts/manpages-make.sh index bb1326f3d506..0f13d3c97475 100755 --- a/release/scripts/manpages-make.sh +++ b/release/scripts/manpages-make.sh @@ -10,3 +10,8 @@ if [ -d ${RD}/trees/base/usr/share/man ]; then find . | cpio -dumpl ${RD}/trees/manpages/usr/share/man > /dev/null 2>&1) && rm -rf ${RD}/trees/base/usr/share/man; fi +if [ -d ${RD}/trees/base/usr/share/perl/man ]; then + ( cd ${RD}/trees/base/usr/share/perl/man; + find . | cpio -dumpl ${RD}/trees/manpages/usr/share/perl/man > /dev/null 2>&1) && + rm -rf ${RD}/trees/base/usr/share/perl/man; +fi diff --git a/secure/usr.bin/ssh/Makefile b/secure/usr.bin/ssh/Makefile index b66d824cd9a6..1567f968e113 100644 --- a/secure/usr.bin/ssh/Makefile +++ b/secure/usr.bin/ssh/Makefile @@ -11,21 +11,19 @@ MLINKS= ssh.1 slogin.1 SRCS= ssh.c readconf.c clientloop.c sshtty.c \ sshconnect.c sshconnect1.c sshconnect2.c -.if defined(MAKE_KERBEROS4) && \ - ((${MAKE_KERBEROS4} == "yes") || (${MAKE_KERBEROS4} == "YES")) +.if defined(MAKE_KERBEROS4) DISTRIBUTION=krb4 CFLAGS+= -DKRB4 LDADD+= -lkrb -lcom_err DPADD+= ${LIBKRB} ${LIBCOM_ERR} -.endif # MAKE_KERBEROS4 +.endif -.if defined(MAKE_KERBEROS5) && \ - ((${MAKE_KERBEROS5} == "yes") || (${MAKE_KERBEROS5} == "YES")) +.if defined(MAKE_KERBEROS5) DISTRIBUTION=krb5 CFLAGS+= -DKRB5 LDADD+= -lkrb5 -lasn1 -lcom_err -lmd -L${.OBJDIR}/../../../kerberos5/lib/libroken -lroken -lcrypt DPADD+= ${LIBKRB5} ${LIBCOM_ERR} ${LIBASN1} ${LIBMD} ${LIBCRYPT} -.endif # MAKE_KERBEROS5 +.endif .if defined(X11BASE) CFLAGS+= -DXAUTH_PATH=\"${X11BASE}/bin/xauth\" diff --git a/secure/usr.sbin/sshd/Makefile b/secure/usr.sbin/sshd/Makefile index f453bc1ff4ca..66635c40fb93 100644 --- a/secure/usr.sbin/sshd/Makefile +++ b/secure/usr.sbin/sshd/Makefile @@ -11,23 +11,21 @@ MAN= sshd.8 CFLAGS+= -DLIBWRAP -DHAVE_LOGIN_CAP -DUSE_PAM -DHAVE_PAM_GETENVLIST -.if defined(MAKE_KERBEROS4) && \ - ((${MAKE_KERBEROS4} == "yes") || (${MAKE_KERBEROS4} == "YES")) +.if defined(MAKE_KERBEROS4) DISTRIBUTION=krb4 CFLAGS+= -DKRB4 SRCS+= auth-krb4.c LDADD+= -lkrb -lcom_err DPADD+= ${LIBKRB} ${LIBCOM_ERR} -.endif # MAKE_KERBEROS4 +.endif -.if defined(MAKE_KERBEROS5) && \ - ((${MAKE_KERBEROS5} == "yes") || (${MAKE_KERBEROS5} == "YES")) +.if defined(MAKE_KERBEROS5) DISTRIBUTION=krb5 CFLAGS+= -DKRB5 SRCS+= auth-krb5.c LDADD+= -lkrb5 -lasn1 -lcom_err -lmd -L${.OBJDIR}/../../../kerberos5/lib/libroken -lroken DPADD+= ${LIBKRB5} ${LIBCOM_ERR} ${LIBASN1} ${LIBMD} -.endif # MAKE_KERBEROS5 +.endif CFLAGS+= -DSKEY LDADD+= -lopie -lmd diff --git a/share/mk/bsd.subdir.mk b/share/mk/bsd.subdir.mk index 16e870484b15..f41081909c62 100644 --- a/share/mk/bsd.subdir.mk +++ b/share/mk/bsd.subdir.mk @@ -24,7 +24,7 @@ # This is a variant of install, which will # put the stuff into the right "distribution". # -# afterdistribute, afterinstall, all, all-man, beforeinstall, checkdpadd, +# afterinstall, all, all-man, beforeinstall, checkdpadd, # clean, cleandepend, cleandir, depend, install, lint, # obj, objlink, realinstall, regress, tags # @@ -57,7 +57,8 @@ ${SUBDIR}:: ${MAKE} all -.for __target in all all-man checkdpadd clean cleandepend cleandir depend lint \ +.for __target in all all-man checkdpadd clean cleandepend cleandir \ + depend distribute lint \ obj objlink realinstall regress tags ${__target}: _SUBDIR .endfor @@ -73,14 +74,3 @@ install: afterinstall afterinstall: realinstall realinstall: beforeinstall .endif - -DISTRIBUTION?= base -.if !target(afterdistribute) -afterdistribute: -.endif -.if !target(distribute) -distribute: _SUBDIR -.for dist in ${DISTRIBUTION} - cd ${.CURDIR} ; ${MAKE} afterdistribute DESTDIR=${DISTDIR}/${dist} -.endfor -.endif diff --git a/sys/Makefile b/sys/Makefile index b0564d91a062..6e3702727c6c 100644 --- a/sys/Makefile +++ b/sys/Makefile @@ -8,11 +8,6 @@ SUBDIR= boot SUBDIR+=modules .endif -afterdistribute: - ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 444 \ - ${.CURDIR}/${MACHINE}/conf/GENERIC.hints \ - ${DESTDIR}/boot/device.hints - HTAGSFLAGS+= -at `awk -F= '/^RELEASE *=/{release=$2}; END {print "FreeBSD", release, "kernel"}' < conf/newvers.sh` .include