kernel - Fix MP race in kmalloc/kfree
[dragonfly.git] / nrelease / Makefile
CommitLineData
9b29c40a
MD
1#########################################################################
2# ENHANCEMENTS #
3#########################################################################
4
f4ec1279 5# New method e.g. 'make gui release'. A series of enhancement
9b29c40a
MD
6# targes may be specified which set make variables which enhance
7# the build in various ways.
8#
1a8bb5eb
MD
9# img is now the default (produces both the .iso and .img)
10#
b9c3e754 11gui installer img:
9b29c40a 12
9b29c40a
MD
13#########################################################################
14# SETUP #
15#########################################################################
16
3fff415b
SW
17ISODIR?= /usr/release
18ISOROOT?= ${ISODIR}/root
19OBJSYS= ${.OBJDIR}/../sys
20
5cb6cda9 21MAKE_JOBS?= $$(sysctl -n hw.ncpu)
bfe20b28 22
b2b3ffcd
SS
23# temporary until everybody has converted to x86_64
24.if ${MACHINE_ARCH} == "amd64"
25MACHINE_ARCH= x86_64
26.makeenv MACHINE_ARCH
27.endif
28
702a95cc
SS
29# XXX makeshift fix to build the right kernel for the (target) architecture
30# We should configure this in the platform files somehow
31.if ${MACHINE_ARCH} == "i386"
1d3eb8c5 32KERNCONF ?= GENERIC VKERNEL
702a95cc 33.else
b6a66df5 34KERNCONF ?= X86_64_GENERIC VKERNEL64
702a95cc 35.endif
6ca9a59c 36
cc224c64 37PKGSRC_PREFIX?= /usr/pkg
bce110a5 38PKGBIN_PKG_ADD?= ${PKGSRC_PREFIX}/sbin/pkg_add
95b64753 39PKGBIN_PKG_DELETE?= ${PKGSRC_PREFIX}/sbin/pkg_delete
c791834f 40PKGBIN_PKG_ADMIN?= ${PKGSRC_PREFIX}/sbin/pkg_admin
bce110a5
MD
41PKGBIN_MKISOFS?= ${PKGSRC_PREFIX}/bin/mkisofs
42PKGSRC_PKG_PATH?= ${ISODIR}/packages
bce110a5 43
cc55a235
SS
44# We use env -i in the chroot, so that environment variables won't
45# disturb any (pkgsrc) build. This has happened for TARGET_ARCH,
46# which is used by gmake in completely different context.
e2dbfa0b 47#
cc55a235
SS
48CHROOT_CMD?= env -i CCVER=${CCVER:Q} /usr/sbin/chroot ${ISOROOT} sh -c
49
8abe78a1 50# User may specify extra packages in addition to the defaults
95b64753 51#
8abe78a1
MD
52PKGSRC_EXTRA_PACKAGES?=
53
54# Pkgsrc packages to be built and installed on the release ISO
55#
56PKGSRC_PACKAGES?= pkgtools/pkg_leaves \
57 pkgtools/pkg_tarup \
b2c6ab6c 58 pkgtools/pkgin \
8abe78a1 59 devel/scmgit \
57b52550 60 net/bind96 \
fbc26094
SW
61 net/isc-dhcp4 \
62 net/isc-dhcpd4 \
8abe78a1 63 sysutils/cdrtools \
796fd273 64 net/csup \
8abe78a1 65 ${PKGSRC_EXTRA_PACKAGES}
fbc26094
SW
66
67# pkgsrc options to use when building packages
68#
3fff415b
SW
69PKGSRC_OPTIONS+= MAKE_JOBS=${MAKE_JOBS}
70PKGSRC_OPTIONS+= WRKOBJDIR=/usr/pkgobj
9ecb41e5 71PKGSRC_OPTIONS+= PKG_DEFAULT_OPTIONS='dri inet6'
fbc26094 72.if !make(gui)
9ecb41e5 73PKGSRC_OPTIONS+= PKG_OPTIONS.scmgit=-scmgit-gui
fbc26094 74.endif
8188de86 75
95b64753
MD
76# Even though buildiso wipes the packages, our check target has to run
77# first and old packages (listed as they appear in pkg_info) must be
78# cleaned out in order for the pkg_add -n test we use in the check target
79# to operate properly.
80#
fbc26094
SW
81OLD_PKGSRC_PACKAGES?= cdrtools-2.01.01.27nb1 \
82 cdrecord-2.00.3nb2 \
83 bootstrap-kit-20070205 \
84 dfuibe_installer-1.1.6 \
85 gettext-lib-0.14.5 \
86 dfuibe_installer-1.1.7nb1 \
87 dfuife_curses-1.5 \
88 gettext-lib-0.14.6 \
89 gettext-tools-0.14.6nb1 \
90 libaura-3.1 \
91 libdfui-4.2 \
92 libinstaller-5.1 \
93 bootstrap-kit-20080211 \
94 cdrtools-ossdvd-2.01.1.36nb2 \
95 isc-dhcp-base-4.0.0 \
96 isc-dhcp-server-4.0.0
95b64753 97
8188de86 98# Specify which root skeletons are required, and let the user include
e2dbfa0b 99# their own. They are copied into ISODIR during the `customizeiso'
8188de86
MD
100# target; each overwrites the last.
101#
8f51ac0b 102REQ_ROOTSKELS= ${.CURDIR}/root
cc224c64
JS
103ROOTSKELS?= ${REQ_ROOTSKELS}
104
fbc26094 105.if make(gui)
3f279b9e 106ISOFILE?= ${ISODIR}/dfly-gui.iso
b9c3e754 107IMGFILE?= ${ISODIR}/dfly-gui.img
0936984e
MD
108PKGSRC_PACKAGES+= meta-pkgs/modular-xorg-apps \
109 meta-pkgs/modular-xorg-drivers \
110 meta-pkgs/modular-xorg-fonts \
111 meta-pkgs/modular-xorg-libs \
fbc26094 112 wm/fluxbox \
0936984e 113 wm/fvwm \
30e27f66 114 www/firefox \
fbc26094
SW
115 print/xpdf \
116 shells/zsh \
117 editors/emacs \
118 editors/vim \
119 chat/pidgin \
120 chat/irssi \
121 chat/xchat \
0936984e 122 x11/modular-xorg-server \
fbc26094
SW
123 x11/rxvt-unicode \
124 x11/eterm \
125 lang/perl5 \
126 editors/nano \
127 shells/bash \
128 devel/exctags \
129 archivers/zip \
130 security/sudo \
131 www/links-gui \
132 net/nmap \
133 net/wget \
134 fonts/terminus-font \
135 net/rsync \
136 sysutils/idesk \
0936984e 137 time/asclock \
fbc26094 138 misc/screen
3f279b9e
SW
139ROOTSKELS+= ${.CURDIR}/gui
140.endif
141
3f279b9e 142ISOFILE ?= ${ISODIR}/dfly.iso
b9c3e754
MN
143IMGFILE ?= ${ISODIR}/dfly.img
144
60b68cbb 145IMGMNT ?= ${ISODIR}/mnt
a2f841ed
MD
146
147# USB umass now probes starting at da8, so the usb stick is
148# probably sitting on da8.
149#
9a122c9a 150IMGUSBDEV ?= da8
3f279b9e 151
5b22b655
MD
152# note: we use the '${NRLOBJDIR}/nrelease' construct, that is we add
153# the additional '/nrelease' manually, as a safety measure.
154#
155NRLOBJDIR?= /usr/obj
156
8188de86
MD
157#########################################################################
158# BASE ISO TARGETS #
159#########################################################################
160
7ebbae99 161release: check clean buildworld1 buildkernel1 \
03e2a3c5 162 buildiso srcs customizeiso mklocatedb \
0936984e 163 mkiso mkimg
8188de86 164
7ebbae99 165quickrel: check clean buildworld2 buildkernel2 \
03e2a3c5 166 buildiso srcs customizeiso mklocatedb \
0936984e 167 mkiso mkimg
2e3f8f38 168
03e2a3c5
SW
169realquickrel: check clean \
170 buildiso srcs customizeiso mklocatedb \
0936984e 171 mkiso mkimg
6ca9a59c 172
03e2a3c5 173restartpkgs: check customizeiso mklocatedb mkiso mkimg
5af45f85 174
9b29c40a
MD
175quick: quickrel
176
177realquick: realquickrel
178
5af45f85 179
9b29c40a
MD
180#########################################################################
181# CORE SUPPORT TARGETS #
182#########################################################################
183
d2582113 184check:
0936984e
MD
185.if !exists(${PKGBIN_PKG_ADMIN})
186 @echo "You never bootstrapped pkgsrc on your machine. You can install it with:"
187 @echo " make pkgsrc_bootstrap"
188.endif
0936984e
MD
189.if !exists (${PKGBIN_MKISOFS})
190 @echo
191 @echo "Your machine does not have cdrtools installed. You can install it with:"
192 @echo " make pkgsrc_cdrecord"
0a1628e7 193.endif
fbc26094
SW
194.if !defined(PKGSRC_PATH)
195 @echo "Please set PKGSRC_PATH to the pkgsrc tree that shall be used for"
5af45f85
MD
196 @echo "package building. For example /usr/pkgsrc. See the Makefile"
197 @echo "in /usr if you are unfamiliar with pkgsrc."
0936984e 198.endif
0936984e
MD
199.if !exists (${PKGBIN_MKISOFS})
200 @exit 1
201.endif
202.if !defined(PKGSRC_PATH)
fbc26094
SW
203 @exit 1
204.endif
2e3f8f38 205
588a679c 206buildworld1 buildworld2:
3fff415b
SW
207 cd ${.CURDIR}/..; \
208 ${WORLD_CCVER:C/^..*$/WORLD_CCVER=/}${WORLD_CCVER} \
209 make -j ${MAKE_JOBS} -DWANT_INSTALLER ${.TARGET:C/build(.*)2/quick\1/:C/1//}
6ca9a59c 210
588a679c
SS
211buildkernel1 buildkernel2:
212 cd ${.CURDIR}/..; \
213 first=; \
214 for kernconf in ${KERNCONF}; do \
448b21e7 215 ${WORLD_CCVER:C/^..*$/WORLD_CCVER=/}${WORLD_CCVER} \
3fff415b 216 make -j ${MAKE_JOBS} ${.TARGET:C/build(.*)2/quick\1/:C/1//} \
588a679c
SS
217 KERNCONF=$${kernconf} \
218 $${first:+-DNO_MODULES}; \
219 first=done; \
220 done
6ca9a59c 221
5b22b655
MD
222# note that we do not want to mess with any /usr/obj directories not related
223# to buildworld, buildkernel, or nrelease, so we must supply the proper
224# MAKEOBJDIRPREFIX for targets that are not run through the buildworld and
225# buildkernel mechanism.
226#
92b0ebb9
MD
227# Unconditionally clean out /usr/release/root so a previous img build
228# does not blow up a future quick iso build
229#
6ca9a59c 230buildiso:
92b0ebb9
MD
231 -rm -rf ${ISOROOT}
232 -chflags -R noschg ${ISOROOT}
233 rm -rf ${ISOROOT}
234 mkdir -p ${ISOROOT}
5b22b655 235 if [ ! -d ${NRLOBJDIR}/nrelease ]; then mkdir -p ${NRLOBJDIR}/nrelease; fi
f4ec1279 236 ( cd ${.CURDIR}/..; make -DWANT_INSTALLER DESTDIR=${ISOROOT} installworld )
ab64cf06
SS
237 ( cd ${.CURDIR}/../etc; MAKEOBJDIRPREFIX=${NRLOBJDIR}/nrelease \
238 make -m ${.CURDIR}/../share/mk DESTDIR=${ISOROOT} distribution )
21aa02d0 239 cpdup ${ISOROOT}/etc ${ISOROOT}/etc.hdd
588a679c
SS
240 cd ${.CURDIR}/..; \
241 first=; \
242 for kernconf in ${KERNCONF}; do \
243 make DESTDIR=${ISOROOT} \
244 installkernel KERNCONF=$${kernconf} \
245 $${first:+DESTKERNNAME=kernel.$${kernconf}} \
246 $${first:+-DNO_MODULES}; \
247 first=done; \
248 done
3f6dbfa9 249 ln -s kernel ${ISOROOT}/boot/kernel.BOOTP
9e5f57ba 250 mtree -deU -f ${.CURDIR}/../etc/mtree/BSD.local.dist -p ${ISOROOT}/usr/local/
6ca9a59c
MD
251 mtree -deU -f ${.CURDIR}/../etc/mtree/BSD.var.dist -p ${ISOROOT}/var
252 dev_mkdb -f ${ISOROOT}/var/run/dev.db ${ISOROOT}/dev
8188de86 253
e2dbfa0b
TN
254# Release CD: Kernel sources (~16M) and the full pkgsrc tree (~27M)
255# Release DVD: Full sources (~90M) and the full pkgsrc tree (~27M)
19d86faa 256#
e2dbfa0b
TN
257srcs:
258.if !defined(WITHOUT_SRCS)
3cf4b4a1 259 cd ${ISOROOT}/usr && make pkgsrc-create
c19c746b 260.if make(gui)
3cf4b4a1 261 cd ${ISOROOT}/usr && make src-create
c19c746b 262.else
e2dbfa0b 263 rm -f ${ISOROOT}/usr/src-sys.tgz
cacf78aa 264 cd ${.CURDIR}/.. && tar --exclude .git -s '/^\./src/' \
3617b2c9 265 -czf ${ISOROOT}/usr/src-sys.tgz ./Makefile ./Makefile.inc1 ./sys
c19c746b 266.endif
66b79064 267.endif
19d86faa 268
5af45f85
MD
269# Customize the ISO by copying rootskels in reverse priority order,
270# building packages, and doing other post-install tasks.
271#
8188de86 272customizeiso:
5af45f85 273 # Copy the rootskels. Allow sources to be owned by someone other
3cf4b4a1 274 # than root (as is common when checked out via git).
5af45f85 275 #
8188de86
MD
276.for ROOTSKEL in ${ROOTSKELS}
277 cpdup -X cpignore -o ${ROOTSKEL} ${ISOROOT}
5af45f85
MD
278 @test -O ${.CURDIR} || echo "chowning copied files to root:wheel"
279 @test -O ${.CURDIR} || ((cd ${ROOTSKEL} && find .) | fgrep -v cpignore | (cd ${ISOROOT} && xargs chown root:wheel))
8188de86 280.endfor
7249926b 281 pwd_mkdb -p -d ${ISOROOT}/etc ${ISOROOT}/etc/master.passwd
4fba3387
CP
282.for UPGRADE_ITEM in Makefile \
283 etc.${MACHINE_ARCH} \
284 isdn/Makefile \
285 rc.d/Makefile \
286 periodic/Makefile \
287 periodic/daily/Makefile \
288 periodic/security/Makefile \
289 periodic/weekly/Makefile \
290 periodic/monthly/Makefile
291 cp -R ${.CURDIR}/../etc/${UPGRADE_ITEM} ${ISOROOT}/etc/${UPGRADE_ITEM}
20585f87 292.endfor
8abe78a1
MD
293 #
294 # Setup some things & mount pkgsrc tree. Use defensive umounts and
295 # rm -rf's to allow restarts. Allow /usr/pkgsrc to be read-only.
296 #
297 # If we did not get past the bootstrap we clean out the entire
298 # /usr/pkg infrastructure. Otherwise we attempt to pick up where
299 # we left off.
300 #
fbc26094 301 cp -p /etc/resolv.conf ${ISOROOT}/etc
cc55a235 302 ${CHROOT_CMD} "ldconfig -elf /usr/lib /usr/lib/gcc* /usr/lib/compat"
8abe78a1
MD
303 -@umount ${ISOROOT}/usr/pkgsrc/distfiles
304 -@umount ${ISOROOT}/usr/pkgsrc
45e80934 305 -@umount ${ISOROOT}/dev
8abe78a1
MD
306 mkdir -p ${ISODIR}/distfiles
307 rm -rf ${ISOROOT}/usr/pkgobj
8abe78a1 308 #
1eeae16f
MD
309 # Mount /usr/pkgsrc, make sure /usr/pkgsrc/distfiles is writable.
310 # Make /usr/pkgsrc read-only for safety, else a failed umount and
311 # our rm -rf will do bad things.
8abe78a1
MD
312 #
313 mkdir -p ${ISOROOT}/usr/pkgobj
3aa2328e 314 mkdir -p ${ISOROOT}/usr/pkgobj/bootstrap
8abe78a1 315 mkdir -p ${ISOROOT}/usr/pkgsrc
1eeae16f 316 mount_null -o ro ${PKGSRC_PATH} ${ISOROOT}/usr/pkgsrc
0c5de895 317 mount_null /dev ${ISOROOT}/dev
5af45f85
MD
318 cp /etc/shells ${ISOROOT}/usr/pkgsrc/distfiles/.test > /dev/null 2>&1 \
319 || mount_null ${ISODIR}/distfiles ${ISOROOT}/usr/pkgsrc/distfiles
8abe78a1 320 #
5af45f85 321 # Bootstrap, if not already installed, and add licenses needed
ee3561ee 322 # for the gui release
8abe78a1 323 #
c19c746b
MD
324 test -e ${ISODIR}/.didbootstrap || \
325 rm -rf ${ISOROOT}/usr/pkg ${ISOROOT}/var/db/pkg \
326 ${ISOROOT}/var/db/pkg.refcount
327 test -e ${ISODIR}/.didbootstrap || \
328 ${CHROOT_CMD} "cd /usr/pkgsrc/bootstrap; \
de863bf0 329 export share_dir=/usr/pkgobj/bootstrap/work/share; \
8abe78a1 330 ./bootstrap --workdir /usr/pkgobj/bootstrap/work"
3fff415b 331.if make(gui)
c19c746b
MD
332 test -e ${ISODIR}/.didbootstrap || \
333 echo ".ifdef BSD_PKG_MK # added by nrelease" \
ee3561ee 334 >> ${ISOROOT}/usr/pkg/etc/mk.conf
c19c746b
MD
335 test -e ${ISODIR}/.didbootstrap || \
336 echo "ACCEPTABLE_LICENSES+=openmotif-license" \
ee3561ee 337 >> ${ISOROOT}/usr/pkg/etc/mk.conf
c19c746b
MD
338 test -e ${ISODIR}/.didbootstrap || \
339 echo "ACCEPTABLE_LICENSES+=vim-license" \
ee3561ee 340 >> ${ISOROOT}/usr/pkg/etc/mk.conf
c19c746b
MD
341 test -e ${ISODIR}/.didbootstrap || \
342 echo ".endif # added by nrelease" \
ee3561ee 343 >> ${ISOROOT}/usr/pkg/etc/mk.conf
3fff415b 344.endif
c19c746b
MD
345 test -e ${ISODIR}/.didbootstrap || sync
346 test -e ${ISODIR}/.didbootstrap || touch ${ISODIR}/.didbootstrap
8abe78a1
MD
347 #
348 # Build and install packages, skip packages already installed
349 #
bce110a5 350.for PKG in ${PKGSRC_PACKAGES}
8abe78a1 351 ${CHROOT_CMD} "cd /usr/pkgsrc/${PKG} && \
3fff415b
SW
352 (bmake check > /dev/null 2>&1 || \
353 bmake ${PKGSRC_OPTIONS} clean build install)"
8188de86 354.endfor
8abe78a1
MD
355 #
356 # Remove packages which nothing depends on and clean up
357 #
cc55a235 358 ${CHROOT_CMD} "pkg_leaves | xargs pkg_delete -R"
8abe78a1 359 -umount ${ISOROOT}/usr/pkgsrc/distfiles
45e80934 360 umount ${ISOROOT}/dev
fbc26094 361 umount ${ISOROOT}/usr/pkgsrc
589a5738 362 rm -rf ${ISOROOT}/usr/pkgobj
fbc26094 363 rm -f ${ISOROOT}/etc/resolv.conf
3652f053 364 makewhatis ${ISOROOT}/usr/pkg/man
6ca9a59c 365
0936984e
MD
366# So locate works
367#
8398ca17
SW
368mklocatedb:
369 ( find -s ${ISOROOT} -path ${ISOROOT}/tmp -or \
370 -path ${ISOROOT}/usr/tmp -or -path ${ISOROOT}/var/tmp \
371 -prune -o -print | sed -e 's#^${ISOROOT}##g' | \
372 /usr/libexec/locate.mklocatedb \
373 -presort >${ISOROOT}/var/db/locate.database )
374
6ca9a59c 375mkiso:
bce110a5 376 ( cd ${ISOROOT}; ${PKGBIN_MKISOFS} -b boot/cdboot -no-emul-boot \
74ec6a9d 377 -R -J -o ${ISOFILE} \
64bba8c7 378 -V "DragonFly `${.CURDIR}/../tools/gitrev.sh | cut -c -22`" . )
6ca9a59c 379
b9c3e754
MN
380
381mkimg:
60b68cbb 382 if [ ! -d ${IMGMNT} ]; then mkdir -p ${IMGMNT}; fi
9a122c9a
MD
383 -if [ -f ${ISODIR}/vn.which ]; then umount ${IMGMNT}; \
384 vnconfig -u `cat ${ISODIR}/vn.which`; fi
385 @echo "STEP: determine required image size"
60b68cbb 386 sz=`du -ck ${ISOROOT} | tail -n 1 | cut -f 1`; \
9a122c9a
MD
387 sz=`bc -e "(($${sz}) / 1024) * 1.15" -equit | cut -f1 -d.`; \
388 dd if=/dev/zero of=${IMGFILE} bs=1m count=$${sz};
389 fdisk -IB -p ${IMGFILE}
390 @echo "STEP: determine free vn device"
391 vnconfig -l | grep "not in use" | head -n 1 | \
392 cut -f 1 -d: > ${ISODIR}/vn.which
393 vnconfig -e -s labels `cat ${ISODIR}/vn.which` ${IMGFILE}
394 @echo "STEP: write standard disklabel"
395 disklabel -w -r `cat ${ISODIR}/vn.which`s1 auto
396 @echo "STEP: read disklabel back"
397 disklabel -r `cat ${ISODIR}/vn.which`s1 > ${IMGFILE}.label
398 @echo "STEP: determine number of sectors of whole disk"
60b68cbb 399 secs=`tail -n 1 ${IMGFILE}.label | cut -f 3 -w`; \
9a122c9a
MD
400 echo " a: $${secs} 0 4.2BSD" >> ${IMGFILE}.label;
401 @echo "STEP: write modified disklabel back"
402 disklabel -R -r `cat ${ISODIR}/vn.which`s1 ${IMGFILE}.label
403 rm ${IMGFILE}.label
404 @echo "STEP: write bootsector"
405 disklabel -B `cat ${ISODIR}/vn.which`s1
406 boot0cfg -B -o noupdate `cat ${ISODIR}/vn.which`
407 newfs /dev/`cat ${ISODIR}/vn.which`s1a
408 mount /dev/`cat ${ISODIR}/vn.which`s1a ${IMGMNT}
409 cpdup ${ISOROOT} ${IMGMNT}
410 @echo "STEP: fixup ${IMGMNT}/etc/fstab"
e36bedaf 411 echo "/dev/${IMGUSBDEV}s1a / ufs rw,noatime 0 1" > ${IMGMNT}/etc/fstab
9a122c9a
MD
412 echo "proc /proc procfs rw 0 0" >> ${IMGMNT}/etc/fstab
413 @echo "STEP: fixup ${IMGMNT}/boot/loader.conf"
414 -fgrep -v kernel_options ${IMGMNT}/boot/loader.conf > ${IMGMNT}/boot/loader.conf.new
415 echo 'vfs.root.mountfrom="ufs:${IMGUSBDEV}s1a"' >> ${IMGMNT}/boot/loader.conf.new
416 mv ${IMGMNT}/boot/loader.conf.new ${IMGMNT}/boot/loader.conf
417 @echo "STEP: cleanup"
418 df ${IMGMNT}
419 umount ${IMGMNT}
420 vnconfig -u `cat ${ISODIR}/vn.which`
421 rm -f ${ISODIR}/vn.which
60b68cbb 422 rmdir ${IMGMNT}
9a122c9a 423 @echo "STEP: done"
b9c3e754 424
6ca9a59c 425clean:
c19c746b
MD
426 -umount ${ISOROOT}/usr/pkgsrc/distfiles > /dev/null 2>&1
427 -umount ${ISOROOT}/usr/pkgsrc > /dev/null 2>&1
9a122c9a
MD
428 -umount ${ISOROOT}/dev > /dev/null 2>&1
429 -if [ -f ${ISODIR}/vn.which ]; then umount ${IMGMNT}; \
430 vnconfig -u `cat ${ISODIR}/vn.which`; fi
6ca9a59c 431 if [ -d ${ISOROOT} ]; then chflags -R noschg ${ISOROOT}; fi
c19c746b
MD
432 rm -rf ${ISOROOT}
433 rm -rf ${NRLOBJDIR}/nrelease
9a122c9a 434 rm -f ${ISODIR}/.didbootstrap ${ISODIR}/vn.which
6ca9a59c
MD
435
436realclean: clean
3ebedc5e 437 rm -rf ${OBJSYS}/${KERNCONF}
8abe78a1 438 #
bce110a5
MD
439 # do not use PKGSRC_PKG_PATH here, we do not want to destroy an
440 # override location.
8abe78a1 441 #
c19c746b
MD
442 rm -rf ${ISODIR}/packages
443 rm -rf ${ISODIR}/distfiles
6ca9a59c 444
bce110a5 445pkgsrc_bootstrap:
0936984e 446 mkdir -p /usr/release/bootstrap
de863bf0
MD
447 (cd ${PKGSRC_PATH}/bootstrap; \
448 export share_dir=/usr/release/bootstrap/share; \
449 ./bootstrap --workdir /usr/release/bootstrap)
bce110a5 450
bce110a5
MD
451pkgsrc_cdrecord:
452.if !exists (${PKGBIN_MKISOFS})
0936984e 453 (cd ${PKGSRC_PATH}/sysutils/cdrtools; bmake clean build install)
bce110a5 454.endif
cc224c64 455
e2dbfa0b 456help all:
5af45f85
MD
457 @echo "make [gui] release - complete build from scratch"
458 @echo "make [gui] quick - attempt to do an incremental rebuild"
459 @echo "make [gui] realquick - attempt to restart after world & kernel"
460 @echo "make [gui] restartpkgs - attempt to restart at the pkg building stage"
8abe78a1
MD
461 @echo ""
462 @echo "Extra packages may be specified with PKGSRC_EXTRA_PACKAGES"
588a679c 463
e2dbfa0b
TN
464.PHONY: release quickrel realquickrel
465.PHONY: installer
9b29c40a 466.PHONY: quick realquick
e2dbfa0b 467.PHONY: check buildworld1 buildworld2
b9c3e754 468.PHONY: buildkernel1 buildkernel2 buildiso customizeiso mklocatedb mkiso mkimg
796fd273 469.PHONY: clean realclean help all srcs
cc224c64 470
6ca9a59c 471.include <bsd.prog.mk>