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