date and time created 90/06/25 13:56:22 by bostic
[unix-history] / usr / src / Makefile
index f7b0a0a..2450096 100644 (file)
@@ -1,45 +1,46 @@
-#      @(#)Makefile    4.9     (Berkeley)      %G%
-#
-DESTDIR=
-CFLAGS=        -O
-
-# Programs that live in subdirectories, and have makefiles of their own.
-#
-LIBDIR= lib usr.lib
-SRCDIR=        bin usr.bin etc ucb new games local
-
-all:   ${LIBDIR} ${SRCDIR}
-
-${LIBDIR} ${SRCDIR}: FRC
-       cd $@; make ${MFLAGS}
-
-build: FRC
-       echo installing /usr/include
-       cd include; make ${MFLAGS} install
-       cd lib; make ${MFLAGS}
-       echo installing /lib
-       cd lib; make ${MFLAGS} install
-       cd usr.lib; make ${MFLAGS}
-       echo installing /usr/lib
-       cd usr.lib; make ${MFLAGS} install
-       -for i in ${SRCDIR}; do (cd $$i; make ${MFLAGS}); done
-
-FRC:
-
-install:
-       -for i in ${SUBDIR}; do \
-               (cd $$i; make ${MFLAGS} DESTDIR=${DESTDIR} install); done
-
-installsrc:
-       -for i in ${SRCDIR}; do \
-               (cd $$i; make ${MFLAGS} DESTDIR=${DESTDIR} install); done
-
-tags:
-       for i in include lib usr.lib; do \
-               (cd $$i; make ${MFLAGS} TAGSFILE=../tags tags); \
+#      @(#)Makefile    4.21 (Berkeley) %G%
+
+SUBDIR=        bin games include kerberosIV lib libexec old pgrm sbin share \
+       usr.bin usr.sbin
+
+build:
+       ${MAKE} cleandir
+
+       @echo "+++ includes"
+       cd include; ${MAKE} depend all install clean
+
+.if ${MACHINE} == "vax" || ${MACHINE} == "tahoe"
+       @echo "+++ C preprocessor, compiler, loader"
+       cd pgrm/cpp; ${MAKE} depend all install clean
+       cd libexec/pcc; ${MAKE} depend all install clean
+       cd pgrm/ld; ${MAKE} depend all install clean
+
+       @echo "+++ C library"
+       cd lib/libc; ${MAKE} depend all install clean
+
+       @echo "+++ C preprocessor, compiler, loader (second time)"
+       cd pgrm/cpp; ${MAKE} all install
+       cd libexec/pcc; ${MAKE} all install
+       cd pgrm/ld; ${MAKE} all install
+.endif
+
+       @echo "+++ libraries"
+       cd lib; ${MAKE} depend all install all
+       cd kerberosIV; ${MAKE} depend all install all
+
+       @echo "+++ C library tags"
+       cd lib/libc; rm -f tags; ${MAKE} tags; \
+           install -c -o ${BINOWN} -g ${BINGRP} -m 444 tags /usr/libdata/tags
+
+       ${MAKE} depend all
+
+OBJ=   /usr/obj
+shadow:
+       @-for file in \
+           `find ${SUBDIR:S/^/-f /g} name SCCS prune or name obj print`; do \
+               d=`dirname $$file`; \
+               echo ${OBJ}/$$d; \
+               mkdir -p ${OBJ}/$$d > /dev/null 2>&1 ; \
        done
        done
-       sort -u +0 -1 -o tags tags
 
 
-clean:
-       rm -f a.out core *.s *.o
-       for i in ${LIBDIR} ${SRCDIR}; do (cd $$i; make ${MFLAGS} clean); done
+.include <bsd.subdir.mk>