Commit | Line | Data |
---|---|---|
15637ed4 RG |
1 | # @(#)Makefile 5.1.1.2 (Berkeley) 5/9/91 |
2 | # | |
173943a0 | 3 | # $Id: Makefile,v 1.28 1993/12/15 02:10:14 jkh 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 | ||
bdafde33 | 53 | world: directories cleandist mk includes bootstrapld 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 |
986c93cf | 60 | cd ${.CURDIR}/share/man; make makedb |
297c7883 | 61 | |
d18e4498 RG |
62 | directories: |
63 | cd ${.CURDIR}/etc; make distrib-dirs | |
64 | ||
297c7883 RG |
65 | cleandist: |
66 | .if !defined(NOCLEANDIR) | |
67 | @echo "--------------------------------------------------------------" | |
68 | @echo " Cleaning up the source tree, and rebuilding the obj tree" | |
69 | @echo "--------------------------------------------------------------" | |
70 | @echo | |
6929557a RG |
71 | here=`pwd`; dest=/usr/obj/`echo $$here | sed 's,/usr/src,,'`; \ |
72 | cd $$dest; rm -rf ${SUBDIR} | |
297c7883 RG |
73 | find . -name obj | xargs -n30 rm -rf |
74 | make cleandir | |
75 | make obj | |
76 | .endif | |
77 | ||
78 | mk: | |
79 | @echo "--------------------------------------------------------------" | |
80 | @echo " Rebuilding ${DESTDIR}/usr/share/mk" | |
81 | @echo "--------------------------------------------------------------" | |
82 | # DONT DO THIS!! rm -rf ${DESTDIR}/usr/share/mk | |
83 | # DONT DO THIS!! mkdir ${DESTDIR}/usr/share/mk | |
84 | chown ${BINOWN}.${BINGRP} ${DESTDIR}/usr/share/mk | |
85 | chmod 755 ${DESTDIR}/usr/share/mk | |
07962aad | 86 | cd ${.CURDIR}/share/mk; make install; |
297c7883 RG |
87 | |
88 | includes: | |
297c7883 RG |
89 | @echo "--------------------------------------------------------------" |
90 | @echo " Rebuilding ${DESTDIR}/usr/include" | |
91 | @echo "--------------------------------------------------------------" | |
92 | @echo | |
7b26216f | 93 | .if defined(CLOBBER) |
297c7883 RG |
94 | rm -rf ${DESTDIR}/usr/include |
95 | mkdir ${DESTDIR}/usr/include | |
96 | chown ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include | |
97 | chmod 755 ${DESTDIR}/usr/include | |
5262d901 | 98 | .endif |
07962aad | 99 | cd ${.CURDIR}/include; make install |
173943a0 | 100 | cd ${.CURDIR}/gnu/gcc2/libobjc; make beforeinstall |
07962aad | 101 | cd ${.CURDIR}/gnu/libg++; make beforeinstall |
0691ff99 | 102 | cd ${.CURDIR}/gnu/libregex; make beforeinstall |
07962aad | 103 | cd ${.CURDIR}/lib/libcurses; make beforeinstall |
2e609b9d | 104 | cd ${.CURDIR}/lib/libc; make beforeinstall |
297c7883 | 105 | |
ce6b8665 PR |
106 | # XXX -- This will go away later -- hack to get up to speed with shlibs |
107 | # setenv NOBOOTSTRAPLD to prevent building new shlib tools. | |
108 | # This is to save build time if you've already done it before, | |
109 | # you MUST run it the first time you get the new sources. | |
110 | ||
111 | bootstrapld: | |
112 | .if !defined(NOBOOTSTRAPLD) | |
113 | @echo "--------------------------------------------------------------" | |
114 | @echo " Building new shlib compiler tools" | |
115 | @echo "--------------------------------------------------------------" | |
ce6b8665 | 116 | cd ${.CURDIR}/usr.bin/strip; make depend all install ${CLEANDIR} obj |
f50546a3 | 117 | cd ${.CURDIR}/usr.bin/mkdep; make depend all install ${CLEANDIR} obj |
ce6b8665 | 118 | cd ${.CURDIR}/gnu/gas; make depend all install ${CLEANDIR} obj |
75e16883 PR |
119 | cd ${.CURDIR}/gnu/gcc2; make -DNOPIC depend all install ${CLEANDIR} obj |
120 | cd ${.CURDIR}/gnu/ld; make -DNOPIC depend all install ${CLEANDIR} obj | |
7139fd02 PR |
121 | cd ${.CURDIR}/gnu/gcc2/libgcc; make all install ${CLEANDIR} obj |
122 | cd ${.CURDIR}/lib/libc; make depend all install ${CLEANDIR} obj | |
123 | cd ${.CURDIR}/lib/csu.i386; make depend all install ${CLEANDIR} obj | |
124 | cd ${.CURDIR}/gnu/ld/rtld; make depend all install ${CLEANDIR} obj | |
ce6b8665 PR |
125 | .endif |
126 | ||
297c7883 | 127 | libraries: |
042909b6 | 128 | # setenv NOPROFILE if you do not want profiled libraries |
297c7883 RG |
129 | @echo "--------------------------------------------------------------" |
130 | @echo " Rebuilding ${DESTDIR}/usr/lib" | |
131 | @echo "--------------------------------------------------------------" | |
132 | @echo | |
7b26216f | 133 | .if defined(CLOBBER) |
9f3e1e65 | 134 | find ${DESTDIR}/usr/lib \! -name '*.s[ao].*' -a \! -type d | xargs -n30 rm -rf |
5262d901 | 135 | .endif |
5f4aac33 RG |
136 | cd ${.CURDIR}/lib; make depend all install ${CLEANDIR} obj |
137 | cd ${.CURDIR}/gnu/gcc2/libgcc; make depend all install ${CLEANDIR} obj | |
fb69d766 | 138 | cd ${.CURDIR}/gnu/libg++; make depend all install ${CLEANDIR} obj |
5f4aac33 RG |
139 | cd ${.CURDIR}/gnu/libregex; make depend all install ${CLEANDIR} obj |
140 | cd ${.CURDIR}/gnu/libmalloc; make depend all install ${CLEANDIR} obj | |
fb69d766 | 141 | cd ${.CURDIR}/usr.bin/lex; make depend all install ${CLEANDIR} obj |
297c7883 RG |
142 | |
143 | tools: | |
144 | @echo "--------------------------------------------------------------" | |
145 | @echo " Rebuilding ${DESTDIR} Compiler and Make" | |
146 | @echo "--------------------------------------------------------------" | |
147 | @echo | |
07962aad NW |
148 | cd ${.CURDIR}/gnu/gcc2; make depend all install ${CLEANDIR} obj |
149 | cd ${.CURDIR}/usr.bin/make; make depend all install ${CLEANDIR} obj | |
297c7883 RG |
150 | |
151 | mdec: | |
152 | @echo "--------------------------------------------------------------" | |
153 | @echo " Rebuilding ${DESTDIR}/usr/mdec" | |
154 | @echo "--------------------------------------------------------------" | |
155 | @echo | |
156 | .if ${MACHINE} == "i386" | |
07962aad | 157 | cd ${.CURDIR}/sys/i386/boot; make depend all install ${CLEANDIR} |
297c7883 RG |
158 | .if defined (DESTDIR) |
159 | cd /usr/mdec; find . | cpio -pdamuv ${DESTDIR}/usr/mdec | |
160 | .endif | |
161 | .endif | |
162 | ||
15637ed4 | 163 | .include <bsd.subdir.mk> |