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