Skip to content
Newer
Older
100644 137 lines (118 sloc) 4.08 KB
3d5264c use new dependall target instead of depend then all in make build
perry authored
1 # $NetBSD: Makefile,v 1.99 1999/09/14 01:32:43 perry Exp $
0737b51 Improve documentation.
cjs authored
2
3 # This is the top-level makefile for building NetBSD. For an outline of
4 # how to build a snapshot or release, as well as other release engineering
5 # information, see http://www.netbsd.org/developers/releng/index.html
6 #
7 # Not everything you can set or do is documented in this makefile. In
8 # particular, you should review the files in /usr/share/mk (especially
9 # bsd.README) for general information on building programs and writing
10 # Makefiles within this structure, and see the comments in src/etc/Makefile
11 # for further information on installation and release set options.
12 #
13 # Variables listed below can be set on the make command line (highest
14 # priority), in /etc/mk.conf (middle priority), or in the environment
15 # (lowest priority).
16 #
17 # Variables:
18 # NBUILDJOBS is the number of jobs to start in parallel during a
19 # 'make build'. It defaults to 1.
20 # MKMAN, if set to `no', will prevent building of manual pages.
21 # MKSHARE, if set to `no', will prevent building and installing
22 # anything in /usr/share.
23 # UPDATE will avoid a `make cleandir' at the start of `make build',
24 # as well as having the effects listed in /usr/share/mk/bsd.README.
25 # DESTDIR is the target directory for installation of the compiled
26 # software. It defaults to /. Note that programs are built against
27 # libraries installed in DESTDIR.
28 #
29 # Targets:
30 # build: builds a full release of netbsd in DESTDIR.
31 # release: does a `make build,' and then tars up the DESTDIR files
32 # into RELEASEDIR, in release(7) format. (See etc/Makefile for
33 # more information on this.)
34 # snapshot: a synonym for release.
2fd3dc7 pull in bsd.own.mk earlier, to get configuration variables.
cgd authored
35
36 .include <bsd.own.mk> # for configuration variables.
a445358 change "Id" to "Header" in rcsid, and noted why etc was not in subdirs
cgd authored
37
a58d7a8 Add a 'NBUILDJOBS' variable which control the number of jobs started in
bouyer authored
38
63a3c7f Fix the rebuild of libgcc:
tv authored
39 HAVE_GCC28!= ${CXX} --version | egrep "^(2\.8|egcs)" ; echo
40
a58d7a8 Add a 'NBUILDJOBS' variable which control the number of jobs started in
bouyer authored
41 .if defined(NBUILDJOBS)
42 _J= -j${NBUILDJOBS}
43 .endif
44
a445358 change "Id" to "Header" in rcsid, and noted why etc was not in subdirs
cgd authored
45 # NOTE THAT etc *DOES NOT* BELONG IN THE LIST BELOW
729d7b8 after 0.2.2 "stable" patches applied
cgd authored
46
139da43 Make sure system includes are installed before descending into gnu.
mycroft authored
47 SUBDIR+= lib include bin libexec sbin usr.bin usr.sbin share sys
1dee340 allow builds to work if directory games is missing. Closes pr misc/19…
explorer authored
48
49 .if exists(games)
50 SUBDIR+= games
51 .endif
52
a984b18 put all of the gnu stuff in one place
cgd authored
53 SUBDIR+= gnu
139da43 Make sure system includes are installed before descending into gnu.
mycroft authored
54 # This is needed for libstdc++ and gen-params.
55 includes-gnu: includes-include includes-sys
c330d79 allow toplevel makefile to descend into sys
cgd authored
56
72a7b88 Make regress only if directory exists. It can be optional.
brezak authored
57 .if exists(regress)
bfa953f add regress, but not for install. also, add "regress" target
cgd authored
58 .ifmake !(install)
59 SUBDIR+= regress
60 .endif
61
7e08344 oops, clean that up a bit
cgd authored
62 regression-tests:
63 @echo Running regression tests...
eff023b work in the face of a /usr/src/obj directory
cgd authored
64 @(cd ${.CURDIR}/regress && ${MAKE} regress)
72a7b88 Make regress only if directory exists. It can be optional.
brezak authored
65 .endif
bfa953f add regress, but not for install. also, add "regress" target
cgd authored
66
3c7019e get krb4 includes installed, do distrib-dirs if DESTDIR not set
tls authored
67 beforeinstall:
77eb135 add date printout at beginning and end of 'make build's
perry authored
68 .ifmake build
69 @echo -n "Build started at: "
70 @date
71 .endif
3c7019e get krb4 includes installed, do distrib-dirs if DESTDIR not set
tls authored
72 .ifndef DESTDIR
73 (cd ${.CURDIR}/etc && ${MAKE} DESTDIR=/ distrib-dirs)
c918597 behaviour of 'make build' should not change if DESTDIR is set; this i…
tls authored
74 .else
75 (cd ${.CURDIR}/etc && ${MAKE} distrib-dirs)
3c7019e get krb4 includes installed, do distrib-dirs if DESTDIR not set
tls authored
76 .endif
7221add stick distrib-dirs in beforeinstall -- should be cleaner?
tls authored
77
a86f71c add some new targets to DTRT when installing/building
cgd authored
78 afterinstall:
088ce0f convert from NOxxx= to MKxxx=no.
lukem authored
79 .if ${MKMAN} != "no" && !defined(_BUILD)
491fe0e If doing a "domestic" build, make sure whatis.db is built _after_ the
scottr authored
80 ${MAKE} whatis.db
1630e06 if not installing man pages, don't remake whatis db
cgd authored
81 .endif
a86f71c add some new targets to DTRT when installing/building
cgd authored
82
491fe0e If doing a "domestic" build, make sure whatis.db is built _after_ the
scottr authored
83 whatis.db:
84 (cd ${.CURDIR}/share/man && ${MAKE} makedb)
85
8039d65 If updating from a system which has a /usr/pkg/info/dir, move that to
tv authored
86 # wrt info/dir below: It's safe to move this over top of /usr/share/info/dir,
87 # as the build will automatically remove/replace the non-pkg entries there.
88
0017b89 Make the "build" target depend on "beforeinstall", ensuring that all
thorpej authored
89 build: beforeinstall
cfd3057 Add the FORCE_DOMESTIC flag to force the 'all', 'includes',
scottr authored
90 .if defined(FORCE_DOMESTIC)
91 @echo '*** CAPUTE!'
92 @echo ' The FORCE_DOMESTIC flag is not compatible with "make build".'
93 @echo ' Please correct the problem and try again.'
94 @false
95 .endif
088ce0f convert from NOxxx= to MKxxx=no.
lukem authored
96 .if ${MKSHARE} != "no"
2fd3dc7 pull in bsd.own.mk earlier, to get configuration variables.
cgd authored
97 (cd ${.CURDIR}/share/mk && ${MAKE} install)
b047d20 In the build targer, make sure the troff macros are installed before
thorpej authored
98 (cd ${.CURDIR}/share/tmac && ${MAKE} && ${MAKE} install)
8fd2bdd don't install in /usr/share if NOSHARE is defined
lukem authored
99 .endif
d8448a6 Don't cleandir on make build when UPDATE is set.
christos authored
100 .if !defined(UPDATE)
6fdfc44 don't use 'make' explicitly
cgd authored
101 ${MAKE} cleandir
d8448a6 Don't cleandir on make build when UPDATE is set.
christos authored
102 .endif
b0e7191 GC old gcc 2.7.2.2.
tv authored
103 .if empty(HAVE_GCC28)
8ec0ae1 Do not build libgcc 3 times.
mycroft authored
104 .if defined(DESTDIR)
105 @echo "*** CAPUTE!"
8039d65 If updating from a system which has a /usr/pkg/info/dir, move that to
tv authored
106 @echo " You attempted to compile the world without egcs. You must"
8ec0ae1 Do not build libgcc 3 times.
mycroft authored
107 @echo " first install a native egcs compiler."
8039d65 If updating from a system which has a /usr/pkg/info/dir, move that to
tv authored
108 @false
8ec0ae1 Do not build libgcc 3 times.
mycroft authored
109 .else
110 (cd ${.CURDIR}/gnu/usr.bin/egcs && \
3d5264c use new dependall target instead of depend then all in make build
perry authored
111 ${MAKE} ${_J} dependall MKMAN=no && \
088ce0f convert from NOxxx= to MKxxx=no.
lukem authored
112 ${MAKE} MKMAN=no install && ${MAKE} cleandir)
8ec0ae1 Do not build libgcc 3 times.
mycroft authored
113 .endif
114 .endif
57c3f63 Make the includes and install targets consistent, and shove the
scottr authored
115 ${MAKE} includes
5f77ca4 During the initial library pass, do not install man pages.
mycroft authored
116 (cd ${.CURDIR}/lib/csu && \
3d5264c use new dependall target instead of depend then all in make build
perry authored
117 ${MAKE} ${_J} dependall MKMAN=no && \
088ce0f convert from NOxxx= to MKxxx=no.
lukem authored
118 ${MAKE} MKMAN=no install)
5f77ca4 During the initial library pass, do not install man pages.
mycroft authored
119 (cd ${.CURDIR}/lib && \
3d5264c use new dependall target instead of depend then all in make build
perry authored
120 ${MAKE} ${_J} dependall MKMAN=no && \
088ce0f convert from NOxxx= to MKxxx=no.
lukem authored
121 ${MAKE} MKMAN=no install)
5f77ca4 During the initial library pass, do not install man pages.
mycroft authored
122 (cd ${.CURDIR}/gnu/lib && \
3d5264c use new dependall target instead of depend then all in make build
perry authored
123 ${MAKE} ${_J} dependall MKMAN=no MKINFO=no && \
7ba3a5b Don't try to run makeinfo when doing preliminary GNU library builds.
mellon authored
124 ${MAKE} MKMAN=no MKINFO=no install)
3d5264c use new dependall target instead of depend then all in make build
perry authored
125 ${MAKE} ${_J} dependall && ${MAKE} _BUILD= install
f5fb447 Handle crypto-us just like domestic
christos authored
126 .if defined(DOMESTIC) && !defined(EXPORTABLE_SYSTEM)
127 (cd ${.CURDIR}/${DOMESTIC} && ${MAKE} ${_J} _SLAVE_BUILD= build)
43b4c5b fix make build for non-usa domestic a better way
lukem authored
128 .endif
491fe0e If doing a "domestic" build, make sure whatis.db is built _after_ the
scottr authored
129 ${MAKE} whatis.db
eaba5b9 Print date after build completes as well as before. Previous code fai…
mellon authored
130 @echo -n "Build finished at: "
131 @date
a86f71c add some new targets to DTRT when installing/building
cgd authored
132
eded244 Add release and snapshot targets. (They do the same thing.)
cjs authored
133 release snapshot: build
9b762fe make -> ${MAKE}
scottr authored
134 (cd ${.CURDIR}/etc && ${MAKE} INSTALL_DONE=1 release)
eded244 Add release and snapshot targets. (They do the same thing.)
cjs authored
135
c589a90 initial import of 386bsd-0.1 sources
cgd authored
136 .include <bsd.subdir.mk>
Something went wrong with that request. Please try again.