root/trunk/Makefile

Revision 2168, 17.2 kB (checked in by jhuntwork, 6 hours ago)

Add a little more verbosity surrounding the tools tarball. Add createfiles to the clean list.

Line 
1 #
2 # Makefiles for automating the LFS LiveCD build
3 #
4 # Written by Jeremy Huntwork | jhuntwork AT linuxfromscratch DOT org
5 # Several additions and edits by Alexander Patrakov, Justin Knierim and
6 # Thomas Pegg
7 #
8 # These scripts are published under the GNU General Public License, version 2
9 #
10 #==============================================================================
11 #
12 # Unless otherwise noted, please try to keep all line lengths below 80 chars.
13 #
14
15 # Place your personal customizations in Makefile.personal
16 # instead of editing this Makefile.
17 # Makefile.personal is deliberately not in SVN.
18
19 -include Makefile.personal
20
21 # Here are the various variables you might want/need to change.
22 # Variables mentioned in the README will not be commented on here.
23
24 export MPBASE ?= /mnt/lfs
25
26 # Free disk space needed for the build.
27 ROOTFS_MEGS := 1536
28
29 # Machine architecure, LiveCD version, and specific arch variables.
30 # When building a 32-bit CD from a 64-bit multilib host,
31 # please use "linux32 make" instead of plain "make".
32 #==============================================================================
33
34 export CD_ARCH := $(shell uname -m)
35 export CD_VERSION ?= $(CD_ARCH)-6.4
36
37 ifeq ($(CD_ARCH),i686)
38 export LINKER := ld-linux.so.2
39 endif
40
41 ifeq ($(CD_ARCH),x86_64)
42 export 64bit = true
43 export LINKER := ld-linux-x86-64.so.2
44 endif
45
46 # Default timezone
47 export timezone ?= GMT
48 # Default paper size for groff.
49 export pagesize ?= letter
50
51 # HTTP:     Default http server for the lfs-base packages
52 # HTTPBLFS: Default http server for the BLFS packages
53 export HTTP ?= http://kerrek.linuxfromscratch.org/pub/lfs/conglomeration
54 export HTTPBLFS ?= http://kerrek.linuxfromscratch.org/pub/blfs/conglomeration
55
56 #==============================================================================
57 # The following variables are not expected to be changed
58
59 export WD := /tools
60 export MP := $(MPBASE)/image
61 export ROOT := /lfs-livecd
62 export SRC := /sources
63 export LFSSRC := /lfs-sources
64 export PKG := packages
65
66 export MKTREE := $(MP)$(ROOT)
67
68 # Environment Variables
69 # The following lines need to be all on one line - no newlines.
70 #===============================================================================
71 export lfsenv := exec env -i HOME=$$HOME LFS=$(MP) LC_ALL=POSIX PATH=$(WD)/bin:/bin:/usr/bin /bin/bash -c
72
73 export chenv-pre-bash := $(WD)/bin/env -i HOME=/root TERM=$(TERM) PS1='\u:\w\$$ ' PATH=/bin:/usr/bin:/sbin:/usr/sbin:$(WD)/bin $(WD)/bin/bash -c
74
75 export chenv-post-bash := $(WD)/bin/env -i HOME=/root TERM=$(TERM) PS1='\u:\w\$$ ' PATH=/bin:/usr/bin:/sbin:/usr/sbin:$(WD)/bin /bin/bash -c
76
77 export lfsbash := set +h && umask 022 && cd $(MKTREE)
78
79 export chenv-blfs := /usr/bin/env -i HOME=/root TERM=$(TERM) PS1='\u:\w\$$ ' PATH=/bin:/usr/bin:/sbin:/usr/sbin INPUTRC=/etc/inputrc XML_CATALOG_FILES="/usr/share/xml/docbook/xsl-stylesheets-1.69.1/catalog.xml /etc/xml/catalog" /bin/bash -c
80
81 # More Environment Variables
82 #==============================================================================
83 export chbash-pre-bash := SHELL=$(WD)/bin/bash
84 export chbash-post-bash := SHELL=/bin/bash
85 export WHICH ?= $(WD)/bin/which
86 export WGET ?= wget
87
88 export BRW= ""
89 export RED= ""
90 export GREEN= ""
91 export ORANGE= ""
92 export BLUE= ""
93 export WHITE= ""
94
95
96 # TARGETS
97 #==============================================================================
98 #
99 # The build starts and ends here, first building the dependency targets,
100 # lfs-base, extend-lfs and iso, then it echoes a notice that it's finished. :)
101
102 all: test-host lfs-base extend-lfs iso
103         @echo "The LiveCD, $(MPBASE)$(ROOT)/lfslivecd-$(CD_VERSION).iso, is ready!"
104
105 test-host:
106         @if [ `whoami` != "root" ] ; then \
107          echo "You must be logged in as root." && exit 1 ; fi
108
109 test-env:
110         env
111
112 # This image should be kept as clean as possible, i.e.:
113 # avoid creating files on it that you will later delete,
114 # preserve as many zeroed sectors as possible.
115 root.ext2:
116         dd if=/dev/null of=root.ext2 bs=1M seek=$(ROOTFS_MEGS)
117         mke2fs -F root.ext2
118         tune2fs -c 0 -i 0 root.ext2
119
120 # This target populates the root.ext2 image and sets up some mounts
121 $(MKTREE): root.ext2
122         mkdir -p $(MP) $(MPBASE)$(SRC) $(MPBASE)$(WD)/bin $(MPBASE)/iso/boot
123         mount -o loop root.ext2 $(MP)
124         mkdir -p $(MKTREE) $(MP)$(SRC) $(MP)$(WD)
125         mkdir -p $(MP)/boot $(MP)$(LFSSRC) $(MPBASE)/iso$(LFSSRC)
126         mkdir -p $(MP)/drivers $(MPBASE)/iso/drivers
127         mount --bind $(MPBASE)$(ROOT) $(MP)$(ROOT)
128         mount --bind $(MPBASE)$(WD) $(MP)$(WD)
129         mount --bind $(MPBASE)$(SRC) $(MP)$(SRC)
130         mount --bind $(MPBASE)/iso/boot $(MP)/boot
131         mount --bind $(MPBASE)/iso$(LFSSRC) $(MP)$(LFSSRC)
132         mount --bind $(MPBASE)/iso/drivers $(MP)/drivers
133         -ln -nsf $(MPBASE)$(WD) /
134         -ln -nsf $(MPBASE)$(SRC) /
135         -ln -nsf $(MPBASE)$(ROOT) /
136         -mkdir -p $(MP)/{proc,sys,dev/shm,dev/pts}
137         -mount -t proc proc $(MP)/proc
138         -mount -t sysfs sysfs $(MP)/sys
139         -mount -t tmpfs shm $(MP)/dev/shm
140         -mount -t devpts devpts $(MP)/dev/pts
141         -mkdir -pv $(MP)/{bin,boot,etc/opt,home,lib,mnt,opt}
142         -mkdir -pv $(MP)/{media/{floppy,cdrom},sbin,srv,var}
143         -install -d -m 0750 $(MP)/root
144         -install -d -m 1777 $(MP)/tmp $(MP)/var/tmp
145         -mkdir -pv $(MP)/usr/{,local/}{bin,include,lib,sbin,src}
146         -mkdir -pv $(MP)/usr/{,local/}share/{doc,info,locale,man}
147         -mkdir -v  $(MP)/usr/{,local/}share/{misc,terminfo,zoneinfo}
148         -mkdir -pv $(MP)/usr/{,local/}share/man/man{1..8}
149         -for dir in $(MP)/usr $(MP)/usr/local; do ln -sv share/{man,doc,info} $$dir ; done
150         -mkdir -v $(MP)/var/{lock,log,mail,run,spool}
151         -mkdir -pv $(MP)/var/{opt,cache,lib/{misc,locate},local}
152         -mknod -m 600 $(MP)/dev/console c 5 1
153         -mknod -m 666 $(MP)/dev/null c 1 3
154         -mknod -m 666 $(MP)/dev/zero c 1 5
155         -mknod -m 666 $(MP)/dev/ptmx c 5 2
156         -mknod -m 666 $(MP)/dev/tty c 5 0
157         -mknod -m 444 $(MP)/dev/random c 1 8
158         -mknod -m 444 $(MP)/dev/urandom c 1 9
159         -ln -s /proc/self/fd $(MP)/dev/fd
160         -ln -s /proc/self/fd/0 $(MP)/dev/stdin
161         -ln -s /proc/self/fd/1 $(MP)/dev/stdout
162         -ln -s /proc/self/fd/2 $(MP)/dev/stderr
163         -ln -s /proc/kcore $(MP)/dev/core
164         touch $(MKTREE)
165 ifdef 64bit
166         -ln -nsf lib $(WD)/lib64
167         -ln -nsf lib $(MP)/lib64
168         -ln -nsf lib $(MP)/usr/lib64
169 endif
170
171 # This target builds just a base LFS system, minus the kernel and bootscripts
172 #==============================================================================
173 lfs-base: $(MKTREE) lfsuser
174         @-chown -R lfs $(WD) $(MP)$(WD) $(WD)/bin \
175          $(MP)$(SRC) $(MKTREE)
176         @cp $(ROOT)/scripts/unpack $(WD)/bin
177         @make maybe-tools
178         @touch $(PKG)/wget/.pass2
179         @install -m644 -oroot -groot $(ROOT)/etc/{group,passwd} $(MP)/etc
180         @-ln -s $(WD)/bin/bash $(MP)/bin/bash
181         @chroot "$(MP)" $(chenv-pre-bash) 'set +h && \
182          chown -R 0:0 $(WD) $(SRC) $(ROOT) && \
183          cd $(ROOT) && make pre-bash $(chbash-pre-bash)'
184         @chroot "$(MP)" $(chenv-post-bash) 'set +h && cd $(ROOT) && \
185          make post-bash $(chbash-post-bash)'
186         @-ln -s $(WD)/bin/wget $(MP)/usr/bin/wget
187
188 extend-lfs: $(MKTREE)
189         @cp $(WD)/bin/which $(MP)/usr/bin
190         @cp $(ROOT)/scripts/unpack $(MP)/bin
191         @chroot "$(MP)" $(chenv-blfs) 'set +h && cd $(ROOT) && \
192          make blfs $(chbash-post-bash)'
193         @install -m644 etc/issue* $(MP)/etc
194
195 lfsuser:
196         @-groupadd lfs
197         @-useradd -s /bin/bash -g lfs -m -k /dev/null lfs
198         @touch $@
199
200 pre-which:
201         @echo "#!/bin/sh" > $(WHICH)
202         @echo 'type -pa "$$@" | head -n 1 ; exit $${PIPESTATUS[0]}' >> $(WHICH)
203         @chmod 755 $(WHICH)
204
205 pre-wget:
206         @make -C $(PKG)/wget prebuild
207         @touch $@
208
209 maybe-tools:
210         @if [ -f tools.tar.bz2 ] ; then \
211             echo "Found previously built tools. Unpacking..." && \
212             tar -C .. -jxpf tools.tar.bz2 ; \
213         else \
214             su - lfs -c "$(lfsenv) '$(lfsbash) && $(MAKE) tools'" && \
215             echo "Packaging tools for later use..." && \
216             tar -C .. -jcpf tools.tar.bz2 tools ; \
217         fi
218         @touch $@
219
220 tools:  pre-which pre-wget lfs-binutils-pass1 lfs-gcc-pass1 \
221         lfs-linux-headers-scpt lfs-glibc-scpt lfs-adjust-toolchain \
222         lfs-tcl-scpt lfs-expect-scpt lfs-dejagnu-scpt lfs-gcc-pass2 \
223         lfs-binutils-pass2 lfs-ncurses-scpt lfs-bash-scpt lfs-bzip2-scpt \
224         lfs-coreutils-scpt lfs-diffutils-scpt lfs-e2fsprogs-scpt lfs-findutils-scpt \
225         lfs-gawk-scpt lfs-gettext-scpt lfs-grep-scpt lfs-gzip-scpt lfs-m4-scpt \
226         lfs-make-scpt lfs-patch-scpt lfs-perl-scpt lfs-sed-scpt \
227         lfs-tar-scpt lfs-texinfo-scpt lfs-util-linux-ng-scpt lfs-wget-scpt \
228         lfs-cdrtools-scpt lfs-zlib-scpt lfs-zisofs-tools-scpt
229         @cp /etc/resolv.conf $(WD)/etc
230         @touch $@
231
232 pre-bash: createfiles ch-linux-headers ch-man-pages \
233         ch-glibc re-adjust-toolchain ch-binutils ch-gmp ch-mpfr ch-gcc ch-db \
234         ch-sed ch-e2fsprogs ch-coreutils ch-iana-etc ch-m4 ch-bison \
235         ch-ncurses ch-procps ch-libtool ch-zlib ch-perl ch-readline \
236         ch-autoconf ch-automake ch-bash
237
238 post-bash: ch-bzip2 ch-diffutils ch-file ch-gawk ch-findutils \
239         ch-flex ch-grub ch-gettext ch-grep ch-groff ch-gzip ch-inetutils \
240         ch-iproute2 ch-kbd ch-less ch-make ch-man-db \
241         ch-module-init-tools ch-patch ch-psmisc ch-shadow ch-sysklogd \
242         ch-sysvinit ch-tar ch-texinfo ch-udev ch-util-linux-ng ch-vim \
243         final-environment
244
245 blfs:   ch-openssl ch-wget ch-reiserfsprogs ch-xfsprogs ch-nano ch-joe \
246         ch-screen ch-pkgconfig ch-libidn ch-libgpg-error ch-libgcrypt \
247         ch-gnutls ch-curl ch-zip ch-unzip ch-lynx ch-libxml2 ch-expat \
248         ch-subversion ch-lfs-bootscripts ch-livecd-bootscripts ch-docbook-xml \
249         ch-libxslt ch-docbook-xsl ch-html_tidy ch-LFS-BOOK ch-libpng ch-freetype \
250         ch-fontconfig ch-Xorg-base ch-Xorg-proto ch-Xorg-util ch-libXau ch-libXdmcp \
251         ch-xcb-proto ch-libpthread-stubs ch-libxcb ch-ed ch-Xorg-lib \
252         ch-xbitmaps ch-libdrm ch-Mesa ch-Xorg-app ch-xcursor-themes \
253         ch-Xorg-font ch-XML-Parser ch-intltool ch-xkeyboard-config ch-luit \
254         ch-dbus ch-pcre ch-glib2 ch-dbus-glib ch-pciutils ch-libusb ch-usbutils \
255         ch-xorg-server ch-Xorg-driver \
256         ch-freefont ch-fonts-dejavu ch-fonts-kochi ch-fonts-firefly ch-fonts-baekmuk \
257         ch-libjpeg ch-libtiff ch-openssh ch-giflib \
258         ch-gc ch-cairo ch-hicolor-icon-theme \
259         ch-pango ch-atk ch-jasper ch-gtk2 ch-w3m ch-cvs ch-popt ch-samba ch-libIDL \
260         ch-seamonkey ch-alsa-lib ch-alsa-utils ch-alsa-firmware \
261         ch-libogg ch-libvorbis ch-speex ch-flac ch-libdvdcss ch-libtheora ch-xine-lib ch-parted \
262         ch-librsvg ch-startup-notification chroot-gvim ch-vte ch-URI ch-xfce \
263         ch-gxine ch-irssi ch-pidgin ch-net-tools \
264         ch-xchat ch-wireless_tools ch-wpa_supplicant \
265         ch-tcpwrappers ch-portmap ch-nfs-utils \
266         ch-traceroute ch-rsync ch-jhalfs ch-sudo ch-bc ch-dialog ch-ncftp  \
267         ch-device-mapper ch-LVM2 ch-dmraid ch-multipath-tools \
268         ch-dhcpcd ch-distcc ch-ppp ch-rp-pppoe ch-pptp \
269         ch-cpio ch-mutt ch-msmtp ch-tin ch-mdadm ch-which \
270         ch-espeak ch-dotconf ch-speech-dispatcher ch-speechd-up ch-brltty  \
271         ch-strace ch-iptables ch-eject ch-xlockmore ch-hdparm \
272         ch-sysfsutils ch-pcmcia-cs ch-pcmciautils ch-ddccontrol ch-ddccontrol-db \
273         ch-blfs-bootscripts ch-oui-data ch-Markdown ch-SmartyPants \
274         ch-man-pages-fr ch-man-pages-es ch-man-pages-it ch-manpages-de ch-manpages-ru \
275         ch-anthy ch-scim ch-scim-tables ch-scim-anthy ch-libhangul ch-scim-hangul \
276         ch-libchewing ch-scim-chewing ch-scim-pinyin ch-scim-input-pad \
277         ch-hibernate-script ch-slang ch-mc ch-fuse ch-dosfstools ch-ntfsprogs \
278         ch-libaal ch-reiser4progs ch-vbetool ch-bin86 ch-lilo ch-syslinux \
279         ch-scsi-firmware ch-net-firmware ch-linux32 ch-initramfs
280 ifeq ($(CD_ARCH),i686)
281         make ch-linux
282         make ch-binutils64
283         make ch-gcc64
284 endif
285         make ch-linux64
286         make ch-gcc33
287         make update-caches
288
289 wget-list:
290         @>wget-list ; \
291          for DIR in packages/* ; do \
292             make -C $${DIR} wget-list-entry || echo Never mind. ; \
293          done ; \
294          sed -i '/^$$/d' wget-list
295
296 # Targets for building packages individually. Useful for troubleshooting.
297 # These do not generally get used as part of the script. They're for manual
298 # use only ie, 'make [target]'
299 #==============================================================================
300
301 # The following takes the form 'make lfs-[package name]-only'   
302 lfs-%-only: lfsuser
303         @su - lfs -c "$(lfsenv) '$(lfsbash) && $(MAKE) lfs-$*-scpt'"
304
305 # The following two take the form 'make lfs-[package name]-only-pass#' 
306 lfs-%-only-pass1: lfsuser
307         @su - lfs -c "$(lfsenv) '$(lfsbash) && $(MAKE) lfs-$*-pass1'"
308
309 lfs-%-only-pass2: lfsuser
310         @su - lfs -c "$(lfsenv) '$(lfsbash) && $(MAKE) lfs-$*-pass2'"
311
312 # The following takes the form 'make [package name]-only-ch'   
313 %-only-ch: $(MKTREE)
314         make -C $(PKG)/$* chroot
315
316 gvim: $(MKTREE)
317         make -C $(PKG)/vim chroot3
318
319 # The following takes the form 'make [package name]-clean'
320 # Cleans the build directory of a single package.
321
322 %-clean:
323         make -C $(PKG)/$* clean
324
325 # The targets below can be called manually, but are also used by the
326 # scripts internally.
327 #==============================================================================
328
329 createfiles:
330         @-$(WD)/bin/ln -s $(WD)/bin/{bash,cat,grep,pwd,stty} /bin
331         @-$(WD)/bin/ln -s $(WD)/bin/perl /usr/bin
332         @-$(WD)/bin/ln -s $(WD)/lib/libgcc_s.so{,.1} /usr/lib
333         @-$(WD)/bin/ln -s $(WD)/lib/libstdc++.so{,.6} /usr/lib
334         @-$(WD)/bin/ln -s bash /bin/sh
335         @touch /var/run/utmp /var/log/{btmp,lastlog,wtmp}
336         @chgrp utmp /var/run/utmp /var/log/lastlog
337         @chmod 664 /var/run/utmp /var/log/lastlog
338         @cp $(WD)/etc/resolv.conf /etc
339         @-cp $(ROOT)/etc/hosts /etc
340         @touch $@
341
342 # Do not call the targets below manually! They are used internally and must be
343 # called by other targets.
344 #==============================================================================
345
346 lfs-%-scpt:
347         $(MAKE) -C $(PKG)/$* stage1
348
349 lfs-%-pass1:
350         $(MAKE) -C $(PKG)/$* pass1
351
352 lfs-%-pass2:
353         $(MAKE) -C $(PKG)/$* pass2
354
355 lfs-adjust-toolchain:
356         $(MAKE) -C $(PKG)/binutils adjust-toolchain
357
358 ch-%:
359         make -C $(PKG)/$* stage2
360
361 re-adjust-toolchain:
362         make -C $(PKG)/binutils re-adjust-toolchain
363
364 final-environment:
365         @cp -ra $(ROOT)/etc/sysconfig /etc
366         @rm -rf /etc/sysconfig/.svn
367         @-cp $(ROOT)/etc/inputrc /etc
368         @-cp $(ROOT)/etc/bashrc /etc
369         @-cp $(ROOT)/etc/profile /etc
370         @-dircolors -p > /etc/dircolors
371         @-cp $(ROOT)/etc/fstab /etc
372
373 update-caches:
374         cd /usr/share/fonts ; mkfontscale ; mkfontdir ; fc-cache -f
375         mandb -c 2>/dev/null
376         echo 'dummy / ext2 defaults 0 0' >/etc/mtab
377         updatedb --prunepaths='/sources /tools /lfs-livecd /lfs-sources /proc /sys /dev /tmp /var/tmp'
378         echo >/etc/mtab
379
380 chroot-gvim:
381         make -C $(PKG)/vim stage3
382
383 # Targets to create the iso
384 #==============================================================================
385
386 prepiso: $(MKTREE)
387         @-rm $(MP)/root/.bash_history
388         @-rm $(MP)/etc/resolv.conf
389         @>$(MP)/var/log/btmp
390         @>$(MP)/var/log/wtmp
391         @>$(MP)/var/log/lastlog
392         @sed -i 's/Version:$$/Version: $(CD_VERSION)/' $(MP)/boot/isolinux/boot.msg
393         @sed -i 's/Version:$$/Version: $(CD_VERSION)/' $(MP)/etc/issue*
394         @install -m644 doc/lfscd-remastering-howto.txt $(MP)/root
395         @sed -e 's/\[Version\]/$(CD_VERSION)/' -e 's/\\_/_/g' \
396             doc/README.txt >$(MP)/root/README.txt
397         @install -m600 root/.bashrc $(MP)/root/.bashrc
398         @install -m755 scripts/{net-setup,greeting,livecd-login} $(MP)/usr/bin/
399         @sed s/@LINKER@/$(LINKER)/ scripts/shutdown-helper.in >$(MP)/usr/bin/shutdown-helper
400         @chmod 755 $(MP)/usr/bin/shutdown-helper
401         @svn export --force root $(MP)/etc/skel
402
403 iso: prepiso
404         @make unmount
405         # Bug in old kernels requires a sync after unmounting the loop device
406         # for data integrity.
407         @sync ; sleep 1 ; sync
408         # e2fsck optimizes directories and returns 1 after a clean build.
409         # This is not a bug.
410         @-e2fsck -f -p root.ext2
411         @( LC_ALL=C ; export LC_ALL ; \
412             cat $(ROOT)/doc/README.html.head ; \
413             sed 's/\[version\]/$(CD_VERSION)/' $(ROOT)/doc/README.txt | \
414                 $(WD)/bin/Markdown --html4tags | $(WD)/bin/SmartyPants ; \
415             cat $(ROOT)/doc/README.html.tail ) >$(MPBASE)/iso/README.html
416         @$(WD)/bin/mkzftree -F root.ext2 $(MPBASE)/iso/root.ext2
417         @cd $(MPBASE)/iso ; $(WD)/bin/mkisofs -z -R -l --allow-leading-dots -D -o \
418         $(MPBASE)$(ROOT)/lfslivecd-$(CD_VERSION).iso -b boot/isolinux/isolinux.bin \
419         -c boot/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table \
420         -V "lfslivecd-$(CD_VERSION)" ./
421         @cd $(MPBASE)/iso ; $(WD)/bin/mkisofs -z -R -l --allow-leading-dots -D -o \
422         $(MPBASE)$(ROOT)/lfslivecd-$(CD_VERSION)-nosrc.iso -b boot/isolinux/isolinux.bin \
423         -c boot/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table \
424         -m lfs-sources -V "lfslivecd-$(CD_VERSION)" ./
425
426 # Targets to clean your tree.
427 #==============================================================================
428
429 clean: unmount
430         @-rm -rf $(WD) $(MPBASE)$(WD) $(MPBASE)/iso
431         @-userdel lfs
432         @-groupdel lfs
433         @-rm -rf /home/lfs
434         @-rm {prepiso,lfsuser,lfs-base,extend-lfs,pre-wget,maybe-tools,createfiles}
435         @-rm $(PKG)/binutils/{,re-}adjust-toolchain
436         @-for i in `ls $(PKG)` ; do $(MAKE) -C $(PKG)/$$i clean ; done
437         @find $(PKG) -name "pass*" -exec rm -rf \{} \;
438         @find $(PKG) -name "stage*" -exec rm -rf \{} \;
439         @find $(PKG) -name "*.log" -exec rm -rf \{} \;
440         @rm -f $(PKG)/Xorg-*/*-stage2
441         @rm -f $(PKG)/wget/prebuild
442         @rm -f $(PKG)/binutils/{a.out,dummy.c,.spectest}
443         @-rm -f $(SRC) $(ROOT)
444         @find packages/* -xtype l -exec rm -f \{} \;
445         @-rm root.ext2
446
447 scrub: clean
448         @rm -f lfslivecd-$(CD_VERSION).iso lfslivecd-$(CD_VERSION)-nosrc.iso
449
450 mount: $(MKTREE)
451
452 unmount:
453         -umount $(MP)/dev/shm
454         -umount $(MP)/dev/pts
455         -umount $(MP)/proc
456         -umount $(MP)/sys
457         -umount $(MP)/boot
458         -umount $(MP)/drivers
459         -umount $(MP)$(LFSSRC)
460         -umount $(MP)$(SRC)
461         -umount $(MP)$(WD)
462         -umount $(MP)$(ROOT)
463         -rmdir $(MP)$(SRC) $(MP)$(WD) $(MP)$(ROOT)
464         -rmdir $(MP)/boot $(MP)$(LFSSRC) $(MP)/drivers
465         -umount $(MP)
466
467 zeroes: $(MKTREE)
468         -dd if=/dev/zero of=$(MP)/zeroes
469         -rm $(MP)/zeroes
470         -make unmount
471
472 .PHONY: mount unmount clean_sources scrub clean iso chroot-gvim update-caches \
473         final-environment re-adjust-toolchain ch-% ch-glibc-32 lfs-adjust-toolchain \
474         lfs-%-scpt lfs-%-scpt-32 lfs-%-pass1 lfs-%-pass2 \
475         gvim %-only-ch lfs-%-only lfs-%-only-pass1 lfs-%-only-pass2 lfs-wget \
476         lfs-rm-wget blfs post-bash pre-bash tools pre-which zeroes
Note: See TracBrowser for help on using the browser.