Add subdir samples so that the sample scripts can get installed in /etc/uucp.
[unix-history] / Makefile
... / ...
CommitLineData
1# @(#)Makefile 5.1.1.2 (Berkeley) 5/9/91
2#
3# $Id: Makefile,v 1.15 1993/09/24 14:13:25 rgrimes Exp $
4#
5
6SUBDIR=
7.if exists(bin)
8SUBDIR+= bin
9.endif
10.if exists(contrib)
11SUBDIR+= contrib
12.endif
13.if exists(games)
14SUBDIR+= games
15.endif
16.if exists(gnu)
17SUBDIR+= gnu
18.endif
19.if exists(include)
20SUBDIR+= include
21.endif
22.if exists(lib)
23SUBDIR+= lib
24.endif
25.if exists(libexec)
26SUBDIR+= libexec
27.endif
28.if exists(sbin)
29SUBDIR+= sbin
30.endif
31.if exists(share)
32SUBDIR+= share
33.endif
34.if exists(usr.bin)
35SUBDIR+= usr.bin
36.endif
37.if exists(usr.sbin)
38SUBDIR+= usr.sbin
39.endif
40
41# Special cases: etc sys
42# Not ported: kerberosIV
43
44#
45# setenv NOCLEANDIR will prevent make cleandirs from being run
46#
47.if defined(NOCLEANDIR)
48CLEANDIR=
49.else
50CLEANDIR= cleandir
51.endif
52
53world: directories cleandist mk includes libraries tools mdec
54 @echo "--------------------------------------------------------------"
55 @echo " Rebuilding ${DESTDIR} The whole thing"
56 @echo "--------------------------------------------------------------"
57 @echo
58 make depend all install
59 cd ${.CURDIR}/usr.sbin/sendmail/src; make install
60
61directories:
62 cd ${.CURDIR}/etc; make distrib-dirs
63
64cleandist:
65.if !defined(NOCLEANDIR)
66 @echo "--------------------------------------------------------------"
67 @echo " Cleaning up the source tree, and rebuilding the obj tree"
68 @echo "--------------------------------------------------------------"
69 @echo
70 here=`pwd`; dest=/usr/obj/`echo $$here | sed 's,/usr/src,,'`; \
71 cd $$dest; rm -rf ${SUBDIR}
72 find . -name obj | xargs -n30 rm -rf
73 make cleandir
74 make obj
75.endif
76
77mk:
78 @echo "--------------------------------------------------------------"
79 @echo " Rebuilding ${DESTDIR}/usr/share/mk"
80 @echo "--------------------------------------------------------------"
81 # DONT DO THIS!! rm -rf ${DESTDIR}/usr/share/mk
82 # DONT DO THIS!! mkdir ${DESTDIR}/usr/share/mk
83 chown ${BINOWN}.${BINGRP} ${DESTDIR}/usr/share/mk
84 chmod 755 ${DESTDIR}/usr/share/mk
85 cd ${.CURDIR}/share/mk; make install;
86
87includes:
88 @echo "--------------------------------------------------------------"
89 @echo " Rebuilding ${DESTDIR}/usr/include"
90 @echo "--------------------------------------------------------------"
91 @echo
92.if defined(CLOBBER)
93 rm -rf ${DESTDIR}/usr/include
94 mkdir ${DESTDIR}/usr/include
95 chown ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include
96 chmod 755 ${DESTDIR}/usr/include
97.endif
98 cd ${.CURDIR}/include; make install
99 cd ${.CURDIR}/gnu/libg++; make beforeinstall
100 cd ${.CURDIR}/gnu/libregex; make beforeinstall
101 cd ${.CURDIR}/lib/libcurses; make beforeinstall
102 cd ${.CURDIR}/lib/librpc/rpc; make beforeinstall
103
104libraries:
105 # setenv NOPROFILED if you do not want profiled libraries
106 @echo "--------------------------------------------------------------"
107 @echo " Rebuilding ${DESTDIR}/usr/lib"
108 @echo "--------------------------------------------------------------"
109 @echo
110.if defined(CLOBBER)
111 rm -rf ${DESTDIR}/usr/lib
112 mkdir ${DESTDIR}/usr/lib
113 chown -R bin.bin ${DESTDIR}/usr/lib
114 chmod 755 ${DESTDIR}/usr/lib
115.endif
116 cd ${.CURDIR}/lib; make depend all install ${CLEANDIR} obj
117 cd ${.CURDIR}/gnu/gcc2/libgcc; make depend all install ${CLEANDIR} obj
118 cd ${.CURDIR}/usr.bin/lex; make depend all install ${CLEANDIR} obj
119 cd ${.CURDIR}/gnu/libregex; make depend all install ${CLEANDIR} obj
120 cd ${.CURDIR}/gnu/libmalloc; make depend all install ${CLEANDIR} obj
121
122tools:
123 @echo "--------------------------------------------------------------"
124 @echo " Rebuilding ${DESTDIR} Compiler and Make"
125 @echo "--------------------------------------------------------------"
126 @echo
127 cd ${.CURDIR}/gnu/gcc2; make depend all install ${CLEANDIR} obj
128 cd ${.CURDIR}/usr.bin/make; make depend all install ${CLEANDIR} obj
129
130mdec:
131 @echo "--------------------------------------------------------------"
132 @echo " Rebuilding ${DESTDIR}/usr/mdec"
133 @echo "--------------------------------------------------------------"
134 @echo
135.if ${MACHINE} == "i386"
136 cd ${.CURDIR}/sys/i386/boot; make depend all install ${CLEANDIR}
137.if defined (DESTDIR)
138 cd /usr/mdec; find . | cpio -pdamuv ${DESTDIR}/usr/mdec
139.endif
140.endif
141
142.include <bsd.subdir.mk>