1994-08-13 22:47:28 +00:00
|
|
|
#
|
1998-06-17 09:34:42 +00:00
|
|
|
# $Id: Makefile,v 1.202 1998/06/13 02:03:36 peter Exp $
|
1998-01-11 04:51:02 +00:00
|
|
|
#
|
1998-02-19 07:34:46 +00:00
|
|
|
# While porting to the another architecture include the bootstrap instead
|
1998-01-11 04:51:02 +00:00
|
|
|
# of the normal build.
|
|
|
|
#
|
1998-05-16 22:20:44 +00:00
|
|
|
.if exists(${.CURDIR}/Makefile.${MACHINE}) && defined(BOOTSTRAP_WORLD)
|
1998-02-19 07:34:46 +00:00
|
|
|
.include "${.CURDIR}/Makefile.${MACHINE}"
|
1998-01-11 04:51:02 +00:00
|
|
|
.else
|
1994-08-13 22:47:28 +00:00
|
|
|
#
|
|
|
|
# Make command line options:
|
1996-05-04 07:12:07 +00:00
|
|
|
# -DCLOBBER will remove /usr/include
|
1997-10-06 09:58:11 +00:00
|
|
|
# -DMAKE_KERBEROS4 to build KerberosIV
|
1994-08-13 22:47:28 +00:00
|
|
|
# -DNOCLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir
|
1995-11-25 01:28:07 +00:00
|
|
|
# -DNOCLEAN do not clean at all
|
1998-03-12 10:55:02 +00:00
|
|
|
# -DNOTOOLS do not rebuild any tools first
|
1994-08-20 21:34:59 +00:00
|
|
|
# -DNOCRYPT will prevent building of crypt versions
|
1994-09-16 20:24:29 +00:00
|
|
|
# -DNOLKM do not build loadable kernel modules
|
1994-08-13 22:47:28 +00:00
|
|
|
# -DNOOBJDIR do not run ``${MAKE} obj''
|
|
|
|
# -DNOPROFILE do not build profiled libraries
|
1994-08-20 21:34:59 +00:00
|
|
|
# -DNOSECURE do not go into secure subdir
|
1996-07-27 21:47:42 +00:00
|
|
|
# -DNOGAMES do not go into games subdir
|
1996-11-01 19:03:33 +00:00
|
|
|
# -DNOSHARE do not go into share subdir
|
1997-07-31 08:06:29 +00:00
|
|
|
# -DNOINFO do not make or install info files
|
1997-10-06 09:58:11 +00:00
|
|
|
# -DNOLIBC_R do not build libc_r.
|
1997-05-21 22:48:51 +00:00
|
|
|
# LOCAL_DIRS="list of dirs" to add additional dirs to the SUBDIR list
|
1996-07-27 21:47:42 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# The intended user-driven targets are:
|
1997-08-05 03:49:49 +00:00
|
|
|
# buildworld - rebuild *everything*, including glue to help do upgrades
|
|
|
|
# installworld- install everything built by "buildworld"
|
|
|
|
# world - buildworld + installworld
|
1996-07-27 21:47:42 +00:00
|
|
|
# update - convenient way to update your source tree (eg: sup/cvs)
|
|
|
|
# most - build user commands, no libraries or include files
|
|
|
|
# installmost - install user commands, no libraries or include files
|
1996-10-25 14:22:50 +00:00
|
|
|
#
|
|
|
|
# Standard targets (not defined here) are documented in the makefiles in
|
|
|
|
# /usr/share/mk. These include:
|
|
|
|
# obj depend all install clean cleandepend cleanobj
|
1996-07-27 21:47:42 +00:00
|
|
|
|
1997-08-05 03:49:49 +00:00
|
|
|
.if (!make(world)) && (!make(buildworld)) && (!make(installworld))
|
1998-03-12 10:55:02 +00:00
|
|
|
.MAKEFLAGS:= -m ${.CURDIR}/share/mk ${.MAKEFLAGS}
|
1997-08-05 03:49:49 +00:00
|
|
|
.endif
|
1994-05-27 12:42:53 +00:00
|
|
|
|
1994-08-13 22:47:28 +00:00
|
|
|
# Put initial settings here.
|
|
|
|
SUBDIR=
|
1994-05-27 12:42:53 +00:00
|
|
|
|
1997-10-06 09:58:11 +00:00
|
|
|
# We must do share/info early so that installation of info `dir'
|
|
|
|
# entries works correctly. Do it first since it is less likely to
|
|
|
|
# grow dependencies on include and lib than vice versa.
|
|
|
|
.if exists(share/info)
|
|
|
|
SUBDIR+= share/info
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# We must do include and lib early so that the perl *.ph generation
|
1995-03-27 01:31:09 +00:00
|
|
|
# works correctly as it uses the header files installed by this.
|
1995-03-17 04:59:44 +00:00
|
|
|
.if exists(include)
|
|
|
|
SUBDIR+= include
|
|
|
|
.endif
|
1995-03-27 01:31:09 +00:00
|
|
|
.if exists(lib)
|
|
|
|
SUBDIR+= lib
|
|
|
|
.endif
|
1995-03-17 04:59:44 +00:00
|
|
|
|
1994-08-13 22:47:28 +00:00
|
|
|
.if exists(bin)
|
|
|
|
SUBDIR+= bin
|
|
|
|
.endif
|
1996-07-27 21:47:42 +00:00
|
|
|
.if exists(games) && !defined(NOGAMES)
|
1994-08-13 22:47:28 +00:00
|
|
|
SUBDIR+= games
|
|
|
|
.endif
|
|
|
|
.if exists(gnu)
|
|
|
|
SUBDIR+= gnu
|
|
|
|
.endif
|
1998-04-24 17:13:33 +00:00
|
|
|
.if exists(kerberosIV) && exists(crypto) && !defined(NOCRYPT) && \
|
|
|
|
defined(MAKE_KERBEROS4)
|
1997-10-06 09:58:11 +00:00
|
|
|
SUBDIR+= kerberosIV
|
1994-09-09 20:29:20 +00:00
|
|
|
.endif
|
1994-08-13 22:47:28 +00:00
|
|
|
.if exists(libexec)
|
|
|
|
SUBDIR+= libexec
|
|
|
|
.endif
|
|
|
|
.if exists(sbin)
|
|
|
|
SUBDIR+= sbin
|
|
|
|
.endif
|
1996-11-01 19:03:33 +00:00
|
|
|
.if exists(share) && !defined(NOSHARE)
|
1994-08-13 22:47:28 +00:00
|
|
|
SUBDIR+= share
|
|
|
|
.endif
|
|
|
|
.if exists(sys)
|
|
|
|
SUBDIR+= sys
|
|
|
|
.endif
|
|
|
|
.if exists(usr.bin)
|
|
|
|
SUBDIR+= usr.bin
|
|
|
|
.endif
|
|
|
|
.if exists(usr.sbin)
|
|
|
|
SUBDIR+= usr.sbin
|
|
|
|
.endif
|
1994-09-16 20:24:29 +00:00
|
|
|
.if exists(secure) && !defined(NOCRYPT) && !defined(NOSECURE)
|
|
|
|
SUBDIR+= secure
|
|
|
|
.endif
|
|
|
|
.if exists(lkm) && !defined(NOLKM)
|
|
|
|
SUBDIR+= lkm
|
|
|
|
.endif
|
1994-08-13 22:47:28 +00:00
|
|
|
|
1994-11-14 20:52:54 +00:00
|
|
|
# etc must be last for "distribute" to work
|
|
|
|
.if exists(etc) && make(distribute)
|
|
|
|
SUBDIR+= etc
|
|
|
|
.endif
|
|
|
|
|
1994-08-13 22:47:28 +00:00
|
|
|
# These are last, since it is nice to at least get the base system
|
|
|
|
# rebuilt before you do them.
|
1997-05-21 19:41:16 +00:00
|
|
|
.if defined(LOCAL_DIRS)
|
|
|
|
.for _DIR in ${LOCAL_DIRS}
|
|
|
|
.if exists(${_DIR}) & exists(${_DIR}/Makefile)
|
|
|
|
SUBDIR+= ${_DIR}
|
1994-08-13 22:47:28 +00:00
|
|
|
.endif
|
1997-05-21 19:41:16 +00:00
|
|
|
.endfor
|
1994-08-13 22:47:28 +00:00
|
|
|
.endif
|
|
|
|
|
1996-07-27 21:47:42 +00:00
|
|
|
# Handle -DNOOBJDIR, -DNOCLEAN and -DNOCLEANDIR
|
1994-08-13 22:47:28 +00:00
|
|
|
.if defined(NOOBJDIR)
|
|
|
|
OBJDIR=
|
|
|
|
.else
|
|
|
|
OBJDIR= obj
|
|
|
|
.endif
|
1995-11-25 01:28:07 +00:00
|
|
|
|
|
|
|
.if defined(NOCLEAN)
|
|
|
|
CLEANDIR=
|
|
|
|
.else
|
1994-08-13 22:47:28 +00:00
|
|
|
.if defined(NOCLEANDIR)
|
1998-04-27 16:21:33 +00:00
|
|
|
CLEANDIR= clean cleandepend
|
1995-05-29 23:50:55 +00:00
|
|
|
.else
|
1994-08-13 22:47:28 +00:00
|
|
|
CLEANDIR= cleandir
|
|
|
|
.endif
|
1995-11-25 01:28:07 +00:00
|
|
|
.endif
|
1994-08-13 22:47:28 +00:00
|
|
|
|
1998-04-27 16:21:33 +00:00
|
|
|
.if !defined(NOCLEAN) && ${.MAKEFLAGS:M-j} == ""
|
|
|
|
_NODEPEND= true
|
|
|
|
.endif
|
|
|
|
.if defined(_NODEPEND)
|
|
|
|
_DEPEND= cleandepend
|
|
|
|
.else
|
|
|
|
_DEPEND= depend
|
|
|
|
.endif
|
|
|
|
|
1998-04-26 08:40:25 +00:00
|
|
|
SUP?= cvsup
|
|
|
|
SUPFLAGS?= -g -L 2 -P -
|
1996-10-05 18:36:38 +00:00
|
|
|
|
1996-07-27 21:47:42 +00:00
|
|
|
#
|
1998-03-13 09:41:58 +00:00
|
|
|
# While building tools for bootstrapping, we don't need to waste time on
|
1998-03-14 13:58:21 +00:00
|
|
|
# shared or profiled libraries, shared linkage, or documentation, except
|
|
|
|
# when the tools won't get cleaned we must use the defaults for shared
|
|
|
|
# libraries and shared linkage (and this doesn't waste time).
|
1998-03-15 04:52:58 +00:00
|
|
|
# XXX actually, we do need to waste time building shared libraries.
|
1996-07-27 21:47:42 +00:00
|
|
|
#
|
1998-03-14 13:58:21 +00:00
|
|
|
.if defined(NOCLEAN)
|
1998-04-24 17:13:33 +00:00
|
|
|
MK_FLAGS= -DNOINFO -DNOMAN -DNOPROFILE
|
1998-03-14 13:58:21 +00:00
|
|
|
.else
|
1998-04-24 17:13:33 +00:00
|
|
|
MK_FLAGS= -DNOINFO -DNOMAN -DNOPIC -DNOPROFILE -DNOSHARED
|
1998-03-14 13:58:21 +00:00
|
|
|
.endif
|
1996-05-04 07:12:07 +00:00
|
|
|
|
1996-07-27 21:47:42 +00:00
|
|
|
#
|
|
|
|
# world
|
|
|
|
#
|
|
|
|
# Attempt to rebuild and reinstall *everything*, with reasonable chance of
|
|
|
|
# success, regardless of how old your existing system is.
|
|
|
|
#
|
|
|
|
# >> Beware, it overwrites the local build environment! <<
|
|
|
|
#
|
|
|
|
world:
|
1996-09-18 18:14:37 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
1996-11-26 03:26:31 +00:00
|
|
|
@echo "make world started on `LC_TIME=C date`"
|
1996-09-18 18:14:37 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
1996-07-27 21:47:42 +00:00
|
|
|
.if target(pre-world)
|
1997-08-05 03:49:49 +00:00
|
|
|
@echo
|
1996-07-27 21:47:42 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
|
|
|
@echo " Making 'pre-world' target"
|
|
|
|
@echo "--------------------------------------------------------------"
|
1998-05-15 17:12:00 +00:00
|
|
|
cd ${.CURDIR}; ${MAKE} pre-world
|
1996-06-20 18:47:04 +00:00
|
|
|
.endif
|
1998-05-15 17:12:00 +00:00
|
|
|
cd ${.CURDIR}; ${MAKE} buildworld
|
|
|
|
cd ${.CURDIR}; ${MAKE} -B installworld
|
1997-08-05 03:49:49 +00:00
|
|
|
.if target(post-world)
|
|
|
|
@echo
|
1994-08-13 22:47:28 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
1997-08-05 03:49:49 +00:00
|
|
|
@echo " Making 'post-world' target"
|
1996-07-27 21:47:42 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
1998-05-15 17:12:00 +00:00
|
|
|
cd ${.CURDIR}; ${MAKE} post-world
|
1997-08-05 03:49:49 +00:00
|
|
|
.endif
|
1996-07-27 21:47:42 +00:00
|
|
|
@echo
|
|
|
|
@echo "--------------------------------------------------------------"
|
1997-08-05 03:49:49 +00:00
|
|
|
@echo "make world completed on `LC_TIME=C date`"
|
1996-07-27 21:47:42 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
1997-08-05 03:49:49 +00:00
|
|
|
|
|
|
|
.if defined(MAKEOBJDIRPREFIX)
|
|
|
|
WORLDTMP= ${MAKEOBJDIRPREFIX}${.CURDIR}/tmp
|
1996-07-27 21:47:42 +00:00
|
|
|
.else
|
1997-08-05 03:49:49 +00:00
|
|
|
WORLDTMP= /usr/obj${.CURDIR}/tmp
|
1996-07-27 21:47:42 +00:00
|
|
|
.endif
|
1997-08-05 03:49:49 +00:00
|
|
|
STRICTTMPPATH= ${WORLDTMP}/sbin:${WORLDTMP}/usr/sbin:${WORLDTMP}/bin:${WORLDTMP}/usr/bin
|
|
|
|
TMPPATH= ${STRICTTMPPATH}:${PATH}
|
|
|
|
|
|
|
|
# XXX COMPILER_PATH is needed for finding cc1, ld and as
|
1998-06-04 06:25:22 +00:00
|
|
|
# XXX GCC_EXEC_PREFIX is for *crt.o. It is probably unnecessary now
|
|
|
|
# that LIBRARY_PATH is set. We still can't use -nostdlib, since gcc
|
1997-08-05 03:49:49 +00:00
|
|
|
# wouldn't link *crt.o or libgcc if it were used.
|
|
|
|
# XXX LD_LIBRARY_PATH is for ld.so. It is also used by ld, although we don't
|
|
|
|
# want that - all compile-time library paths should be resolved by gcc.
|
|
|
|
# It fails for set[ug]id executables (are any used?).
|
|
|
|
COMPILER_ENV= BISON_SIMPLE=${WORLDTMP}/usr/share/misc/bison.simple \
|
|
|
|
COMPILER_PATH=${WORLDTMP}/usr/libexec:${WORLDTMP}/usr/bin \
|
1998-03-12 10:55:02 +00:00
|
|
|
GCC_EXEC_PREFIX=${WORLDTMP}${SHLIBDIR}:${WORLDTMP}/usr/lib/ \
|
1997-08-05 03:49:49 +00:00
|
|
|
LD_LIBRARY_PATH=${WORLDTMP}${SHLIBDIR} \
|
|
|
|
LIBRARY_PATH=${WORLDTMP}${SHLIBDIR}:${WORLDTMP}/usr/lib
|
|
|
|
|
1998-05-27 16:33:43 +00:00
|
|
|
BMAKEENV= PATH=${TMPPATH} ${COMPILER_ENV} NOEXTRADEPEND=t \
|
|
|
|
OBJFORMAT_PATH=${WORLDTMP}/usr/libexec:/usr/libexec
|
1997-08-05 03:49:49 +00:00
|
|
|
XMAKEENV= PATH=${STRICTTMPPATH} ${COMPILER_ENV} \
|
1998-05-27 16:33:43 +00:00
|
|
|
OBJFORMAT_PATH=${WORLDTMP}/usr/libexec \
|
1998-04-27 16:21:33 +00:00
|
|
|
CFLAGS="-nostdinc ${CFLAGS}" # XXX -nostdlib
|
1997-08-05 03:49:49 +00:00
|
|
|
|
|
|
|
# used to compile and install 'make' in temporary build tree
|
1998-03-19 16:43:19 +00:00
|
|
|
MAKETMP= ${WORLDTMP}/make
|
|
|
|
IBMAKE= ${BMAKEENV} MAKEOBJDIR=${MAKETMP} ${MAKE} DESTDIR=${WORLDTMP}
|
1997-08-05 03:49:49 +00:00
|
|
|
# bootstrap make
|
1998-04-24 17:13:33 +00:00
|
|
|
BMAKE= ${BMAKEENV} ${WORLDTMP}/usr/bin/make DESTDIR=${WORLDTMP}
|
1997-08-05 03:49:49 +00:00
|
|
|
# cross make used for compilation
|
1998-04-24 17:13:33 +00:00
|
|
|
XMAKE= ${XMAKEENV} ${WORLDTMP}/usr/bin/make DESTDIR=${WORLDTMP}
|
1997-08-05 03:49:49 +00:00
|
|
|
# cross make used for final installation
|
1998-04-24 17:13:33 +00:00
|
|
|
IXMAKE= ${XMAKEENV} ${WORLDTMP}/usr/bin/make
|
1997-08-05 03:49:49 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# buildworld
|
|
|
|
#
|
|
|
|
# Attempt to rebuild the entire system, with reasonable chance of
|
|
|
|
# success, regardless of how old your existing system is.
|
|
|
|
#
|
|
|
|
buildworld:
|
|
|
|
.if !defined(NOCLEAN)
|
1996-07-27 21:47:42 +00:00
|
|
|
@echo
|
|
|
|
@echo "--------------------------------------------------------------"
|
1997-08-05 03:49:49 +00:00
|
|
|
@echo " Cleaning up the temporary build tree"
|
1996-07-27 21:47:42 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
1997-08-05 03:49:49 +00:00
|
|
|
mkdir -p ${WORLDTMP}
|
|
|
|
chflags -R noschg ${WORLDTMP}/
|
|
|
|
rm -rf ${WORLDTMP}
|
1996-08-07 13:21:43 +00:00
|
|
|
.endif
|
1998-02-06 09:52:34 +00:00
|
|
|
.if !defined(NOTOOLS)
|
1997-08-05 03:49:49 +00:00
|
|
|
@echo
|
1996-07-27 21:47:42 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
1997-08-05 03:49:49 +00:00
|
|
|
@echo " Making make"
|
1996-07-27 21:47:42 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
1998-03-19 16:43:19 +00:00
|
|
|
mkdir -p ${WORLDTMP}/usr/bin ${MAKETMP}
|
|
|
|
( \
|
1998-05-15 17:12:00 +00:00
|
|
|
cd ${.CURDIR}/usr.bin/make; \
|
|
|
|
MAKEOBJDIRPREFIX=""; unset MAKEOBJDIRPREFIX; \
|
|
|
|
${IBMAKE} -I${.CURDIR}/share/mk ${MK_FLAGS} all; \
|
|
|
|
${IBMAKE} -I${.CURDIR}/share/mk ${MK_FLAGS} install; \
|
1998-03-19 16:43:19 +00:00
|
|
|
${IBMAKE} -I${.CURDIR}/share/mk ${MK_FLAGS} clean \
|
|
|
|
)
|
1998-06-07 10:50:28 +00:00
|
|
|
@echo
|
|
|
|
@echo "--------------------------------------------------------------"
|
1998-06-09 07:19:13 +00:00
|
|
|
@echo " Making mtree"
|
1998-06-07 10:50:28 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
1998-06-09 07:19:13 +00:00
|
|
|
mkdir -p ${WORLDTMP}/usr/sbin ${WORLDTMP}/mtree
|
1998-06-07 10:50:28 +00:00
|
|
|
( \
|
|
|
|
cd ${.CURDIR}/usr.sbin/mtree; \
|
|
|
|
MAKEOBJDIRPREFIX=""; unset MAKEOBJDIRPREFIX; \
|
1998-06-09 07:19:13 +00:00
|
|
|
export MAKEOBJDIR=${WORLDTMP}/mtree; \
|
|
|
|
${BMAKE} ${MK_FLAGS} all; \
|
|
|
|
${BMAKE} ${MK_FLAGS} -B install clean \
|
1998-06-07 10:50:28 +00:00
|
|
|
)
|
1998-02-06 09:52:34 +00:00
|
|
|
.endif
|
1996-07-27 21:47:42 +00:00
|
|
|
@echo
|
|
|
|
@echo "--------------------------------------------------------------"
|
1997-08-05 03:49:49 +00:00
|
|
|
@echo " Making hierarchy"
|
1996-07-27 21:47:42 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
1998-05-15 17:12:00 +00:00
|
|
|
cd ${.CURDIR}; ${BMAKE} hierarchy
|
1997-08-05 03:49:49 +00:00
|
|
|
.if !defined(NOCLEAN)
|
1996-07-27 21:47:42 +00:00
|
|
|
@echo
|
|
|
|
@echo "--------------------------------------------------------------"
|
1997-08-05 03:49:49 +00:00
|
|
|
@echo " Cleaning up the obj tree"
|
1996-07-27 21:47:42 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
1998-05-15 17:12:00 +00:00
|
|
|
cd ${.CURDIR}; ${BMAKE} ${CLEANDIR:S/^/par-/}
|
1997-08-05 03:49:49 +00:00
|
|
|
.endif
|
|
|
|
.if !defined(NOOBJDIR)
|
1996-07-27 21:47:42 +00:00
|
|
|
@echo
|
|
|
|
@echo "--------------------------------------------------------------"
|
1997-08-05 03:49:49 +00:00
|
|
|
@echo " Rebuilding the obj tree"
|
1996-07-27 21:47:42 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
1998-05-15 17:12:00 +00:00
|
|
|
cd ${.CURDIR}; ${BMAKE} par-${OBJDIR}
|
1997-08-05 03:49:49 +00:00
|
|
|
.endif
|
1998-02-06 09:52:34 +00:00
|
|
|
.if !defined(NOTOOLS)
|
1996-07-27 21:47:42 +00:00
|
|
|
@echo
|
|
|
|
@echo "--------------------------------------------------------------"
|
1997-08-05 03:49:49 +00:00
|
|
|
@echo " Rebuilding bootstrap tools"
|
1996-07-27 21:47:42 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
1998-05-15 17:12:00 +00:00
|
|
|
cd ${.CURDIR}; ${BMAKE} bootstrap
|
1996-07-27 21:47:42 +00:00
|
|
|
@echo
|
|
|
|
@echo "--------------------------------------------------------------"
|
1997-08-05 03:49:49 +00:00
|
|
|
@echo " Rebuilding tools necessary to build the include files"
|
1994-08-13 22:47:28 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
1998-05-15 17:12:00 +00:00
|
|
|
cd ${.CURDIR}; ${BMAKE} include-tools
|
1998-02-06 09:52:34 +00:00
|
|
|
.endif
|
1994-08-13 22:47:28 +00:00
|
|
|
@echo
|
1996-07-27 21:47:42 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
1998-03-12 10:55:02 +00:00
|
|
|
@echo " Rebuilding ${DESTDIR}/usr/include"
|
1996-08-30 22:35:30 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
1998-05-27 18:50:01 +00:00
|
|
|
cd ${.CURDIR}; SHARED=copies ${BMAKE} includes
|
1996-08-30 22:35:30 +00:00
|
|
|
@echo
|
|
|
|
@echo "--------------------------------------------------------------"
|
1998-05-08 21:29:35 +00:00
|
|
|
@echo " Rebuilding bootstrap libraries"
|
1996-08-30 22:35:30 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
1998-05-15 17:12:00 +00:00
|
|
|
cd ${.CURDIR}; ${BMAKE} bootstrap-libraries
|
1998-05-08 21:29:35 +00:00
|
|
|
.if !defined(NOTOOLS)
|
1996-08-30 22:35:30 +00:00
|
|
|
@echo
|
|
|
|
@echo "--------------------------------------------------------------"
|
1998-05-08 21:29:35 +00:00
|
|
|
@echo " Rebuilding tools needed to build libraries"
|
1996-08-30 22:35:30 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
1998-05-15 17:12:00 +00:00
|
|
|
cd ${.CURDIR}; ${BMAKE} lib-tools
|
1998-05-08 21:29:35 +00:00
|
|
|
.endif
|
1998-02-06 09:52:34 +00:00
|
|
|
.if !defined(NOTOOLS)
|
1996-08-30 22:35:30 +00:00
|
|
|
@echo
|
|
|
|
@echo "--------------------------------------------------------------"
|
1997-08-05 03:49:49 +00:00
|
|
|
@echo " Rebuilding all other tools needed to build the world"
|
1996-07-27 21:47:42 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
1998-05-15 17:12:00 +00:00
|
|
|
cd ${.CURDIR}; ${BMAKE} build-tools
|
1998-02-06 09:52:34 +00:00
|
|
|
.endif
|
1998-04-27 16:21:33 +00:00
|
|
|
.if !defined(_NODEPEND)
|
1996-07-27 21:47:42 +00:00
|
|
|
@echo
|
|
|
|
@echo "--------------------------------------------------------------"
|
1997-08-05 03:49:49 +00:00
|
|
|
@echo " Rebuilding dependencies"
|
1996-07-27 21:47:42 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
1998-05-15 17:12:00 +00:00
|
|
|
cd ${.CURDIR}; ${XMAKE} par-depend
|
1998-04-27 16:21:33 +00:00
|
|
|
.endif
|
1996-07-27 21:47:42 +00:00
|
|
|
@echo
|
|
|
|
@echo "--------------------------------------------------------------"
|
1998-04-24 17:13:33 +00:00
|
|
|
@echo " Building libraries"
|
|
|
|
@echo "--------------------------------------------------------------"
|
1998-05-15 17:12:00 +00:00
|
|
|
cd ${.CURDIR}; ${XMAKE} -DNOINFO -DNOMAN libraries
|
1998-04-24 17:13:33 +00:00
|
|
|
@echo
|
|
|
|
@echo "--------------------------------------------------------------"
|
1997-08-05 03:49:49 +00:00
|
|
|
@echo " Building everything.."
|
1996-08-30 22:35:30 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
1998-05-15 17:12:00 +00:00
|
|
|
cd ${.CURDIR}; ${XMAKE} all
|
1997-08-05 03:49:49 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# installworld
|
|
|
|
#
|
|
|
|
# Installs everything compiled by a 'buildworld'.
|
|
|
|
#
|
|
|
|
installworld:
|
1998-05-15 17:12:00 +00:00
|
|
|
cd ${.CURDIR}; ${IXMAKE} reinstall
|
1994-08-13 22:47:28 +00:00
|
|
|
|
1996-07-27 21:47:42 +00:00
|
|
|
#
|
|
|
|
# reinstall
|
|
|
|
#
|
|
|
|
# If you have a build server, you can NFS mount the source and obj directories
|
|
|
|
# and do a 'make reinstall' on the *client* to install new binaries from the
|
|
|
|
# most recent server build.
|
|
|
|
#
|
|
|
|
reinstall:
|
1995-11-25 01:28:07 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
1996-07-27 21:47:42 +00:00
|
|
|
@echo " Making hierarchy"
|
1995-11-25 01:28:07 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
1998-05-15 17:12:00 +00:00
|
|
|
cd ${.CURDIR}; ${MAKE} hierarchy
|
1995-11-25 01:28:07 +00:00
|
|
|
@echo
|
1994-08-13 22:47:28 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
1996-08-30 22:35:30 +00:00
|
|
|
@echo " Installing everything.."
|
|
|
|
@echo "--------------------------------------------------------------"
|
1998-05-15 17:12:00 +00:00
|
|
|
cd ${.CURDIR}; ${MAKE} install
|
1998-06-04 12:02:52 +00:00
|
|
|
.if ${MACHINE_ARCH} == "i386"
|
1996-08-30 22:35:30 +00:00
|
|
|
@echo
|
|
|
|
@echo "--------------------------------------------------------------"
|
1998-02-19 00:24:43 +00:00
|
|
|
@echo " Re-scanning the shared libraries.."
|
|
|
|
@echo "--------------------------------------------------------------"
|
1998-06-06 01:13:21 +00:00
|
|
|
cd ${.CURDIR}; /sbin/ldconfig -R
|
1998-06-04 12:02:52 +00:00
|
|
|
.endif
|
1998-02-19 00:24:43 +00:00
|
|
|
@echo
|
|
|
|
@echo "--------------------------------------------------------------"
|
1996-08-30 22:35:30 +00:00
|
|
|
@echo " Rebuilding man page indexes"
|
|
|
|
@echo "--------------------------------------------------------------"
|
1998-05-15 17:12:00 +00:00
|
|
|
cd ${.CURDIR}/share/man; ${MAKE} makedb
|
1996-07-27 21:47:42 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# update
|
|
|
|
#
|
|
|
|
# Update the source tree, by running sup and/or running cvs to update to the
|
|
|
|
# latest copy.
|
|
|
|
#
|
1994-08-26 20:16:58 +00:00
|
|
|
update:
|
|
|
|
.if defined(SUP_UPDATE)
|
|
|
|
@echo "--------------------------------------------------------------"
|
1998-04-26 08:40:25 +00:00
|
|
|
@echo "Running ${SUP}"
|
1994-08-26 20:16:58 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
1996-10-05 18:36:38 +00:00
|
|
|
@${SUP} ${SUPFLAGS} ${SUPFILE}
|
1995-09-15 01:09:59 +00:00
|
|
|
.if defined(SUPFILE1)
|
1996-10-05 18:36:38 +00:00
|
|
|
@${SUP} ${SUPFLAGS} ${SUPFILE1}
|
1995-09-15 01:09:59 +00:00
|
|
|
.endif
|
|
|
|
.if defined(SUPFILE2)
|
1996-10-05 18:36:38 +00:00
|
|
|
@${SUP} ${SUPFLAGS} ${SUPFILE2}
|
1995-09-15 01:09:59 +00:00
|
|
|
.endif
|
1994-08-26 20:16:58 +00:00
|
|
|
.endif
|
|
|
|
.if defined(CVS_UPDATE)
|
|
|
|
@echo "--------------------------------------------------------------"
|
|
|
|
@echo "Updating /usr/src from cvs repository" ${CVSROOT}
|
|
|
|
@echo "--------------------------------------------------------------"
|
1998-05-15 17:12:00 +00:00
|
|
|
cd ${.CURDIR}; cvs -q update -P -d
|
1994-08-26 20:16:58 +00:00
|
|
|
.endif
|
1994-08-13 22:47:28 +00:00
|
|
|
|
1996-07-27 21:47:42 +00:00
|
|
|
#
|
|
|
|
# most
|
|
|
|
#
|
|
|
|
# Build most of the user binaries on the existing system libs and includes.
|
|
|
|
#
|
|
|
|
most:
|
1994-08-13 22:47:28 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
1996-07-27 21:47:42 +00:00
|
|
|
@echo " Building programs only"
|
1994-08-13 22:47:28 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
1998-05-15 17:12:00 +00:00
|
|
|
cd ${.CURDIR}/bin; ${MAKE} all
|
|
|
|
cd ${.CURDIR}/sbin; ${MAKE} all
|
|
|
|
cd ${.CURDIR}/libexec; ${MAKE} all
|
|
|
|
cd ${.CURDIR}/usr.bin; ${MAKE} all
|
|
|
|
cd ${.CURDIR}/usr.sbin; ${MAKE} all
|
|
|
|
cd ${.CURDIR}/gnu/libexec; ${MAKE} all
|
|
|
|
cd ${.CURDIR}/gnu/usr.bin; ${MAKE} all
|
|
|
|
cd ${.CURDIR}/gnu/usr.sbin; ${MAKE} all
|
1997-10-06 09:58:11 +00:00
|
|
|
#.if defined(MAKE_KERBEROS4) && !defined(NOCRYPT)
|
1998-05-15 17:12:00 +00:00
|
|
|
# cd ${.CURDIR}/kerberosIV; ${MAKE} most
|
1996-07-27 21:47:42 +00:00
|
|
|
#.endif
|
|
|
|
#.if !defined(NOSECURE) && !defined(NOCRYPT)
|
1998-05-15 17:12:00 +00:00
|
|
|
# cd ${.CURDIR}/secure; ${MAKE} most
|
1996-07-27 21:47:42 +00:00
|
|
|
#.endif
|
1994-08-13 22:47:28 +00:00
|
|
|
|
1996-07-27 21:47:42 +00:00
|
|
|
#
|
|
|
|
# installmost
|
|
|
|
#
|
|
|
|
# Install the binaries built by the 'most' target. This does not include
|
|
|
|
# libraries or include files.
|
|
|
|
#
|
1994-10-15 21:19:56 +00:00
|
|
|
installmost:
|
|
|
|
@echo "--------------------------------------------------------------"
|
|
|
|
@echo " Installing programs only"
|
|
|
|
@echo "--------------------------------------------------------------"
|
1998-05-15 17:12:00 +00:00
|
|
|
cd ${.CURDIR}/bin; ${MAKE} install
|
|
|
|
cd ${.CURDIR}/sbin; ${MAKE} install
|
|
|
|
cd ${.CURDIR}/libexec; ${MAKE} install
|
|
|
|
cd ${.CURDIR}/usr.bin; ${MAKE} install
|
|
|
|
cd ${.CURDIR}/usr.sbin; ${MAKE} install
|
|
|
|
cd ${.CURDIR}/gnu/libexec; ${MAKE} install
|
|
|
|
cd ${.CURDIR}/gnu/usr.bin; ${MAKE} install
|
|
|
|
cd ${.CURDIR}/gnu/usr.sbin; ${MAKE} install
|
1997-10-06 09:58:11 +00:00
|
|
|
#.if defined(MAKE_KERBEROS4) && !defined(NOCRYPT)
|
1998-05-15 17:12:00 +00:00
|
|
|
# cd ${.CURDIR}/kerberosIV; ${MAKE} installmost
|
1994-10-15 21:19:56 +00:00
|
|
|
#.endif
|
|
|
|
#.if !defined(NOSECURE) && !defined(NOCRYPT)
|
1998-05-15 17:12:00 +00:00
|
|
|
# cd ${.CURDIR}/secure; ${MAKE} installmost
|
1994-10-15 21:19:56 +00:00
|
|
|
#.endif
|
|
|
|
|
1996-07-27 21:47:42 +00:00
|
|
|
#
|
|
|
|
# ------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# From here onwards are utility targets used by the 'make world' and
|
|
|
|
# related targets. If your 'world' breaks, you may like to try to fix
|
|
|
|
# the problem and manually run the following targets to attempt to
|
|
|
|
# complete the build. Beware, this is *not* guaranteed to work, you
|
|
|
|
# need to have a pretty good grip on the current state of the system
|
|
|
|
# to attempt to manually finish it. If in doubt, 'make world' again.
|
|
|
|
#
|
1994-10-15 21:19:56 +00:00
|
|
|
|
1996-07-27 21:47:42 +00:00
|
|
|
#
|
|
|
|
# heirarchy - ensure that all the needed directories are present
|
|
|
|
#
|
|
|
|
hierarchy:
|
1998-05-15 17:12:00 +00:00
|
|
|
cd ${.CURDIR}/etc; ${MAKE} distrib-dirs
|
1996-07-27 21:47:42 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# bootstrap - [re]build tools needed to run the actual build, this includes
|
|
|
|
# tools needed by 'make depend', as some tools are needed to generate source
|
|
|
|
# for the dependency information to be gathered from.
|
|
|
|
#
|
|
|
|
bootstrap:
|
1997-08-05 03:49:49 +00:00
|
|
|
.if defined(DESTDIR)
|
|
|
|
rm -f ${DESTDIR}/usr/src/sys
|
|
|
|
ln -s ${.CURDIR}/sys ${DESTDIR}/usr/src
|
1998-05-15 17:12:00 +00:00
|
|
|
cd ${.CURDIR}/include; find -dx . | cpio -dump ${DESTDIR}/usr/include
|
1998-05-28 12:31:42 +00:00
|
|
|
.for d in net netinet posix4 sys vm machine
|
|
|
|
if [ -h ${DESTDIR}/usr/include/$d ]; then \
|
|
|
|
rm -f ${DESTDIR}/usr/include/$d ; \
|
|
|
|
fi
|
|
|
|
.endfor
|
1998-05-27 18:50:01 +00:00
|
|
|
cd ${.CURDIR}/sys; \
|
|
|
|
find -dx net netinet posix4 sys vm -name '*.h' -o -type d | \
|
|
|
|
cpio -dump ${DESTDIR}/usr/include
|
|
|
|
mkdir -p ${DESTDIR}/usr/include/machine
|
1998-06-04 12:02:52 +00:00
|
|
|
cd ${.CURDIR}/sys/${MACHINE_ARCH}/include; find -dx . -name '*.h' -o -type d | \
|
1998-05-27 18:50:01 +00:00
|
|
|
cpio -dump ${DESTDIR}/usr/include/machine
|
1997-08-05 03:49:49 +00:00
|
|
|
.endif
|
1998-05-15 17:12:00 +00:00
|
|
|
cd ${.CURDIR}/usr.bin/make; ${MAKE} ${MK_FLAGS} ${_DEPEND}; \
|
|
|
|
${MAKE} ${MK_FLAGS} all; \
|
1997-10-05 09:40:24 +00:00
|
|
|
${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
|
1998-05-15 17:12:00 +00:00
|
|
|
cd ${.CURDIR}/usr.bin/xinstall; ${MAKE} ${MK_FLAGS} ${_DEPEND}; \
|
|
|
|
${MAKE} ${MK_FLAGS} all; \
|
1997-10-05 09:40:24 +00:00
|
|
|
${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
|
1998-06-17 09:34:42 +00:00
|
|
|
cd ${.CURDIR}/usr.bin/yacc; ${MAKE} ${MK_FLAGS} ${_DEPEND}; \
|
|
|
|
${MAKE} ${MK_FLAGS} all; \
|
|
|
|
${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
|
1998-05-15 17:12:00 +00:00
|
|
|
cd ${.CURDIR}/usr.bin/lex; ${MAKE} bootstrap; \
|
|
|
|
${MAKE} ${MK_FLAGS} ${_DEPEND}; \
|
|
|
|
${MAKE} ${MK_FLAGS} -DNOLIB all; \
|
1998-06-06 00:56:23 +00:00
|
|
|
${MAKE} ${MK_FLAGS} -DNOLIB -B install ${CLEANDIR}
|
|
|
|
.if !defined(NOOBJDIR)
|
|
|
|
cd ${.CURDIR}/usr.bin/lex; ${MAKE} ${OBJDIR}
|
|
|
|
.endif
|
1998-06-05 16:50:45 +00:00
|
|
|
cd ${.CURDIR}/usr.sbin/mtree; ${MAKE} ${MK_FLAGS} ${_DEPEND}; \
|
|
|
|
${MAKE} ${MK_FLAGS} all; \
|
|
|
|
${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
|
1998-05-27 18:50:01 +00:00
|
|
|
.if defined(DESTDIR)
|
|
|
|
cd ${.CURDIR}/include && ${MAKE} copies
|
|
|
|
.endif
|
1996-07-27 21:47:42 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# include-tools - generally the same as 'bootstrap', except that it's for
|
|
|
|
# things that are specifically needed to generate include files.
|
|
|
|
#
|
1997-08-05 03:49:49 +00:00
|
|
|
# XXX should be merged with bootstrap, it's not worth keeeping them separate.
|
|
|
|
# Well, maybe it is now. We force 'cleandepend' here to avoid dependencies
|
|
|
|
# on cleaned away headers in ${WORLDTMP}.
|
1996-07-27 21:47:42 +00:00
|
|
|
#
|
|
|
|
include-tools:
|
1998-03-12 13:19:59 +00:00
|
|
|
.for d in usr.bin/compile_et usr.bin/rpcgen
|
1998-05-15 17:12:00 +00:00
|
|
|
cd ${.CURDIR}/$d; ${MAKE} cleandepend; \
|
|
|
|
${MAKE} ${MK_FLAGS} ${_DEPEND}; \
|
|
|
|
${MAKE} ${MK_FLAGS} all; \
|
1997-10-05 09:40:24 +00:00
|
|
|
${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
|
1998-03-12 13:19:59 +00:00
|
|
|
.endfor
|
1996-07-27 21:47:42 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# includes - possibly generate and install the include files.
|
|
|
|
#
|
1996-02-17 14:23:25 +00:00
|
|
|
includes:
|
1994-08-13 22:47:28 +00:00
|
|
|
.if defined(CLOBBER)
|
1995-03-18 07:02:10 +00:00
|
|
|
rm -rf ${DESTDIR}/usr/include/*
|
|
|
|
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
|
|
|
|
-p ${DESTDIR}/usr/include
|
1994-08-13 22:47:28 +00:00
|
|
|
.endif
|
1998-05-15 17:12:00 +00:00
|
|
|
cd ${.CURDIR}/include; ${MAKE} -B all install
|
|
|
|
cd ${.CURDIR}/gnu/include; ${MAKE} install
|
|
|
|
cd ${.CURDIR}/gnu/lib/libmp; ${MAKE} beforeinstall
|
|
|
|
cd ${.CURDIR}/gnu/lib/libobjc; ${MAKE} beforeinstall
|
|
|
|
cd ${.CURDIR}/gnu/lib/libreadline; ${MAKE} beforeinstall
|
|
|
|
cd ${.CURDIR}/gnu/lib/libregex; ${MAKE} beforeinstall
|
|
|
|
cd ${.CURDIR}/gnu/lib/libstdc++; ${MAKE} beforeinstall
|
|
|
|
cd ${.CURDIR}/gnu/lib/libg++; ${MAKE} beforeinstall
|
|
|
|
cd ${.CURDIR}/gnu/lib/libdialog; ${MAKE} beforeinstall
|
|
|
|
cd ${.CURDIR}/gnu/lib/libgmp; ${MAKE} beforeinstall
|
1997-10-06 09:58:11 +00:00
|
|
|
.if exists(secure) && !defined(NOCRYPT)
|
1998-05-15 17:12:00 +00:00
|
|
|
cd ${.CURDIR}/secure/lib/libdes; ${MAKE} beforeinstall
|
1997-10-06 09:58:11 +00:00
|
|
|
.endif
|
|
|
|
.if exists(kerberosIV) && !defined(NOCRYPT) && defined(MAKE_KERBEROS4)
|
1998-05-15 17:12:00 +00:00
|
|
|
cd ${.CURDIR}/kerberosIV/lib/libacl; ${MAKE} beforeinstall
|
|
|
|
cd ${.CURDIR}/kerberosIV/lib/libkadm; ${MAKE} beforeinstall
|
|
|
|
cd ${.CURDIR}/kerberosIV/lib/libkafs; ${MAKE} beforeinstall
|
|
|
|
cd ${.CURDIR}/kerberosIV/lib/libkdb; ${MAKE} beforeinstall
|
|
|
|
cd ${.CURDIR}/kerberosIV/lib/libkrb; ${MAKE} beforeinstall
|
|
|
|
cd ${.CURDIR}/kerberosIV/lib/libtelnet; ${MAKE} beforeinstall
|
1997-10-06 09:58:11 +00:00
|
|
|
.else
|
1998-05-15 17:12:00 +00:00
|
|
|
cd ${.CURDIR}/lib/libtelnet; ${MAKE} beforeinstall
|
1994-08-13 22:47:28 +00:00
|
|
|
.endif
|
1998-01-11 04:51:02 +00:00
|
|
|
.if exists(${.CURDIR}/lib/csu/${MACHINE})
|
1998-05-15 17:12:00 +00:00
|
|
|
cd ${.CURDIR}/lib/csu/${MACHINE}; ${MAKE} beforeinstall
|
|
|
|
.endif
|
|
|
|
cd ${.CURDIR}/lib/libalias; ${MAKE} beforeinstall
|
|
|
|
cd ${.CURDIR}/lib/libc; ${MAKE} beforeinstall
|
|
|
|
cd ${.CURDIR}/lib/libcalendar; ${MAKE} beforeinstall
|
|
|
|
cd ${.CURDIR}/lib/libcurses; ${MAKE} beforeinstall
|
|
|
|
cd ${.CURDIR}/lib/libdisk; ${MAKE} beforeinstall
|
|
|
|
cd ${.CURDIR}/lib/libedit; ${MAKE} beforeinstall
|
|
|
|
cd ${.CURDIR}/lib/libftpio; ${MAKE} beforeinstall
|
|
|
|
cd ${.CURDIR}/lib/libmd; ${MAKE} beforeinstall
|
|
|
|
cd ${.CURDIR}/lib/libmytinfo; ${MAKE} beforeinstall
|
|
|
|
cd ${.CURDIR}/lib/libncurses; ${MAKE} beforeinstall
|
1995-03-23 19:03:02 +00:00
|
|
|
.if !defined(WANT_CSRG_LIBM)
|
1998-05-15 17:12:00 +00:00
|
|
|
cd ${.CURDIR}/lib/msun; ${MAKE} beforeinstall
|
1994-09-30 16:08:47 +00:00
|
|
|
.endif
|
1998-05-15 17:12:00 +00:00
|
|
|
cd ${.CURDIR}/lib/libopie; ${MAKE} beforeinstall
|
|
|
|
cd ${.CURDIR}/lib/libpcap; ${MAKE} beforeinstall
|
|
|
|
cd ${.CURDIR}/lib/librpcsvc; ${MAKE} beforeinstall
|
|
|
|
cd ${.CURDIR}/lib/libskey; ${MAKE} beforeinstall
|
1997-10-06 09:58:11 +00:00
|
|
|
.if !defined(NOTCL) && exists (${.CURDIR}/contrib/tcl) && \
|
|
|
|
exists(${.CURDIR}/usr.bin/tclsh) && exists (${.CURDIR}/lib/libtcl)
|
1998-05-15 17:12:00 +00:00
|
|
|
cd ${.CURDIR}/lib/libtcl; ${MAKE} installhdrs
|
1997-10-06 09:58:11 +00:00
|
|
|
.endif
|
1998-05-15 17:12:00 +00:00
|
|
|
cd ${.CURDIR}/lib/libtermcap; ${MAKE} beforeinstall
|
|
|
|
cd ${.CURDIR}/lib/libcom_err; ${MAKE} beforeinstall
|
|
|
|
cd ${.CURDIR}/lib/libss; ${MAKE} -B hdrs beforeinstall
|
|
|
|
cd ${.CURDIR}/lib/libscsi; ${MAKE} beforeinstall
|
|
|
|
cd ${.CURDIR}/lib/libutil; ${MAKE} beforeinstall
|
|
|
|
cd ${.CURDIR}/lib/libvgl; ${MAKE} beforeinstall
|
|
|
|
cd ${.CURDIR}/lib/libz; ${MAKE} beforeinstall
|
|
|
|
cd ${.CURDIR}/usr.bin/f2c; ${MAKE} beforeinstall
|
|
|
|
cd ${.CURDIR}/usr.bin/lex; ${MAKE} beforeinstall
|
1994-08-13 22:47:28 +00:00
|
|
|
|
1998-06-04 12:02:52 +00:00
|
|
|
#
|
|
|
|
# Declare tools if they are not required on all architectures.
|
|
|
|
#
|
|
|
|
.if ${MACHINE_ARCH} == "i386"
|
|
|
|
# aout tools:
|
|
|
|
_aout_ar = usr.bin/ar
|
|
|
|
_aout_as = gnu/usr.bin/as
|
|
|
|
_aout_ld = gnu/usr.bin/ld
|
|
|
|
_aout_nm = usr.bin/nm
|
|
|
|
_aout_ranlib = usr.bin/ranlib
|
|
|
|
_aout_size = usr.bin/size
|
|
|
|
_aout_strip = usr.bin/strip
|
|
|
|
_objformat = usr.bin/objformat
|
|
|
|
.endif
|
|
|
|
|
1996-07-27 21:47:42 +00:00
|
|
|
#
|
|
|
|
# lib-tools - build tools to compile and install the libraries.
|
|
|
|
#
|
1997-08-05 03:49:49 +00:00
|
|
|
# XXX gperf is required for cc
|
|
|
|
# XXX a new ld and tsort is required for cc
|
1995-01-03 22:03:25 +00:00
|
|
|
lib-tools:
|
1997-08-05 03:49:49 +00:00
|
|
|
.for d in \
|
|
|
|
gnu/usr.bin/gperf \
|
1998-06-04 12:02:52 +00:00
|
|
|
${_aout_ld} \
|
1997-08-05 03:49:49 +00:00
|
|
|
usr.bin/tsort \
|
1998-06-04 12:02:52 +00:00
|
|
|
${_aout_as} \
|
1997-08-05 03:49:49 +00:00
|
|
|
gnu/usr.bin/bison \
|
|
|
|
gnu/usr.bin/cc \
|
1998-06-04 12:02:52 +00:00
|
|
|
${_aout_ar} \
|
1998-06-06 01:13:21 +00:00
|
|
|
usr.bin/env \
|
1997-08-05 03:49:49 +00:00
|
|
|
usr.bin/lex/lib \
|
|
|
|
usr.bin/mk_cmds \
|
1998-06-04 12:02:52 +00:00
|
|
|
${_aout_nm} \
|
|
|
|
${_aout_ranlib} \
|
|
|
|
${_aout_strip} \
|
1998-05-25 17:34:42 +00:00
|
|
|
gnu/usr.bin/binutils \
|
1998-05-27 15:40:35 +00:00
|
|
|
usr.bin/uudecode \
|
1998-06-04 12:02:52 +00:00
|
|
|
${_objformat}
|
1998-05-15 17:12:00 +00:00
|
|
|
cd ${.CURDIR}/$d; ${MAKE} ${MK_FLAGS} ${_DEPEND}; \
|
|
|
|
${MAKE} ${MK_FLAGS} all; \
|
|
|
|
${MAKE} ${MK_FLAGS} -B install; \
|
1998-03-14 13:58:21 +00:00
|
|
|
${MAKE} ${MK_FLAGS:S/-DNOPIC//} -B ${CLEANDIR} ${OBJDIR}
|
1997-08-05 03:49:49 +00:00
|
|
|
.endfor
|
1995-01-03 22:03:25 +00:00
|
|
|
|
1996-07-27 21:47:42 +00:00
|
|
|
#
|
1998-04-24 17:13:33 +00:00
|
|
|
# We have to know too much about ordering and subdirs in the lib trees:
|
1996-07-27 21:47:42 +00:00
|
|
|
#
|
1998-04-24 17:13:33 +00:00
|
|
|
# To satisfy shared library linkage when only the libraries being built
|
|
|
|
# are visible:
|
|
|
|
#
|
|
|
|
# libcom_err must be built before libss.
|
|
|
|
# libcrypt and libmd must be built before libskey.
|
|
|
|
# libm must be built before libtcl.
|
|
|
|
# libmytinfo must be built before libdialog and libncurses.
|
|
|
|
# libncurses must be built before libdialog.
|
|
|
|
# libtermcap must be built before libcurses, libedit and libreadline.
|
|
|
|
#
|
|
|
|
# Some libraries are built conditionally and/or are in inconsistently
|
|
|
|
# named directories:
|
|
|
|
#
|
|
|
|
.if exists(lib/csu/${MACHINE}.pcc)
|
|
|
|
_csu=lib/csu/${MACHINE}.pcc
|
1998-03-13 09:41:58 +00:00
|
|
|
.else
|
1998-04-24 17:13:33 +00:00
|
|
|
_csu=lib/csu/${MACHINE}
|
|
|
|
.endif
|
|
|
|
|
1998-06-06 01:13:21 +00:00
|
|
|
.if !defined(NOSECURE) && !defined(NOCRYPT)
|
|
|
|
_libcrypt= secure/lib/libcrypt lib/libcrypt
|
1998-05-28 13:20:35 +00:00
|
|
|
.else
|
|
|
|
_libcrypt= lib/libcrypt
|
1995-05-05 18:00:30 +00:00
|
|
|
.endif
|
1998-03-13 09:41:58 +00:00
|
|
|
|
|
|
|
.if defined(WANT_CSRG_LIBM)
|
1998-04-24 17:13:33 +00:00
|
|
|
_libm= lib/libm
|
1998-03-13 09:41:58 +00:00
|
|
|
.else
|
1998-04-24 17:13:33 +00:00
|
|
|
_libm= lib/msun
|
1995-05-13 03:34:23 +00:00
|
|
|
.endif
|
1998-03-13 09:41:58 +00:00
|
|
|
|
|
|
|
#
|
1998-04-24 17:13:33 +00:00
|
|
|
# bootstrap-libraries - build just enough libraries for the bootstrap
|
|
|
|
# tools, and install them under ${WORLDTMP}.
|
1998-03-13 09:41:58 +00:00
|
|
|
#
|
1998-04-24 17:13:33 +00:00
|
|
|
# Build csu and libgcc early so that some tools get linked to the new
|
|
|
|
# versions (too late for the main tools, however). Then build the
|
|
|
|
# necessary prerequisite libraries (libtermcap just needs to be before
|
|
|
|
# libcurses, and this only matters for the NOCLEAN case when NOPIC is
|
|
|
|
# not set).
|
1998-03-13 09:41:58 +00:00
|
|
|
#
|
1998-04-24 17:13:33 +00:00
|
|
|
# This is mostly wrong. The build tools must run on the host system,
|
|
|
|
# so they should use host libraries. We depend on the target being
|
|
|
|
# similar enough to the host for new target libraries to work on the
|
|
|
|
# host.
|
1998-03-13 09:41:58 +00:00
|
|
|
#
|
1998-04-24 17:13:33 +00:00
|
|
|
bootstrap-libraries:
|
|
|
|
.for _lib in ${_csu} gnu/usr.bin/cc/libgcc lib/libtermcap \
|
1998-05-26 20:12:56 +00:00
|
|
|
gnu/lib/libregex gnu/lib/libreadline lib/libc \
|
1998-05-28 13:20:35 +00:00
|
|
|
${_libcrypt} lib/libcurses lib/libedit ${_libm} \
|
1998-04-24 17:13:33 +00:00
|
|
|
lib/libmd lib/libutil lib/libz usr.bin/lex/lib
|
1998-03-13 09:41:58 +00:00
|
|
|
.if exists(${.CURDIR}/${_lib})
|
1998-05-15 17:12:00 +00:00
|
|
|
cd ${.CURDIR}/${_lib}; \
|
|
|
|
${MAKE} ${MK_FLAGS} ${_DEPEND}; \
|
|
|
|
${MAKE} ${MK_FLAGS} all; \
|
1997-10-05 09:40:24 +00:00
|
|
|
${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
|
1995-05-05 18:00:30 +00:00
|
|
|
.endif
|
1998-03-13 09:41:58 +00:00
|
|
|
.endfor
|
1998-04-24 17:13:33 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# libraries - build all libraries, and install them under ${DESTDIR}.
|
|
|
|
#
|
|
|
|
# The ordering is not as special as for bootstrap-libraries. Build
|
|
|
|
# the prerequisites first, then build almost everything else in
|
|
|
|
# alphabetical order.
|
|
|
|
#
|
|
|
|
libraries:
|
|
|
|
.for _lib in lib/libcom_err ${_libcrypt} ${_libm} lib/libmytinfo \
|
|
|
|
lib/libncurses lib/libtermcap \
|
|
|
|
gnu/lib gnu/usr.bin/cc/libgcc lib usr.bin/lex/lib usr.sbin/pcvt/keycap
|
|
|
|
.if exists(${.CURDIR}/${_lib})
|
1998-05-15 17:12:00 +00:00
|
|
|
cd ${.CURDIR}/${_lib}; ${MAKE} all; ${MAKE} -B install
|
1998-04-24 17:13:33 +00:00
|
|
|
.endif
|
|
|
|
.endfor
|
1998-03-13 09:41:58 +00:00
|
|
|
.if exists(${.CURDIR}/secure/lib) && !defined(NOCRYPT) && !defined(NOSECURE)
|
1998-05-15 17:12:00 +00:00
|
|
|
cd ${.CURDIR}/secure/lib; ${MAKE} all; ${MAKE} -B install
|
1994-08-20 21:34:59 +00:00
|
|
|
.endif
|
1998-03-13 09:41:58 +00:00
|
|
|
.if exists(${.CURDIR}/kerberosIV/lib) && !defined(NOCRYPT) && \
|
|
|
|
defined(MAKE_KERBEROS4)
|
1998-05-15 17:12:00 +00:00
|
|
|
cd ${.CURDIR}/kerberosIV/lib; ${MAKE} all; ${MAKE} -B install
|
1995-05-06 03:59:58 +00:00
|
|
|
.endif
|
1994-08-13 22:47:28 +00:00
|
|
|
|
1998-06-02 18:28:55 +00:00
|
|
|
# Exclude perl from the build-tools if NOPERL is defined.
|
|
|
|
.if defined(NOPERL)
|
|
|
|
_perl=
|
|
|
|
.else
|
|
|
|
_perl= gnu/usr.bin/perl/perl
|
|
|
|
.endif
|
|
|
|
|
1996-07-27 21:47:42 +00:00
|
|
|
#
|
|
|
|
# build-tools - build and install any other tools needed to complete the
|
|
|
|
# compile and install.
|
1997-08-05 03:49:49 +00:00
|
|
|
# ifdef stale
|
|
|
|
# bc and cpp are required to build groff. Otherwise, the order here is
|
|
|
|
# mostly historical, i.e., bogus.
|
|
|
|
# chmod is used to build gcc's tmpmultilib[2] at obscure times.
|
|
|
|
# endif stale
|
|
|
|
# XXX uname is a bug - the target should not depend on the host.
|
1996-07-27 21:47:42 +00:00
|
|
|
#
|
1995-10-26 09:24:59 +00:00
|
|
|
build-tools:
|
1996-10-25 14:22:50 +00:00
|
|
|
.for d in \
|
1997-08-05 03:49:49 +00:00
|
|
|
bin/cat \
|
|
|
|
bin/chmod \
|
|
|
|
bin/cp \
|
|
|
|
bin/date \
|
|
|
|
bin/dd \
|
|
|
|
bin/echo \
|
|
|
|
bin/expr \
|
|
|
|
bin/hostname \
|
|
|
|
bin/ln \
|
|
|
|
bin/ls \
|
|
|
|
bin/mkdir \
|
|
|
|
bin/mv \
|
|
|
|
bin/rm \
|
|
|
|
bin/test \
|
|
|
|
gnu/usr.bin/awk \
|
|
|
|
gnu/usr.bin/bc \
|
|
|
|
gnu/usr.bin/grep \
|
|
|
|
gnu/usr.bin/groff \
|
|
|
|
gnu/usr.bin/gzip \
|
|
|
|
gnu/usr.bin/man/makewhatis \
|
1998-05-02 12:29:48 +00:00
|
|
|
gnu/usr.bin/patch \
|
1998-06-02 18:28:55 +00:00
|
|
|
${_perl} \
|
1997-08-05 03:49:49 +00:00
|
|
|
gnu/usr.bin/sort \
|
1998-03-12 10:55:02 +00:00
|
|
|
gnu/usr.bin/texinfo \
|
1997-08-05 03:49:49 +00:00
|
|
|
usr.bin/basename \
|
|
|
|
usr.bin/cap_mkdb \
|
|
|
|
usr.bin/chflags \
|
|
|
|
usr.bin/cmp \
|
|
|
|
usr.bin/col \
|
|
|
|
usr.bin/cpp \
|
|
|
|
usr.bin/expand \
|
|
|
|
usr.bin/file2c \
|
|
|
|
usr.bin/find \
|
|
|
|
usr.bin/gencat \
|
1998-05-29 05:14:08 +00:00
|
|
|
usr.bin/id \
|
1998-06-13 02:03:36 +00:00
|
|
|
usr.bin/join \
|
1997-08-05 03:49:49 +00:00
|
|
|
usr.bin/lorder \
|
|
|
|
usr.bin/m4 \
|
|
|
|
usr.bin/mkdep \
|
|
|
|
usr.bin/paste \
|
|
|
|
usr.bin/sed \
|
1998-06-04 12:02:52 +00:00
|
|
|
${_aout_size} \
|
1997-08-05 03:49:49 +00:00
|
|
|
usr.bin/soelim \
|
1996-10-25 14:22:50 +00:00
|
|
|
usr.bin/symorder \
|
1997-08-05 03:49:49 +00:00
|
|
|
usr.bin/touch \
|
|
|
|
usr.bin/tr \
|
|
|
|
usr.bin/true \
|
|
|
|
usr.bin/uname \
|
|
|
|
usr.bin/uuencode \
|
|
|
|
usr.bin/vgrind \
|
|
|
|
usr.bin/vi \
|
|
|
|
usr.bin/wc \
|
1998-03-19 16:43:19 +00:00
|
|
|
usr.bin/xargs \
|
1997-08-05 03:49:49 +00:00
|
|
|
usr.bin/yacc \
|
|
|
|
usr.sbin/chown \
|
|
|
|
usr.sbin/mtree \
|
1998-05-29 05:15:47 +00:00
|
|
|
usr.sbin/zic \
|
|
|
|
bin/sh
|
1998-05-15 17:12:00 +00:00
|
|
|
cd ${.CURDIR}/$d; ${MAKE} ${MK_FLAGS} ${_DEPEND}; \
|
|
|
|
${MAKE} ${MK_FLAGS} all; \
|
1997-10-05 09:40:24 +00:00
|
|
|
${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
|
|
|
|
.endfor
|
|
|
|
|
1998-04-27 16:21:33 +00:00
|
|
|
.for __target in clean cleandepend cleandir depend obj
|
1997-10-05 09:40:24 +00:00
|
|
|
.for entry in ${SUBDIR}
|
|
|
|
${entry}.${__target}__D: .PHONY
|
1998-04-19 13:44:52 +00:00
|
|
|
@if test -d ${.CURDIR}/${entry}.${MACHINE}; then \
|
1997-10-05 09:40:24 +00:00
|
|
|
${ECHODIR} "===> ${DIRPRFX}${entry}.${MACHINE}"; \
|
|
|
|
edir=${entry}.${MACHINE}; \
|
|
|
|
cd ${.CURDIR}/$${edir}; \
|
|
|
|
else \
|
|
|
|
${ECHODIR} "===> ${DIRPRFX}${entry}"; \
|
|
|
|
edir=${entry}; \
|
|
|
|
cd ${.CURDIR}/$${edir}; \
|
|
|
|
fi; \
|
|
|
|
${MAKE} ${__target} DIRPRFX=${DIRPRFX}$${edir}/
|
|
|
|
.endfor
|
|
|
|
par-${__target}: ${SUBDIR:S/$/.${__target}__D/}
|
1996-10-25 14:22:50 +00:00
|
|
|
.endfor
|
1994-08-13 22:47:28 +00:00
|
|
|
|
1998-01-11 04:51:02 +00:00
|
|
|
.endif
|
|
|
|
|
1994-05-27 12:42:53 +00:00
|
|
|
.include <bsd.subdir.mk>
|