Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 258 lines (239 sloc) 9.528 kb
d954342 This is the first attempt to drag the top level Makefile Rod sent me
jkh authored
1 #
0e70274 $Id$ -> $FreeBSD$
peter authored
2 # $FreeBSD$
688267b General tidy-up of Makefile. The objective was to make it clear and
peter authored
3 #
fb2e39d E-day build system changes.
jb authored
4 # The user-driven targets are:
0c8c50f Fixed building -current under 2.2.6 using `make world'. Moved some
bde authored
5 #
1ff715b Add "make universe" target which:
phk authored
6 # universe - *Really* build *everything*: Buildworld and
7 # all kernels on all architectures.
fb2e39d E-day build system changes.
jb authored
8 # buildworld - Rebuild *everything*, including glue to help do
9 # upgrades.
10 # installworld - Install everything built by "buildworld".
11 # world - buildworld + installworld.
90e3170 Mention the buildkernel/installkernel targets in the documentation.
alex authored
12 # buildkernel - Rebuild the kernel and the kernel-modules.
13 # installkernel - Install the kernel and the kernel-modules.
852c950 Pass the reinstallkernel target through from Makefile to Makefile.inc1.
markm authored
14 # reinstallkernel - Reinstall the kernel and the kernel-modules.
d994121 End words with a `.'.
obrien authored
15 # kernel - buildkernel + installkernel.
fb2e39d E-day build system changes.
jb authored
16 # update - Convenient way to update your source tree (cvs).
1454dfc Note that the upgrade target exists, and what it does.
jkh authored
17 # upgrade - Upgrade a.out (2.2.x/3.0) system to the new ELF way
fb2e39d E-day build system changes.
jb authored
18 # most - Build user commands, no libraries or include files.
19 # installmost - Install user commands, no libraries or include files.
f6a93fc Minor typo fixes and whitespace cleanups.
schweikh authored
20 # aout-to-elf - Upgrade a system from a.out to elf format (see below).
fb2e39d E-day build system changes.
jb authored
21 # aout-to-elf-build - Build everything required to upgrade a system from
22 # a.out to elf format (see below).
23 # aout-to-elf-install - Install everything built by aout-to-elf-build (see
24 # below).
73f7271 Add the missing rerelease target back.
jb authored
25 # move-aout-libs - Move the a.out libraries into an aout sub-directory
26 # of each elf library sub-directory.
0c8c50f Fixed building -current under 2.2.6 using `make world'. Moved some
bde authored
27 #
fb2e39d E-day build system changes.
jb authored
28 # This makefile is simple by design. The FreeBSD make automatically reads
f6a93fc Minor typo fixes and whitespace cleanups.
schweikh authored
29 # the /usr/share/mk/sys.mk unless the -m argument is specified on the
fb2e39d E-day build system changes.
jb authored
30 # command line. By keeping this makefile simple, it doesn't matter too
31 # much how different the installed mk files are from those in the source
32 # tree. This makefile executes a child make process, forcing it to use
33 # the mk files from the source tree which are supposed to DTRT.
688267b General tidy-up of Makefile. The objective was to make it clear and
peter authored
34 #
f1c5334 Makefile.inc0 is no longer used.
keramida authored
35 # The user-driven targets (as listed above) are implemented in Makefile.inc1.
688267b General tidy-up of Makefile. The objective was to make it clear and
peter authored
36 #
28350fc Bring doc up-to-date with current buildworld/buildkernel practices.
jwd authored
37 # If you want to build your system from source be sure that /usr/obj has
38 # at least 400MB of diskspace available.
e033d01 Merge buildworld/installworld patch to Makefile from RELENG_2_2. Patch
asami authored
39 #
28350fc Bring doc up-to-date with current buildworld/buildkernel practices.
jwd authored
40 # For individuals wanting to build from the sources currently on their
41 # system, the simple instructions are:
e033d01 Merge buildworld/installworld patch to Makefile from RELENG_2_2. Patch
asami authored
42 #
28350fc Bring doc up-to-date with current buildworld/buildkernel practices.
jwd authored
43 # 1. `cd /usr/src' (or to the directory containing your source tree).
44 # 2. `make world'
e033d01 Merge buildworld/installworld patch to Makefile from RELENG_2_2. Patch
asami authored
45 #
28350fc Bring doc up-to-date with current buildworld/buildkernel practices.
jwd authored
46 # For individuals wanting to upgrade their sources (even if only a
47 # delta of a few days):
48 #
49 # 1. `cd /usr/src' (or to the directory containing your source tree).
50 # 2. `make buildworld'
51 # 3. `make buildkernel KERNCONF=YOUR_KERNEL_HERE' (default is GENERIC).
52 # 4. `make installkernel KERNCONF=YOUR_KERNEL_HERE' (default is GENERIC).
53 # 5. `reboot' (in single user mode: boot -s from the loader prompt).
54 # 6. `mergemaster -p'
55 # 7. `make installworld'
56 # 8. `mergemaster'
57 # 9. `reboot'
58 #
59 # See src/UPDATING `COMMON ITEMS' for more complete information.
e033d01 Merge buildworld/installworld patch to Makefile from RELENG_2_2. Patch
asami authored
60 #
47a5ff6 correct syntax in last commit
dillon authored
61 # If TARGET_ARCH=arch (e.g. ia64, sparc64, ...) is specified you can
8435ed5 Document TARGET_ARCH
dillon authored
62 # cross build world for other architectures using the buildworld target,
63 # and once the world is built you can cross build a kernel using the
64 # buildkernel target.
65 #
fb2e39d E-day build system changes.
jb authored
66 # ----------------------------------------------------------------------------
688267b General tidy-up of Makefile. The objective was to make it clear and
peter authored
67 #
fb2e39d E-day build system changes.
jb authored
68 # Upgrading an i386 system from a.out to elf format
688267b General tidy-up of Makefile. The objective was to make it clear and
peter authored
69 #
70 #
aacdc35 Frob the upgrade target to be a bit more inclusive. This appears to
jkh authored
71 # The aout->elf transition build is performed by doing a `make upgrade' (or
72 # `make aout-to-elf') or in two steps by a `make aout-to-elf-build' followed
73 # by a `make aout-to-elf-install', depending on user preference.
f6a93fc Minor typo fixes and whitespace cleanups.
schweikh authored
74 # You need to have at least 320 MB of free space for the object tree.
688267b General tidy-up of Makefile. The objective was to make it clear and
peter authored
75 #
fb2e39d E-day build system changes.
jb authored
76 # The upgrade process checks the installed release. If this is 3.0-CURRENT,
77 # it is assumed that your kernel contains all the syscalls required by the
78 # current sources.
688267b General tidy-up of Makefile. The objective was to make it clear and
peter authored
79 #
fb2e39d E-day build system changes.
jb authored
80 # The upgrade procedure will stop and ask for confirmation to proceed
81 # several times. On each occasion, you can type Ctrl-C to abort the
aacdc35 Frob the upgrade target to be a bit more inclusive. This appears to
jkh authored
82 # upgrade. Optionally, you can also start it with NOCONFIRM=yes and skip
83 # the confirmation steps.
688267b General tidy-up of Makefile. The objective was to make it clear and
peter authored
84 #
fb2e39d E-day build system changes.
jb authored
85 # ----------------------------------------------------------------------------
688267b General tidy-up of Makefile. The objective was to make it clear and
peter authored
86 #
87 #
fb2e39d E-day build system changes.
jb authored
88 # Define the user-driven targets. These are listed here in alphabetical
89 # order, but that's not important.
688267b General tidy-up of Makefile. The objective was to make it clear and
peter authored
90 #
84a6698 Milestone #1 in cross-arch make releases.
ru authored
91 TGTS= all all-man buildkernel buildworld checkdpadd clean \
3ca58e2 Milestone #2 in cross-arch make releases. They now work!
ru authored
92 cleandepend cleandir depend distribute distributeworld everything \
518c0af Forgot to commit this for the `includes' -> `buildincludes',
ru authored
93 hierarchy install installcheck installkernel \
c57bfd2 Added internal, non-recursive (SUBDIR) versions of the `all-man'
ru authored
94 reinstallkernel installmost installworld libraries lint maninstall \
2d8bce3 Despite the fact that it is documented in the handbook, the release n…
gshapiro authored
95 mk most obj objlink regress rerelease tags update
cffe839 Oops! bypassing Makefile.inc0 without adding a `world' target is not
marcel authored
96
781d82e Reimplement FILES support using bsd.files.mk with the
ru authored
97 BITGTS= files includes
518c0af Forgot to commit this for the `includes' -> `buildincludes',
ru authored
98 BITGTS:=${BITGTS} ${BITGTS:S/^/build/} ${BITGTS:S/^/install/}
99
f7c83d5 Parallel "make release" fixes.
ru authored
100 .ORDER: buildworld installworld
3ca58e2 Milestone #2 in cross-arch make releases. They now work!
ru authored
101 .ORDER: buildworld distributeworld
f7c83d5 Parallel "make release" fixes.
ru authored
102 .ORDER: buildkernel installkernel
103 .ORDER: buildkernel reinstallkernel
104
ad30006 Part 3/3 of unbreaking cross releases:
ru authored
105 PATH= /sbin:/bin:/usr/sbin:/usr/bin
511dab8 If /usr/bin/make fails to pass the regression tests, it might not
ru authored
106 MAKEOBJDIRPREFIX?= /usr/obj
ad30006 Part 3/3 of unbreaking cross releases:
ru authored
107 MAKEPATH= ${MAKEOBJDIRPREFIX}${.CURDIR}/make.${MACHINE}
108 _MAKE= PATH=${PATH} \
109 `if [ -x ${MAKEPATH}/make ]; then echo ${MAKEPATH}/make; else echo ${MAKE}; fi` \
110 -m ${.CURDIR}/share/mk -f Makefile.inc1
d954342 This is the first attempt to drag the top level Makefile Rod sent me
jkh authored
111
688267b General tidy-up of Makefile. The objective was to make it clear and
peter authored
112 #
fb2e39d E-day build system changes.
jb authored
113 # Handle the user-driven targets, using the source relative mk files.
c80732a Build aout bootstrap tools only on i386.
jb authored
114 #
518c0af Forgot to commit this for the `includes' -> `buildincludes',
ru authored
115 ${TGTS} ${BITGTS}: upgrade_checks
fb2e39d E-day build system changes.
jb authored
116 @cd ${.CURDIR}; \
ad30006 Part 3/3 of unbreaking cross releases:
ru authored
117 ${_MAKE} ${.TARGET}
7e79e61 Added new lib-tools target used in make world which rebuilds and
nate authored
118
a941dac Restore default implict behavior of running the all target we had bef…
jkh authored
119 # Set a reasonable default
120 .MAIN: all
121
e31dab0 setlocale(3) has been fixed to match POSIX standard:
ru authored
122 STARTTIME!= LC_ALL=C date
cffe839 Oops! bypassing Makefile.inc0 without adding a `world' target is not
marcel authored
123 #
124 # world
125 #
126 # Attempt to rebuild and reinstall *everything*, with reasonable chance of
127 # success, regardless of how old your existing system is.
128 #
129 world: upgrade_checks
130 @echo "--------------------------------------------------------------"
51caeea Initiate deorbit burn for the i386-only a.out related support. Moves…
peter authored
131 @echo ">>> elf make world started on ${STARTTIME}"
cffe839 Oops! bypassing Makefile.inc0 without adding a `world' target is not
marcel authored
132 @echo "--------------------------------------------------------------"
133 .if target(pre-world)
134 @echo
135 @echo "--------------------------------------------------------------"
136 @echo ">>> Making 'pre-world' target"
137 @echo "--------------------------------------------------------------"
ad30006 Part 3/3 of unbreaking cross releases:
ru authored
138 @cd ${.CURDIR}; ${_MAKE} pre-world
cffe839 Oops! bypassing Makefile.inc0 without adding a `world' target is not
marcel authored
139 .endif
ad30006 Part 3/3 of unbreaking cross releases:
ru authored
140 @cd ${.CURDIR}; ${_MAKE} buildworld
141 @cd ${.CURDIR}; ${_MAKE} -B installworld
cffe839 Oops! bypassing Makefile.inc0 without adding a `world' target is not
marcel authored
142 .if target(post-world)
143 @echo
144 @echo "--------------------------------------------------------------"
145 @echo ">>> Making 'post-world' target"
146 @echo "--------------------------------------------------------------"
ad30006 Part 3/3 of unbreaking cross releases:
ru authored
147 @cd ${.CURDIR}; ${_MAKE} post-world
cffe839 Oops! bypassing Makefile.inc0 without adding a `world' target is not
marcel authored
148 .endif
149 @echo
150 @echo "--------------------------------------------------------------"
51caeea Initiate deorbit burn for the i386-only a.out related support. Moves…
peter authored
151 @printf ">>> elf make world completed on `LC_ALL=C date`\n (started ${STARTTIME})\n"
cffe839 Oops! bypassing Makefile.inc0 without adding a `world' target is not
marcel authored
152 @echo "--------------------------------------------------------------"
153
688267b General tidy-up of Makefile. The objective was to make it clear and
peter authored
154 #
f7c83d5 Parallel "make release" fixes.
ru authored
155 # kernel
156 #
157 # Short hand for `make buildkernel installkernel'
158 #
159 kernel: buildkernel installkernel
160
161 #
fb2e39d E-day build system changes.
jb authored
162 # Perform a few tests to determine if the installed tools are adequate
7a058d4 Moved make(1) regression tests from src/Makefile to where they
ru authored
163 # for building the world.
8cd6a70 Don't build shared libraries twice for `make world'. This reduces
bde authored
164 #
cc85fbc Add the buildkernel and installkernel targets.
marcel authored
165 upgrade_checks:
ad30006 Part 3/3 of unbreaking cross releases:
ru authored
166 @if ! (cd ${.CURDIR}/tools/regression/usr.bin/make && \
167 PATH=${PATH} ${MAKE} 2>/dev/null); \
168 then \
169 (cd ${.CURDIR} && make make); \
170 fi
cc85fbc Add the buildkernel and installkernel targets.
marcel authored
171
172 #
511dab8 If /usr/bin/make fails to pass the regression tests, it might not
ru authored
173 # Upgrade make(1) to the current version using the installed
7a058d4 Moved make(1) regression tests from src/Makefile to where they
ru authored
174 # headers, libraries and tools.
cc85fbc Add the buildkernel and installkernel targets.
marcel authored
175 #
511dab8 If /usr/bin/make fails to pass the regression tests, it might not
ru authored
176 MMAKEENV= MAKEOBJDIRPREFIX=${MAKEPATH} \
177 DESTDIR= \
178 INSTALL="sh ${.CURDIR}/tools/install.sh"
179 MMAKE= ${MMAKEENV} make \
180 -D_UPGRADING \
181 -DNOMAN -DNOSHARED \
182 -DNO_CPU_CFLAGS -DNO_WERROR
183
cc85fbc Add the buildkernel and installkernel targets.
marcel authored
184 make:
185 @echo
186 @echo "--------------------------------------------------------------"
6fc730e Minor, cosmetic change to buildworld output to make it reflect
bmah authored
187 @echo " Building an up-to-date make(1)"
cc85fbc Add the buildkernel and installkernel targets.
marcel authored
188 @echo "--------------------------------------------------------------"
189 @cd ${.CURDIR}/usr.bin/make; \
511dab8 If /usr/bin/make fails to pass the regression tests, it might not
ru authored
190 ${MMAKE} obj && \
191 ${MMAKE} depend && \
192 ${MMAKE} all && \
193 ${MMAKE} install DESTDIR=${MAKEPATH} BINDIR=
3a3f516 Build all tools shared, and don't build any shared libraries for tools.
bde authored
194
195 #
fb2e39d E-day build system changes.
jb authored
196 # Define the upgrade targets. These are listed here in alphabetical
197 # order, but that's not important.
8cd6a70 Don't build shared libraries twice for `make world'. This reduces
bde authored
198 #
cc85fbc Add the buildkernel and installkernel targets.
marcel authored
199 UPGRADE= aout-to-elf aout-to-elf-build aout-to-elf-install \
73f7271 Add the missing rerelease target back.
jb authored
200 move-aout-libs
d954342 This is the first attempt to drag the top level Makefile Rod sent me
jkh authored
201
935142f Oops, don't build tools for building games, etc. when we're not building
bde authored
202 #
fb2e39d E-day build system changes.
jb authored
203 # Handle the upgrade targets, using the source relative mk files.
688267b General tidy-up of Makefile. The objective was to make it clear and
peter authored
204 #
aacdc35 Frob the upgrade target to be a bit more inclusive. This appears to
jkh authored
205
206 upgrade: aout-to-elf
207
fb2e39d E-day build system changes.
jb authored
208 ${UPGRADE} : upgrade_checks
209 @cd ${.CURDIR}; \
ad30006 Part 3/3 of unbreaking cross releases:
ru authored
210 ${_MAKE} -f Makefile.upgrade -m ${.CURDIR}/share/mk ${.TARGET}
1ff715b Add "make universe" target which:
phk authored
211
212
213 universe:
214 @echo "--------------------------------------------------------------"
215 @echo ">>> make universe started on ${STARTTIME}"
216 @echo "--------------------------------------------------------------"
ac12eb7 PC98 is not a true architecture, but a subarchitecture of i386, so we…
phk authored
217 .for arch in i386 sparc64 alpha ia64
1ff715b Add "make universe" target which:
phk authored
218 @printf ">> ${arch} started on `LC_ALL=C date`\n"
219 -cd ${.CURDIR} && make ${JFLAG} buildworld TARGET_ARCH=${arch} \
220 __MAKE_CONF=/dev/null \
221 > _.${arch}.buildworld 2>&1
222 @printf ">> ${arch} buildworld ended on `LC_ALL=C date`\n"
e69b46a Add pc98 to universe target.
phk authored
223 .if exists(${.CURDIR}/sys/${arch}/conf/NOTES)
224 -cd ${.CURDIR}/sys/${arch}/conf && make LINT \
1ff715b Add "make universe" target which:
phk authored
225 > _.${arch}.makeLINT 2>&1
226 .endif
227 cd ${.CURDIR} && make buildkernels TARGET_ARCH=${arch} JFLAG="${JFLAG}"
228 @printf ">> ${arch} ended on `LC_ALL=C date`\n"
229 .endfor
addcda2 Build kernels for pc98 just like the other platforms. Also, remove
imp authored
230 @printf ">> pc98 started on `LC_ALL=C date`\n"
ac12eb7 PC98 is not a true architecture, but a subarchitecture of i386, so we…
phk authored
231 -cd ${.CURDIR} && make buildworld TARGET=pc98 TARGET_ARCH=i386 \
232 __MAKE_CONF=/dev/null \
233 > _.pc98.buildworld 2>&1
addcda2 Build kernels for pc98 just like the other platforms. Also, remove
imp authored
234 @printf ">> pc98 buildworld ended on `LC_ALL=C date`\n"
235 .if exists(${.CURDIR}/sys/pc98/conf/NOTES)
236 -cd ${.CURDIR}/sys/pc98/conf && make LINT \
237 > _.pc98.makeLINT 2>&1
238 .endif
239 cd ${.CURDIR} && make buildkernels TARGET=pc98 TARGET_ARCH=i386 \
240 JFLAG="${JFLAG}"
241 @printf ">> pc98 ended on `LC_ALL=C date`\n"
1ff715b Add "make universe" target which:
phk authored
242 @echo "--------------------------------------------------------------"
addcda2 Build kernels for pc98 just like the other platforms. Also, remove
imp authored
243 @printf ">>> make universe completed on `LC_ALL=C date`\n (started ${STARTTIME})\n"
1ff715b Add "make universe" target which:
phk authored
244 @echo "--------------------------------------------------------------"
245
246 KERNCONFS != echo ${.CURDIR}/sys/${TARGET_ARCH}/conf/[A-Z]*
247 KERNCONF2 = ${KERNCONFS:T:N*[a-z]*:NCVS:NNOTES}
248
249 buildkernels:
250 .for kernel in ${KERNCONF2}
251 .if exists(${.CURDIR}/sys/${TARGET_ARCH}/conf/${kernel})
252 -cd ${.CURDIR} && make ${JFLAG} buildkernel \
253 TARGET_ARCH=${TARGET_ARCH} KERNCONF=${kernel} \
254 __MAKE_CONF=/dev/null \
255 > _.${TARGET_ARCH}.${kernel} 2>&1
256 .endif
257 .endfor
Something went wrong with that request. Please try again.