date is gone; clean up install script
[unix-history] / usr / src / bin / Makefile
index eeea1bc..ebcbd9d 100644 (file)
@@ -1,11 +1,16 @@
-#      Makefile        4.15    83/07/03
+#
+# Copyright (c) 1980 Regents of the University of California.
+# All rights reserved.  The Berkeley software License Agreement
+# specifies the terms and conditions for redistribution.
+#
+#      @(#)Makefile    5.3 (Berkeley) %G%
 #
 DESTDIR=
 CFLAGS=        -O
 
 # Programs that live in subdirectories, and have makefiles of their own.
 #
 #
 DESTDIR=
 CFLAGS=        -O
 
 # Programs that live in subdirectories, and have makefiles of their own.
 #
-SUBDIR=        adb as awk csh diff make sed sh spell tp
+SUBDIR=        adb as awk csh diff make sed sh tp
 
 # Shell scripts that need only be installed and are never removed.
 #
 
 # Shell scripts that need only be installed and are never removed.
 #
@@ -14,25 +19,28 @@ SCRIPT=     false true
 # C programs that live in the current directory and do not need
 # explicit make lines.
 #
 # C programs that live in the current directory and do not need
 # explicit make lines.
 #
-STD=   ar cat cc chgrp chmod cmp date dd df du echo ed expr \
-       grep hostid hostname kill ld ln login ls mail mkdir mt nice \
-       nm od pagesize passwd pr pwd rm rmail rmdir size strip stty su sync \
-       tar tee test time wall who write
+STD=   ar cat cc chmod cmp dd du echo ed expr grep hostid hostname \
+       kill ld ln ls mkdir mt nice nm od pagesize pr pwd rm rmail \
+       rmdir size strip stty sync tar tee test time wall who write
+
+# C programs that live in the current directory and need explicit make lines.
+#
+NSTD=  
 
 # Programs that must run setuid to root
 #
 SETUID=        chgrp df login mail passwd su
 
 
 # Programs that must run setuid to root
 #
 SETUID=        chgrp df login mail passwd su
 
-# C programs that live in the current directory and need explicit make lines.
+# Programs that must run set-group-id kmem.
 #
 #
-NSTD=  ps
+KMEM=  ps
 
 all:   ${SUBDIR} ${STD} ${NSTD} cp mv
 
 ${SUBDIR}: /tmp
        cd $@; make ${MFLAGS}
 
 
 all:   ${SUBDIR} ${STD} ${NSTD} cp mv
 
 ${SUBDIR}: /tmp
        cd $@; make ${MFLAGS}
 
-${STD} mv cp:
+${STD} ${SETUID} mv cp:
        ${CC} ${CFLAGS} -o $@ $@.c
 
 # take care with cp and mv, install uses them
        ${CC} ${CFLAGS} -o $@ $@.c
 
 # take care with cp and mv, install uses them
@@ -41,14 +49,18 @@ install:
                mv ${DESTDIR}/bin/newcp ${DESTDIR}/bin/cp;
        rm -f ${DESTDIR}/bin/mv; cp mv ${DESTDIR}/bin/mv; rm -f mv; \
                strip ${DESTDIR}/bin/mv
                mv ${DESTDIR}/bin/newcp ${DESTDIR}/bin/cp;
        rm -f ${DESTDIR}/bin/mv; cp mv ${DESTDIR}/bin/mv; rm -f mv; \
                strip ${DESTDIR}/bin/mv
-       for i in ${SUBDIR}; do \
+       -for i in ${SUBDIR}; do \
                (cd $$i; make ${MFLAGS} DESTDIR=${DESTDIR} install); done
                (cd $$i; make ${MFLAGS} DESTDIR=${DESTDIR} install); done
-       for i in ${SCRIPT}; do (install -c $$i.sh ${DESTDIR}/bin/$$i); done
-       for i in ${STD} ${NSTD}; do (install -s $$i ${DESTDIR}/bin/$$i); done
-       for i in ${SETUID}; do (chown root ${DESTDIR}/bin/$$i; \
-               chmod 4755 ${DESTDIR}/bin/$$i); done
+       -for i in ${SCRIPT}; do (install -c $$i.sh ${DESTDIR}/bin/$$i); done
+       -for i in ${STD} ${NSTD}; do (install -s $$i ${DESTDIR}/bin/$$i); done
+       -for i in ${SETUID}; do \
+               (install -o root -m 4755 -s $$i ${DESTDIR}/bin/$$i); done
+       -for i in ${KMEM}; do \
+               (install -g kmem -m 2755 -s $$i ${DESTDIR}/bin/$$i); done
        rm -f ${DESTDIR}/bin/[; ln ${DESTDIR}/bin/test ${DESTDIR}/bin/[
        rm -f ${DESTDIR}/bin/e; ln ${DESTDIR}/bin/ed ${DESTDIR}/bin/e
        rm -f ${DESTDIR}/bin/[; ln ${DESTDIR}/bin/test ${DESTDIR}/bin/[
        rm -f ${DESTDIR}/bin/e; ln ${DESTDIR}/bin/ed ${DESTDIR}/bin/e
+       rm -f ${DESTDIR}/bin/chfn; ln ${DESTDIR}/bin/passwd ${DESTDIR}/bin/chfn
+       rm -f ${DESTDIR}/bin/chsh; ln ${DESTDIR}/bin/passwd ${DESTDIR}/bin/chsh
 
 clean:
        rm -f a.out core *.s *.o errs
 
 clean:
        rm -f a.out core *.s *.o errs
@@ -111,10 +123,6 @@ chmod: /usr/include/sys/stat.h
 cmp: cmp.c
 cmp: /usr/include/stdio.h
 cmp: /usr/include/ctype.h
 cmp: cmp.c
 cmp: /usr/include/stdio.h
 cmp: /usr/include/ctype.h
-date: date.c
-date: /usr/include/stdio.h
-date: /usr/include/sys/time.h
-date: /usr/include/utmp.h
 dd: dd.c
 dd: /usr/include/stdio.h
 dd: /usr/include/signal.h
 dd: dd.c
 dd: /usr/include/stdio.h
 dd: /usr/include/signal.h
@@ -256,6 +264,8 @@ size: /usr/include/a.out.h
 strip: strip.c
 strip: /usr/include/a.out.h
 strip: /usr/include/signal.h
 strip: strip.c
 strip: /usr/include/a.out.h
 strip: /usr/include/signal.h
+strip: /usr/include/stdio.h
+strip: /usr/include/sys/file.h
 stty: stty.c
 stty: /usr/include/stdio.h
 stty: /usr/include/sgtty.h
 stty: stty.c
 stty: /usr/include/stdio.h
 stty: /usr/include/sgtty.h
@@ -324,3 +334,6 @@ ps: /usr/include/sys/text.h
 ps: /usr/include/sys/stat.h
 ps: /usr/include/sys/mbuf.h
 ps: /usr/include/math.h
 ps: /usr/include/sys/stat.h
 ps: /usr/include/sys/mbuf.h
 ps: /usr/include/math.h
+# DEPENDENCIES MUST END AT END OF FILE
+# IF YOU PUT STUFF HERE IT WILL GO AWAY
+# see make depend above