1994-08-14 00:47:28 +02:00
|
|
|
#
|
1995-05-30 01:50:55 +02:00
|
|
|
# $Id: Makefile,v 1.56 1995/05/13 03:34:23 rgrimes Exp $
|
1994-08-14 00:47:28 +02:00
|
|
|
#
|
|
|
|
# Make command line options:
|
1995-05-30 01:50:55 +02:00
|
|
|
# -DCLOBBER will remove /usr/include and MOST of /usr/lib
|
1994-08-14 00:47:28 +02:00
|
|
|
# -DMAKE_LOCAL to add ./local to the SUBDIR list
|
|
|
|
# -DMAKE_PORTS to add ./ports to the SUBDIR list
|
1994-09-29 14:06:54 +01:00
|
|
|
# -DMAKE_EBONES to build eBones (KerberosIV)
|
|
|
|
#
|
1994-08-14 00:47:28 +02:00
|
|
|
# -DNOCLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir
|
1994-08-20 23:34:59 +02:00
|
|
|
# -DNOCRYPT will prevent building of crypt versions
|
1994-09-16 22:24:29 +02:00
|
|
|
# -DNOLKM do not build loadable kernel modules
|
1994-08-14 00:47:28 +02:00
|
|
|
# -DNOOBJDIR do not run ``${MAKE} obj''
|
|
|
|
# -DNOPROFILE do not build profiled libraries
|
1994-08-20 23:34:59 +02:00
|
|
|
# -DNOSECURE do not go into secure subdir
|
1994-05-27 14:42:53 +02:00
|
|
|
|
1994-08-14 00:47:28 +02:00
|
|
|
# Put initial settings here.
|
|
|
|
SUBDIR=
|
1994-05-27 14:42:53 +02:00
|
|
|
|
1995-03-27 03:31:09 +02:00
|
|
|
# We must do include and lib first so that the perl *.ph generation
|
|
|
|
# works correctly as it uses the header files installed by this.
|
1995-03-17 05:59:44 +01:00
|
|
|
.if exists(include)
|
|
|
|
SUBDIR+= include
|
|
|
|
.endif
|
1995-03-27 03:31:09 +02:00
|
|
|
.if exists(lib)
|
|
|
|
SUBDIR+= lib
|
|
|
|
.endif
|
1995-03-17 05:59:44 +01:00
|
|
|
|
1994-08-14 00:47:28 +02:00
|
|
|
.if exists(bin)
|
|
|
|
SUBDIR+= bin
|
|
|
|
.endif
|
|
|
|
.if exists(contrib)
|
|
|
|
SUBDIR+= contrib
|
|
|
|
.endif
|
|
|
|
.if exists(games)
|
|
|
|
SUBDIR+= games
|
|
|
|
.endif
|
|
|
|
.if exists(gnu)
|
|
|
|
SUBDIR+= gnu
|
|
|
|
.endif
|
1994-09-29 14:06:54 +01:00
|
|
|
.if exists(eBones) && !defined(NOCRYPT) && defined(MAKE_EBONES)
|
1994-09-09 22:29:20 +02:00
|
|
|
SUBDIR+= eBones
|
|
|
|
.endif
|
1994-08-14 00:47:28 +02:00
|
|
|
.if exists(libexec)
|
|
|
|
SUBDIR+= libexec
|
|
|
|
.endif
|
|
|
|
.if exists(sbin)
|
|
|
|
SUBDIR+= sbin
|
|
|
|
.endif
|
|
|
|
.if exists(share)
|
|
|
|
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 22:24:29 +02:00
|
|
|
.if exists(secure) && !defined(NOCRYPT) && !defined(NOSECURE)
|
|
|
|
SUBDIR+= secure
|
|
|
|
.endif
|
|
|
|
.if exists(lkm) && !defined(NOLKM)
|
|
|
|
SUBDIR+= lkm
|
|
|
|
.endif
|
1994-08-14 00:47:28 +02:00
|
|
|
|
1994-11-14 21:52:54 +01:00
|
|
|
# etc must be last for "distribute" to work
|
|
|
|
.if exists(etc) && make(distribute)
|
|
|
|
SUBDIR+= etc
|
|
|
|
.endif
|
|
|
|
|
1994-08-14 00:47:28 +02:00
|
|
|
# These are last, since it is nice to at least get the base system
|
|
|
|
# rebuilt before you do them.
|
|
|
|
.if defined(MAKE_LOCAL) & exists(local) & exists(local/Makefile)
|
|
|
|
SUBDIR+= local
|
|
|
|
.endif
|
|
|
|
.if defined(MAKE_PORTS) & exists(ports) & exists(ports/Makefile)
|
|
|
|
SUBDIR+= ports
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# Handle the -DNOOBJDIR and -DNOCLEANDIR
|
|
|
|
.if defined(NOOBJDIR)
|
|
|
|
OBJDIR=
|
|
|
|
.else
|
|
|
|
OBJDIR= obj
|
|
|
|
.endif
|
|
|
|
.if defined(NOCLEANDIR)
|
|
|
|
CLEANDIR= clean
|
1995-05-30 01:50:55 +02:00
|
|
|
.else
|
1994-08-14 00:47:28 +02:00
|
|
|
CLEANDIR= cleandir
|
|
|
|
.endif
|
|
|
|
|
1995-01-11 12:52:50 +01:00
|
|
|
world: hierarchy mk cleandist includes lib-tools libraries tools
|
1994-08-14 00:47:28 +02:00
|
|
|
@echo "--------------------------------------------------------------"
|
|
|
|
@echo " Rebuilding ${DESTDIR} The whole thing"
|
|
|
|
@echo "--------------------------------------------------------------"
|
|
|
|
@echo
|
|
|
|
${MAKE} depend all install
|
|
|
|
cd ${.CURDIR}/share/man && ${MAKE} makedb
|
|
|
|
|
1994-09-23 11:01:20 +02:00
|
|
|
hierarchy:
|
1994-08-14 00:47:28 +02:00
|
|
|
@echo "--------------------------------------------------------------"
|
1994-09-23 11:01:20 +02:00
|
|
|
@echo " Making hierarchy"
|
1994-08-14 00:47:28 +02:00
|
|
|
@echo "--------------------------------------------------------------"
|
1995-02-26 02:27:27 +01:00
|
|
|
cd ${.CURDIR}/etc && ${MAKE} distrib-dirs
|
1994-08-26 22:16:58 +02:00
|
|
|
|
|
|
|
update:
|
|
|
|
.if defined(SUP_UPDATE)
|
|
|
|
@echo "--------------------------------------------------------------"
|
|
|
|
@echo "Running sup"
|
|
|
|
@echo "--------------------------------------------------------------"
|
|
|
|
@sup -v ${SUPFILE}
|
|
|
|
.endif
|
|
|
|
.if defined(CVS_UPDATE)
|
|
|
|
@echo "--------------------------------------------------------------"
|
|
|
|
@echo "Updating /usr/src from cvs repository" ${CVSROOT}
|
|
|
|
@echo "--------------------------------------------------------------"
|
|
|
|
cd ${.CURDIR} && cvs update -P -d
|
|
|
|
.endif
|
1994-08-14 00:47:28 +02:00
|
|
|
|
|
|
|
cleandist:
|
|
|
|
.if !defined(NOCLEANDIR)
|
|
|
|
@echo "--------------------------------------------------------------"
|
|
|
|
@echo " Cleaning up the source tree, and rebuilding the obj tree"
|
|
|
|
@echo "--------------------------------------------------------------"
|
|
|
|
@echo
|
|
|
|
here=`pwd`; dest=/usr/obj`echo $$here | sed 's,^/usr/src,,'`; \
|
|
|
|
if test -d /usr/obj -a ! -d $$dest; then \
|
|
|
|
mkdir -p $$dest; \
|
|
|
|
else \
|
|
|
|
true; \
|
|
|
|
fi; \
|
|
|
|
cd $$dest && rm -rf ${SUBDIR}
|
|
|
|
find . -name obj | xargs rm -rf
|
|
|
|
.if defined(MAKE_LOCAL) & exists(local) & exists(local/Makefile)
|
|
|
|
# The cd is done as local may well be a symbolic link
|
|
|
|
-cd local && find . -name obj | xargs rm -rf
|
|
|
|
.endif
|
|
|
|
.if defined(MAKE_PORTS) & exists(ports) & exists(ports/Makefile)
|
|
|
|
# The cd is done as local may well be a symbolic link
|
|
|
|
-cd ports && find . -name obj | xargs rm -rf
|
|
|
|
.endif
|
|
|
|
${MAKE} cleandir
|
|
|
|
${MAKE} obj
|
|
|
|
.endif
|
|
|
|
|
1994-10-15 22:19:56 +01:00
|
|
|
installmost:
|
|
|
|
@echo "--------------------------------------------------------------"
|
|
|
|
@echo " Installing programs only"
|
|
|
|
@echo "--------------------------------------------------------------"
|
|
|
|
cd ${.CURDIR}/bin && ${MAKE} ${.MAKEFLAGS} install
|
|
|
|
cd ${.CURDIR}/sbin && ${MAKE} ${.MAKEFLAGS} install
|
|
|
|
cd ${.CURDIR}/libexec && ${MAKE} ${.MAKEFLAGS} install
|
|
|
|
cd ${.CURDIR}/usr.bin && ${MAKE} ${.MAKEFLAGS} install
|
|
|
|
cd ${.CURDIR}/usr.sbin && ${MAKE} ${.MAKEFLAGS} install
|
|
|
|
cd ${.CURDIR}/gnu/libexec && ${MAKE} ${.MAKEFLAGS} install
|
|
|
|
cd ${.CURDIR}/gnu/usr.bin && ${MAKE} ${.MAKEFLAGS} install
|
1995-03-14 22:32:46 +01:00
|
|
|
cd ${.CURDIR}/gnu/usr.sbin && ${MAKE} ${.MAKEFLAGS} install
|
1994-10-15 22:19:56 +01:00
|
|
|
#.if defined(MAKE_EBONES) && !defined(NOCRYPT)
|
|
|
|
# cd ${.CURDIR}/eBones && ${MAKE} ${.MAKEFLAGS} installmost
|
|
|
|
#.endif
|
|
|
|
#.if !defined(NOSECURE) && !defined(NOCRYPT)
|
|
|
|
# cd ${.CURDIR}/secure && ${MAKE} ${.MAKEFLAGS} installmost
|
|
|
|
#.endif
|
|
|
|
|
|
|
|
most:
|
|
|
|
@echo "--------------------------------------------------------------"
|
|
|
|
@echo " Building programs only"
|
|
|
|
@echo "--------------------------------------------------------------"
|
|
|
|
cd ${.CURDIR}/bin && ${MAKE} ${.MAKEFLAGS} all
|
|
|
|
cd ${.CURDIR}/sbin && ${MAKE} ${.MAKEFLAGS} all
|
|
|
|
cd ${.CURDIR}/libexec && ${MAKE} ${.MAKEFLAGS} all
|
|
|
|
cd ${.CURDIR}/usr.bin && ${MAKE} ${.MAKEFLAGS} all
|
|
|
|
cd ${.CURDIR}/usr.sbin && ${MAKE} ${.MAKEFLAGS} all
|
|
|
|
cd ${.CURDIR}/gnu/libexec && ${MAKE} ${.MAKEFLAGS} all
|
|
|
|
cd ${.CURDIR}/gnu/usr.bin && ${MAKE} ${.MAKEFLAGS} all
|
1995-03-28 20:14:17 +02:00
|
|
|
cd ${.CURDIR}/gnu/usr.sbin && ${MAKE} ${.MAKEFLAGS} all
|
1994-10-15 22:19:56 +01:00
|
|
|
#.if defined(MAKE_EBONES) && !defined(NOCRYPT)
|
|
|
|
# cd ${.CURDIR}/eBones && ${MAKE} ${.MAKEFLAGS} most
|
|
|
|
#.endif
|
|
|
|
#.if !defined(NOSECURE) && !defined(NOCRYPT)
|
|
|
|
# cd ${.CURDIR}/secure && ${MAKE} ${.MAKEFLAGS} most
|
|
|
|
#.endif
|
|
|
|
|
1994-08-14 00:47:28 +02:00
|
|
|
mk:
|
|
|
|
@echo "--------------------------------------------------------------"
|
|
|
|
@echo " Rebuilding ${DESTDIR}/usr/share/mk"
|
|
|
|
@echo "--------------------------------------------------------------"
|
|
|
|
cd ${.CURDIR}/share/mk && ${MAKE} install
|
|
|
|
|
|
|
|
includes:
|
|
|
|
@echo "--------------------------------------------------------------"
|
|
|
|
@echo " Rebuilding ${DESTDIR}/usr/include"
|
|
|
|
@echo "--------------------------------------------------------------"
|
|
|
|
@echo
|
|
|
|
.if defined(CLOBBER)
|
1995-03-18 08:02:10 +01:00
|
|
|
rm -rf ${DESTDIR}/usr/include/*
|
|
|
|
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
|
|
|
|
-p ${DESTDIR}/usr/include
|
1994-08-14 00:47:28 +02:00
|
|
|
.endif
|
|
|
|
cd ${.CURDIR}/include && ${MAKE} install
|
1994-11-08 01:55:08 +01:00
|
|
|
cd ${.CURDIR}/gnu/include && ${MAKE} install
|
1994-09-12 07:17:15 +02:00
|
|
|
cd ${.CURDIR}/gnu/lib/libreadline && ${MAKE} beforeinstall
|
1995-03-06 06:52:47 +01:00
|
|
|
cd ${.CURDIR}/gnu/lib/libregex && ${MAKE} beforeinstall
|
1994-09-12 07:17:15 +02:00
|
|
|
cd ${.CURDIR}/gnu/lib/libg++ && ${MAKE} beforeinstall
|
1994-10-12 00:33:00 +01:00
|
|
|
cd ${.CURDIR}/gnu/lib/libdialog && ${MAKE} beforeinstall
|
1994-09-29 14:06:54 +01:00
|
|
|
.if exists(eBones) && !defined(NOCRYPT) && defined(MAKE_EBONES)
|
|
|
|
cd ${.CURDIR}/eBones/include && ${MAKE} beforeinstall
|
1994-08-14 00:47:28 +02:00
|
|
|
.endif
|
|
|
|
cd ${.CURDIR}/lib/libc && ${MAKE} beforeinstall
|
|
|
|
cd ${.CURDIR}/lib/libcurses && ${MAKE} beforeinstall
|
|
|
|
cd ${.CURDIR}/lib/libedit && ${MAKE} beforeinstall
|
1994-09-19 07:32:31 +02:00
|
|
|
cd ${.CURDIR}/lib/libmd && ${MAKE} beforeinstall
|
1994-10-08 16:08:14 +01:00
|
|
|
cd ${.CURDIR}/lib/libmytinfo && ${MAKE} beforeinstall
|
|
|
|
cd ${.CURDIR}/lib/libncurses && ${MAKE} beforeinstall
|
1995-03-23 20:03:02 +01:00
|
|
|
.if !defined(WANT_CSRG_LIBM)
|
1994-09-30 17:08:47 +01:00
|
|
|
cd ${.CURDIR}/lib/msun && ${MAKE} beforeinstall
|
|
|
|
.endif
|
1995-03-19 18:24:24 +01:00
|
|
|
cd ${.CURDIR}/lib/libpcap && ${MAKE} beforeinstall
|
1994-08-14 00:47:28 +02:00
|
|
|
cd ${.CURDIR}/lib/librpcsvc && ${MAKE} beforeinstall
|
1994-09-29 22:20:12 +01:00
|
|
|
cd ${.CURDIR}/lib/libskey && ${MAKE} beforeinstall
|
1994-12-04 03:46:28 +01:00
|
|
|
cd ${.CURDIR}/lib/libtermcap && ${MAKE} beforeinstall
|
1995-01-20 21:28:31 +01:00
|
|
|
cd ${.CURDIR}/lib/libcom_err && ${MAKE} beforeinstall
|
1995-01-22 00:01:19 +01:00
|
|
|
cd ${.CURDIR}/lib/libss && ${MAKE} beforeinstall
|
1995-01-24 23:15:25 +01:00
|
|
|
cd ${.CURDIR}/lib/libforms && ${MAKE} beforeinstall
|
1995-01-24 23:30:37 +01:00
|
|
|
cd ${.CURDIR}/lib/libscsi && ${MAKE} beforeinstall
|
1995-04-27 13:25:48 +02:00
|
|
|
cd ${.CURDIR}/lib/libftp && ${MAKE} beforeinstall
|
1994-08-14 00:47:28 +02:00
|
|
|
|
1995-01-03 23:03:25 +01:00
|
|
|
lib-tools:
|
|
|
|
@echo "--------------------------------------------------------------"
|
1995-03-06 14:32:58 +01:00
|
|
|
@echo " Rebuilding tools needed to build the libraries"
|
1995-01-03 23:03:25 +01:00
|
|
|
@echo "--------------------------------------------------------------"
|
|
|
|
@echo
|
1995-03-24 00:40:29 +01:00
|
|
|
cd ${.CURDIR}/gnu/usr.bin/ld && \
|
|
|
|
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
1995-01-03 23:03:25 +01:00
|
|
|
cd ${.CURDIR}/usr.bin/ar && \
|
|
|
|
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
|
|
|
cd ${.CURDIR}/usr.bin/ranlib && \
|
|
|
|
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
|
|
|
cd ${.CURDIR}/usr.bin/nm && \
|
|
|
|
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
1995-01-22 00:01:19 +01:00
|
|
|
cd ${.CURDIR}/usr.bin/lex/lib && \
|
|
|
|
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
1995-01-19 23:41:25 +01:00
|
|
|
cd ${.CURDIR}/usr.bin/compile_et && \
|
|
|
|
${MAKE} depend all install ${CLEANDIR} ${OBJDIR} && \
|
|
|
|
rm -f /usr/sbin/compile_et
|
|
|
|
cd ${.CURDIR}/usr.bin/mk_cmds && \
|
|
|
|
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
1995-01-03 23:03:25 +01:00
|
|
|
|
1994-08-14 00:47:28 +02:00
|
|
|
libraries:
|
|
|
|
@echo "--------------------------------------------------------------"
|
|
|
|
@echo " Rebuilding ${DESTDIR}/usr/lib"
|
|
|
|
@echo "--------------------------------------------------------------"
|
|
|
|
@echo
|
|
|
|
.if defined(CLOBBER)
|
|
|
|
find ${DESTDIR}/usr/lib \! -name '*.s[ao].*' -a \! -type d | \
|
|
|
|
xargs rm -rf
|
|
|
|
.endif
|
1995-05-05 20:00:30 +02:00
|
|
|
.if exists(lib/libcompat)
|
|
|
|
cd ${.CURDIR}/lib/libcompat && \
|
|
|
|
${MAKE} depend all install
|
|
|
|
.endif
|
1995-05-13 05:34:23 +02:00
|
|
|
.if exists(lib/libncurses)
|
|
|
|
cd ${.CURDIR}/lib/libncurses && \
|
|
|
|
${MAKE} depend all install
|
|
|
|
.endif
|
|
|
|
.if exists(lib/libtermcap)
|
|
|
|
cd ${.CURDIR}/lib/libtermcap && \
|
|
|
|
${MAKE} depend all install
|
|
|
|
.endif
|
1995-05-05 20:00:30 +02:00
|
|
|
.if exists(gnu)
|
1994-09-03 04:38:28 +02:00
|
|
|
cd ${.CURDIR}/gnu/lib && \
|
1994-08-14 00:47:28 +02:00
|
|
|
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
1994-08-25 12:47:30 +02:00
|
|
|
cd ${.CURDIR}/gnu/usr.bin/cc/libgcc && \
|
1994-08-14 00:47:28 +02:00
|
|
|
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
1995-05-05 20:00:30 +02:00
|
|
|
.endif
|
1994-08-20 23:34:59 +02:00
|
|
|
.if exists(secure) && !defined(NOCRYPT) && !defined(NOSECURE)
|
|
|
|
cd ${.CURDIR}/secure/lib && \
|
|
|
|
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
|
|
|
.endif
|
1994-08-25 16:45:46 +02:00
|
|
|
.if exists(lib)
|
1994-11-01 20:52:38 +01:00
|
|
|
cd ${.CURDIR}/lib/csu/i386 && \
|
|
|
|
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
1994-08-14 00:47:28 +02:00
|
|
|
cd ${.CURDIR}/lib && \
|
|
|
|
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
1994-08-25 16:45:46 +02:00
|
|
|
.endif
|
1994-09-03 04:38:28 +02:00
|
|
|
cd ${.CURDIR}/usr.bin/lex/lib && \
|
|
|
|
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
1994-09-29 14:06:54 +01:00
|
|
|
.if exists(eBones) && !defined(NOCRYPT) && defined(MAKE_EBONES)
|
1994-09-09 22:29:20 +02:00
|
|
|
cd ${.CURDIR}/eBones/des && \
|
|
|
|
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
|
|
|
cd ${.CURDIR}/eBones/acl && \
|
|
|
|
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
|
|
|
cd ${.CURDIR}/eBones/kdb && \
|
|
|
|
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
|
|
|
cd ${.CURDIR}/eBones/krb && \
|
|
|
|
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
|
|
|
.endif
|
1995-05-06 05:59:58 +02:00
|
|
|
.if exists(usr.sbin/pcvt/keycap)
|
|
|
|
cd ${.CURDIR}/usr.sbin/pcvt/keycap && \
|
|
|
|
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
|
|
|
.endif
|
1994-08-14 00:47:28 +02:00
|
|
|
|
|
|
|
tools:
|
|
|
|
@echo "--------------------------------------------------------------"
|
|
|
|
@echo " Rebuilding ${DESTDIR} Compiler and Make"
|
|
|
|
@echo "--------------------------------------------------------------"
|
|
|
|
@echo
|
1994-08-25 12:47:30 +02:00
|
|
|
cd ${.CURDIR}/gnu/usr.bin/cc && \
|
1994-08-14 00:47:28 +02:00
|
|
|
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
|
|
|
cd ${.CURDIR}/usr.bin/make && \
|
|
|
|
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
|
|
|
|
1994-05-27 14:42:53 +02:00
|
|
|
.include <bsd.subdir.mk>
|