r392 - in x86/branches/utf8: . initramfs packages/LFS-BOOK packages/LVM2 packages/Xorg packages/atk packages/autoconf packages/automake packages/bash packages/binutils packages/bison packages/blfs-bootscripts packages/bzip2 packages/cdrtools packages/coreutils packages/cpio packages/curl packages/cvs packages/device-mapper packages/dhcpcd packages/dialog packages/diffutils packages/distcc packages/docbook-xml packages/docbook-xsl packages/e2fsprogs packages/eject packages/expat packages/file packages/findutils packages/firefox packages/flex packages/fontconfig packages/fonts-dejavu packages/freefont packages/freetype packages/gawk packages/gcc packages/gettext packages/glib2 packages/glibc packages/gpm packages/grep packages/groff packages/grub packages/gtk+2 packages/gzip packages/hotplug packages/html_tidy packages/iana-etc packages/imlib2 packages/inetutils packages/inputattach packages/ion packages/iproute2 packages/irssi packages/isoinfo packages/joe packages/kbd packages/klibc packages/less packages/lfs-bootscripts packages/libIDL packages/libaal packages/libjpeg packages/libpng packages/libtiff packages/libtool packages/libungif packages/libxml2 packages/libxslt packages/links packages/linux packages/linux-libc-headers packages/lua packages/lynx packages/m4 packages/make packages/man packages/man-pages packages/mktemp packages/module-init-tools packages/msmtp packages/mutt packages/nALFS packages/nano packages/ncftp packages/ncurses packages/nfs-utils packages/openssh packages/openssl packages/pango packages/patch packages/pciutils packages/perl packages/pkgconfig packages/popt packages/portmap packages/ppp packages/procps packages/psmisc packages/raidtools packages/readline packages/redhat-patches packages/reiser4progs packages/reiserfsprogs packages/rp-pppoe packages/samba packages/screen packages/sed packages/shadow packages/sharutils packages/slang packages/slrn packages/squashfs packages/startup-notification packages/subversion packages/sysklogd packages/syslinux packages/sysvinit packages/tar packages/tcpwrappers packages/template packages/texinfo packages/thunderbird packages/traceroute packages/udev packages/unionfs packages/unzip packages/util-linux packages/vim packages/wget packages/xchat packages/xfce packages/xfsprogs packages/zip packages/zlib scripts

justin at linuxfromscratch.org justin at linuxfromscratch.org
Tue Jul 19 21:59:00 PDT 2005


Author: justin
Date: 2005-07-19 22:58:47 -0600 (Tue, 19 Jul 2005)
New Revision: 392

Removed:
   x86/branches/utf8/scripts/ftpget
   x86/branches/utf8/scripts/functions
Modified:
   x86/branches/utf8/Makefile
   x86/branches/utf8/initramfs/Makefile
   x86/branches/utf8/packages/LFS-BOOK/Makefile
   x86/branches/utf8/packages/LVM2/Makefile
   x86/branches/utf8/packages/Xorg/Makefile
   x86/branches/utf8/packages/atk/Makefile
   x86/branches/utf8/packages/autoconf/Makefile
   x86/branches/utf8/packages/automake/Makefile
   x86/branches/utf8/packages/bash/Makefile
   x86/branches/utf8/packages/binutils/Makefile
   x86/branches/utf8/packages/bison/Makefile
   x86/branches/utf8/packages/blfs-bootscripts/Makefile
   x86/branches/utf8/packages/bzip2/Makefile
   x86/branches/utf8/packages/cdrtools/Makefile
   x86/branches/utf8/packages/coreutils/Makefile
   x86/branches/utf8/packages/cpio/Makefile
   x86/branches/utf8/packages/curl/Makefile
   x86/branches/utf8/packages/cvs/Makefile
   x86/branches/utf8/packages/device-mapper/Makefile
   x86/branches/utf8/packages/dhcpcd/Makefile
   x86/branches/utf8/packages/dialog/Makefile
   x86/branches/utf8/packages/diffutils/Makefile
   x86/branches/utf8/packages/distcc/Makefile
   x86/branches/utf8/packages/docbook-xml/Makefile
   x86/branches/utf8/packages/docbook-xsl/Makefile
   x86/branches/utf8/packages/e2fsprogs/Makefile
   x86/branches/utf8/packages/eject/Makefile
   x86/branches/utf8/packages/expat/Makefile
   x86/branches/utf8/packages/file/Makefile
   x86/branches/utf8/packages/findutils/Makefile
   x86/branches/utf8/packages/firefox/Makefile
   x86/branches/utf8/packages/flex/Makefile
   x86/branches/utf8/packages/fontconfig/Makefile
   x86/branches/utf8/packages/fonts-dejavu/Makefile
   x86/branches/utf8/packages/freefont/Makefile
   x86/branches/utf8/packages/freetype/Makefile
   x86/branches/utf8/packages/gawk/Makefile
   x86/branches/utf8/packages/gcc/Makefile
   x86/branches/utf8/packages/gettext/Makefile
   x86/branches/utf8/packages/glib2/Makefile
   x86/branches/utf8/packages/glibc/Makefile
   x86/branches/utf8/packages/gpm/Makefile
   x86/branches/utf8/packages/grep/Makefile
   x86/branches/utf8/packages/groff/Makefile
   x86/branches/utf8/packages/grub/Makefile
   x86/branches/utf8/packages/gtk+2/Makefile
   x86/branches/utf8/packages/gzip/Makefile
   x86/branches/utf8/packages/hotplug/Makefile
   x86/branches/utf8/packages/html_tidy/Makefile
   x86/branches/utf8/packages/iana-etc/Makefile
   x86/branches/utf8/packages/imlib2/Makefile
   x86/branches/utf8/packages/inetutils/Makefile
   x86/branches/utf8/packages/inputattach/Makefile
   x86/branches/utf8/packages/ion/Makefile
   x86/branches/utf8/packages/iproute2/Makefile
   x86/branches/utf8/packages/irssi/Makefile
   x86/branches/utf8/packages/isoinfo/Makefile
   x86/branches/utf8/packages/joe/Makefile
   x86/branches/utf8/packages/kbd/Makefile
   x86/branches/utf8/packages/klibc/Makefile
   x86/branches/utf8/packages/less/Makefile
   x86/branches/utf8/packages/lfs-bootscripts/Makefile
   x86/branches/utf8/packages/libIDL/Makefile
   x86/branches/utf8/packages/libaal/Makefile
   x86/branches/utf8/packages/libjpeg/Makefile
   x86/branches/utf8/packages/libpng/Makefile
   x86/branches/utf8/packages/libtiff/Makefile
   x86/branches/utf8/packages/libtool/Makefile
   x86/branches/utf8/packages/libungif/Makefile
   x86/branches/utf8/packages/libxml2/Makefile
   x86/branches/utf8/packages/libxslt/Makefile
   x86/branches/utf8/packages/links/Makefile
   x86/branches/utf8/packages/linux-libc-headers/Makefile
   x86/branches/utf8/packages/linux/Makefile
   x86/branches/utf8/packages/lua/Makefile
   x86/branches/utf8/packages/lynx/Makefile
   x86/branches/utf8/packages/m4/Makefile
   x86/branches/utf8/packages/make/Makefile
   x86/branches/utf8/packages/man-pages/Makefile
   x86/branches/utf8/packages/man/Makefile
   x86/branches/utf8/packages/mktemp/Makefile
   x86/branches/utf8/packages/module-init-tools/Makefile
   x86/branches/utf8/packages/msmtp/Makefile
   x86/branches/utf8/packages/mutt/Makefile
   x86/branches/utf8/packages/nALFS/Makefile
   x86/branches/utf8/packages/nano/Makefile
   x86/branches/utf8/packages/ncftp/Makefile
   x86/branches/utf8/packages/ncurses/Makefile
   x86/branches/utf8/packages/nfs-utils/Makefile
   x86/branches/utf8/packages/openssh/Makefile
   x86/branches/utf8/packages/openssl/Makefile
   x86/branches/utf8/packages/pango/Makefile
   x86/branches/utf8/packages/patch/Makefile
   x86/branches/utf8/packages/pciutils/Makefile
   x86/branches/utf8/packages/perl/Makefile
   x86/branches/utf8/packages/pkgconfig/Makefile
   x86/branches/utf8/packages/popt/Makefile
   x86/branches/utf8/packages/portmap/Makefile
   x86/branches/utf8/packages/ppp/Makefile
   x86/branches/utf8/packages/procps/Makefile
   x86/branches/utf8/packages/psmisc/Makefile
   x86/branches/utf8/packages/raidtools/Makefile
   x86/branches/utf8/packages/readline/Makefile
   x86/branches/utf8/packages/redhat-patches/Makefile
   x86/branches/utf8/packages/reiser4progs/Makefile
   x86/branches/utf8/packages/reiserfsprogs/Makefile
   x86/branches/utf8/packages/rp-pppoe/Makefile
   x86/branches/utf8/packages/samba/Makefile
   x86/branches/utf8/packages/screen/Makefile
   x86/branches/utf8/packages/sed/Makefile
   x86/branches/utf8/packages/shadow/Makefile
   x86/branches/utf8/packages/sharutils/Makefile
   x86/branches/utf8/packages/slang/Makefile
   x86/branches/utf8/packages/slrn/Makefile
   x86/branches/utf8/packages/squashfs/Makefile
   x86/branches/utf8/packages/startup-notification/Makefile
   x86/branches/utf8/packages/subversion/Makefile
   x86/branches/utf8/packages/sysklogd/Makefile
   x86/branches/utf8/packages/syslinux/Makefile
   x86/branches/utf8/packages/sysvinit/Makefile
   x86/branches/utf8/packages/tar/Makefile
   x86/branches/utf8/packages/tcpwrappers/Makefile
   x86/branches/utf8/packages/template/Makefile
   x86/branches/utf8/packages/texinfo/Makefile
   x86/branches/utf8/packages/thunderbird/Makefile
   x86/branches/utf8/packages/traceroute/Makefile
   x86/branches/utf8/packages/udev/Makefile
   x86/branches/utf8/packages/unionfs/Makefile
   x86/branches/utf8/packages/unzip/Makefile
   x86/branches/utf8/packages/util-linux/Makefile
   x86/branches/utf8/packages/vim/Makefile
   x86/branches/utf8/packages/wget/Makefile
   x86/branches/utf8/packages/xchat/Makefile
   x86/branches/utf8/packages/xfce/Makefile
   x86/branches/utf8/packages/xfsprogs/Makefile
   x86/branches/utf8/packages/zip/Makefile
   x86/branches/utf8/packages/zlib/Makefile
Log:
Undone Makefile reorganization.

Modified: x86/branches/utf8/Makefile
===================================================================
--- x86/branches/utf8/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -1,141 +1,116 @@
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 #
-# Makefiles for automating the LFS LiveCD build
+# Makefile for automating the LFS LiveCD build
 #
-# Written by Jeremy Huntwork | jhuntwork at linuxfromscratch.org
-# Several additions and edits by Alexander Patrakov
+# Written by Jeremy Huntwork, 2004-1-27
 #
-# Last Edited: 2005-07-17
+# jhuntwork at linuxfromscratch.org
 #
 # Version for x86 arch using LFS 6.1
 #
-#==============================================================================
-#
-# Unless otherwise noted, please try to keep all line lengths below 80 chars. 
-#
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-
-# Edit this line to match the mount-point of the partition you'll be using to
-# build the cd.
-#==============================================================================
+# Edit this line to match the mount-point of the
+# partition you'll be using to build the cd.
 export MP := /mnt/lfs-utf8
 
-
 # Timezone, obviously ;)
-#==============================================================================
 export timezone := GMT
 
-
 # Page size for groff
-#==============================================================================
 export pagesize := letter
 
-
-# Top-level of these Makefiles. Edit this if you've named this directory
-# differently. (The beginning '/' is necessary - this is *not* an absolute file
-# path.)
-#==============================================================================
+# Top-level of these Makefiles. Edit this if you've named
+# this directory differently.
+# (The beginning / is necessary - leave it in place - this is *not*
+# an absolute file path.)
 export ROOT := /lfs-livecd
 
-
-# Parallel Build Level
-#==============================================================================
-export PM := -j3
-
-
-# Default http server for the lfs-base packages
-#==============================================================================
+# Http server for the lfs-base packages
 export HTTP := http://ftp.lfs-matrix.net/pub/lfs/lfs-packages/conglomeration
 
-# Version and Directory variables
-#==============================================================================
+# Don't edit these!
 export VERSION=x86-6.x-utf8
-export KVERS= 2.6.11.12
 export HOSTNAME := lfslivecd
 export WD := /tools
 export SRC := /sources
-export LFSSRC := /lfs-sources
 export PKG := packages
 export MKTREE := $(MP)$(ROOT)
 export REDHAT := $(ROOT)/$(PKG)/redhat-patches/devel
-
-# Environment Variables
-# The following lines need to be all on one line - no newlines.
-#===============================================================================
+export CFLAGS := -Os -s -march=i486
+export CXXFLAGS := -Os -s -march=i486
+export CHOST := i486-pc-linux-gnu
 export lfsenv := exec env -i HOME=$$HOME CFLAGS='$(CFLAGS)' CXXFLAGS='$(CXXFLAGS)' LFS=$(MP) LC_ALL=POSIX PATH=$(WD)/bin:/bin:/usr/bin /bin/bash -c
 
 export lfsbash := set +h && umask 022 && cd $(MKTREE)
 
-export chenv-pre-bash := $(WD)/bin/env -i HOME=/root CFLAGS='$(CFLAGS)' CXXFLAGS='$(CXXFLAGS)' TERM=$(TERM) PS1='\u:\w\$$ ' PATH=/bin:/usr/bin:/sbin:/usr/sbin:$(WD)/bin $(WD)/bin/bash -c
+export chenv1 := $(WD)/bin/env -i HOME=/root CFLAGS='$(CFLAGS)' CXXFLAGS='$(CXXFLAGS)' TERM=$(TERM) PS1='\u:\w\$$ ' PATH=/bin:/usr/bin:/sbin:/usr/sbin:$(WD)/bin $(WD)/bin/bash -c
 
-export chenv-post-bash := $(WD)/bin/env -i HOME=/root CFLGAS='$(CFLAGS)' CXXFLAGS='$(CXXFLAGS)' TERM=$(TERM) PS1='\u:\w\$$ ' PATH=/bin:/usr/bin:/sbin:/usr/sbin:$(WD)/bin /bin/bash -c
+export chenv2 := $(WD)/bin/env -i HOME=/root CFLGAS='$(CFLAGS)' CXXFLAGS='$(CXXFLAGS)' TERM=$(TERM) PS1='\u:\w\$$ ' PATH=/bin:/usr/bin:/sbin:/usr/sbin:$(WD)/bin /bin/bash -c
 
-export chenv-blfs := /usr/bin/env -i HOME=/root CFLAGS='$(CFLAGS)' TERM=$(TERM) PS1='\u:\w\$$ ' PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin INPUTRC=/etc/inputrc XML_CATALOG_FILES="/usr/share/xml/docbook/xsl-stylesheets-1.68.1/catalog.xml /etc/xml/catalog" PKG_CONFIG_PATH=/usr/X11R6/lib/pkgconfig /bin/bash -c
+export chenv3 := /usr/bin/env -i HOME=/root CFLAGS='$(CFLAGS)' TERM=$(TERM) PS1='\u:\w\$$ ' PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin INPUTRC=/etc/inputrc XML_CATALOG_FILES="/usr/share/xml/docbook/xsl-stylesheets-1.68.1/catalog.xml /etc/xml/catalog" PKG_CONFIG_PATH=/usr/X11R6/lib/pkgconfig /bin/bash -c
 
-# More Environment Variables
-#==============================================================================
-export CFLAGS := -Os -s -march=i486
-export CXXFLAGS := -Os -s -march=i486
-export CHOST := i486-pc-linux-gnu
-export chbash-pre-bash := SHELL=$(WD)/bin/bash
-export chbash-post-bash := SHELL=/bin/bash
+export chenvstrip := $(WD)/bin/env -i HOME=/root TERM=$(TERM) PS1='\u:\w\$$ ' PATH=/bin:/usr/bin:/sbin:/usr/sbin $(WD)/bin/bash -c
+
+export chbash1 := SHELL=$(WD)/bin/bash
+export chbash2 := SHELL=/bin/bash
 export WHICH= $(WD)/bin/which
 export WGET= wget --passive-ftp
 
-export BRW= ""
-export RED= ""
-export GREEN= ""
-export ORANGE= ""
-export BLUE= ""
-export WHITE= ""
+export KVERS= 2.6.11.12
 
 FTPGET= $(WD)/bin/ftpget
 WGET_V= 1.9.1
 
 # TARGETS
-#==============================================================================
-#
-# The build starts and ends here, first building the dependency targets,
-# lfs-base, extend-lfs and iso, then it echoes a notice that it's finished. :)
+#=======================================================================
 
-all: test-host lfs-base extend-lfs iso
-	@echo "The livecd, $(MKTREE)/lfslivecd-$(VERSION).iso, is ready!"
 
-test-host:
-	@if [ `whoami` != "root" ] ; then \
-	 echo "You must be logged in as root." && exit 1 ; fi
-	@if [ `uname -r` != "$(KVERS)" ] ; then \
-	 echo "Please update your host kernel to version $(KVERS)." \
-         && exit 1 ; fi
+# The make build starts and ends here, first building the dependency targets,
+# lfs-base, extend-lfs and iso, then it echos a notice that it's finished. :)
 
+all: lfs-base extend-lfs iso
+	@echo "The livecd, $(MKTREE)/lfslivecd-$(VERSION).iso, is ready!"
 
 # This target builds just a base LFS system, minus the kernel and bootscripts
-#==============================================================================
-lfs-base: lfsuser
-	@if [ ! -d $(MP)$(WD)/bin ] ; then mkdir -p $(MP)$(WD)/bin ; fi
+
+lfs-base:
+	@if [ `whoami` != "root" ] ; then echo "You must be logged in as root." \
+	 && exit 1 ; fi
+	@echo "==============================================================="
+	@echo " Before you begin building the LiveCD image, please ensure "
+	@echo " that the following is true: "
+	@echo ""
+	@echo " 1) Your running kernel is the same version as the target "
+	@echo "    kernel for the cd."
+	@echo ""
+	@echo " 2) You have an active internet connection."
+	@echo "==============================================================="
+	@echo ""
+	@echo -n -e "Countdown to commence building:"
+	@for i in 10 9 8 7 6 5 4 3 2 1 ; do echo -n -e " $$i" && sleep 1 ; done
+	@echo ""
+	@-mkdir -p $(MP)$(WD)/bin; ln -nsf $(MP)$(WD) /
 	@if [ ! -d $(MP)$(SRC) ] ; then mkdir $(MP)$(SRC) ; fi
-	@if [ ! -d $(MP)$(LFSSRC) ] ; then mkdir $(MP)$(LFSSRC) ; fi
-	@-ln -nsf $(MP)$(WD) /
 	@-ln -nsf $(MP)$(SRC) /
 	@-ln -nsf $(MP)$(ROOT) /
-	@-ln -nsf $(MP)$(LFSSRC) /
-	@-make unamemod
-	@-chown -R lfs $(WD) $(MP)$(WD) $(WD)/bin \
-	 $(LFSSRC) $(MP)$(LFSSRC) $(SRC) $(MP)$(SRC) $(MKTREE)
+	@make lfsuser
+	@-chown -R lfs $(WD) $(MP)$(WD) $(WD)/bin $(SRC) $(MP)$(SRC) $(MKTREE)
+	@echo ""
+	@echo "=========================="
+	@echo " Building LFS Base System"
+	@echo "=========================="
+	@echo ""
+	@make unamemod
 	@cp $(ROOT)/scripts/unpack $(WD)/bin
 	@su - lfs -c "$(lfsenv) '$(lfsbash) && $(MAKE) tools'"
-	@if [ ! -f $(PKG)/wget/.pass2 ] ; then \
-	 make lfs-rm-wget && make lfs-wget ; fi
+	@if [ ! -f $(PKG)/wget/.pass2 ] ; then make lfs-rm-wget && make lfs-wget ; fi
 	@touch $(PKG)/wget/.pass2
 	@make prep-chroot
 	@-mkdir $(MP)/bin
-	@if [ ! -f $(MP)/bin/bash ] ; then if [ ! -d $(MP) ] ; then \
-	 mkdir $(MP)/bin ; fi ; ln -s ${WD}/bin/bash ${MP}/bin/bash ; fi
-	@chroot "$(MP)" $(chenv-pre-bash) 'set +h && \
-	 chown -R 0:0 $(WD) $(SRC) $(ROOT) && \
-	 cd $(ROOT) && make pre-bash $(chbash-pre-bash)'
-	@chroot "$(MP)" $(chenv-post-bash) 'set +h && cd $(ROOT) && \
-	 make post-bash $(chbash-post-bash)'
-	@touch $@
+	@if [ ! -f $(MP)/bin/bash ] ; then if [ ! -d $(MP) ] ; then mkdir $(MP)/bin ; fi ; ln -s ${WD}/bin/bash ${MP}/bin/bash ; fi
+	@chroot "$(MP)" $(chenv1) 'set +h && chown -R 0:0 $(WD) $(SRC) $(ROOT) && cd $(ROOT) && make pre-bash $(chbash1)'
+	@chroot "$(MP)" $(chenv2) 'set +h && cd $(ROOT) && make post-bash $(chbash2)'
 
 stop-here:
 	@echo Alexander E. Patrakov has not updated instructions beyond this point.
@@ -145,16 +120,15 @@
 extend-lfs:
 	@cp $(WD)/bin/which $(MP)/usr/bin
 	@cp $(ROOT)/scripts/unpack $(MP)/bin
-	@chroot "$(MP)" $(chenv-blfs) 'set +h && cd $(ROOT) && \
-	 make blfs $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'set +h && cd $(ROOT) && make blfs $(chbash2)'
+	#@chroot "$(MP)" $(chenvstrip) 'set +h && cd $(ROOT) && make ch-strip'
 	@make unloadmodule
 	@make unmount
-	@touch $@
 
 lfsuser:
 	@-groupadd lfs
 	@-useradd -s /bin/bash -g lfs -m -k /dev/null lfs
-	@touch $@
+	@touch lfsuser
 
 pre-which:
 	@echo "#!/bin/sh" > $(WHICH)
@@ -162,24 +136,29 @@
 	@chmod 755 $(WHICH)
 
 pre-wget: 
-	@if [ ! -f $(WD)/bin/ftpget ] ; then \
-	 install -m755 $(ROOT)/scripts/ftpget $(WD)/bin/ ; fi
+	@if [ ! -f /tools/bin/ftpget ] ; then echo "#!/bin/sh" > $(FTPGET) && \
+					      echo "ftp -n << END" >> $(FTPGET) && \
+					      echo "open ftp.gnu.org" >> $(FTPGET) && \
+					      echo "user anonymous" >> $(FTPGET) && \
+				 	      echo "passive" >> $(FTPGET) && \
+					      echo "binary" >> $(FTPGET) && \
+					      echo "cd gnu/wget" >> $(FTPGET) && \
+					      echo "get wget-$(WGET_V).tar.gz" >> $(FTPGET) && \
+					      echo "bye" >> $(FTPGET) && \
+					      echo "END" >> $(FTPGET) && \
+					      chmod 755 $(FTPGET) ; fi
 	@$(MAKE) -C $(PKG)/wget prebuild
 
 unamemod:
 	@if [ ! -d ${WD}/bin ] ; then mkdir ${WD}/bin ; fi
 	@install -m 755 uname/uname ${WD}/bin/
-	@touch $@
+	@touch unamemod
 
-tools:  pre-which pre-wget lfs-binutils-pass1-scpt lfs-gcc-pass1-scpt \
-	lfs-linux-libc-headers-scpt lfs-glibc-scpt lfs-adjust-toolchain-scpt \
-	lfs-tcl-scpt lfs-expect-scpt lfs-dejagnu-scpt lfs-gcc-pass2-scpt \
-	lfs-binutils-pass2-scpt lfs-gawk-scpt lfs-coreutils-scpt \
-	lfs-bzip2-scpt lfs-gzip-scpt lfs-diffutils-scpt lfs-findutils-scpt \
-	lfs-make-scpt lfs-grep-scpt lfs-sed-scpt lfs-gettext-scpt \
-	lfs-ncurses-scpt lfs-patch-scpt lfs-tar-scpt lfs-texinfo-scpt \
-	lfs-bash-scpt lfs-m4-scpt lfs-bison-scpt lfs-flex-scpt \
-	lfs-util-linux-scpt lfs-perl-scpt lfs-strip-scpt
+tools:  pre-which pre-wget lfs-binutils-pass1-scpt lfs-gcc-pass1-scpt lfs-linux-libc-headers-scpt lfs-glibc-scpt \
+	lfs-adjust-toolchain-scpt lfs-tcl-scpt lfs-expect-scpt lfs-dejagnu-scpt lfs-gcc-pass2-scpt lfs-binutils-pass2-scpt \
+	lfs-gawk-scpt lfs-coreutils-scpt lfs-bzip2-scpt lfs-gzip-scpt lfs-diffutils-scpt lfs-findutils-scpt lfs-make-scpt \
+	lfs-grep-scpt lfs-sed-scpt lfs-gettext-scpt lfs-ncurses-scpt lfs-patch-scpt lfs-tar-scpt lfs-texinfo-scpt \
+	lfs-bash-scpt lfs-m4-scpt lfs-bison-scpt lfs-flex-scpt lfs-util-linux-scpt lfs-perl-scpt lfs-strip-scpt
 	@cp /etc/resolv.conf $(WD)/etc
 
 prep-chroot:
@@ -189,35 +168,25 @@
 	@-mount -f -t ramfs ramfs $(MP)/dev
 	@-mount -f -t tmpfs tmpfs $(MP)/dev/shm
 	@-mount -f -t devpts -o gid=4,mode=620 devpts $(MP)/dev/pts
-	@touch $@
 
-pre-bash: createdirs createfiles popdev ch-linux-libc-headers ch-man-pages \
-	ch-glibc ch-re-adjust-toolchain ch-binutils ch-gcc ch-redhat-patches \
-	ch-coreutils ch-zlib ch-mktemp ch-iana-etc ch-findutils ch-gawk \
-	ch-sharutils ch-gpm ch-ncurses ch-readline ch-m4 ch-bison ch-less \
-	ch-groff ch-sed ch-flex ch-gettext ch-inetutils ch-iproute2 ch-perl \
-	ch-texinfo ch-autoconf ch-automake ch-bash
+pre-bash: createdirs createfiles popdev ch-linux-libc-headers ch-man-pages ch-glibc ch-re-adjust-toolchain \
+	ch-binutils ch-gcc ch-redhat-patches ch-coreutils ch-zlib ch-mktemp ch-iana-etc ch-findutils ch-gawk ch-sharutils ch-gpm ch-ncurses \
+	ch-readline ch-m4 ch-bison ch-less ch-groff ch-sed ch-flex ch-gettext ch-inetutils \
+	ch-iproute2 ch-perl ch-texinfo ch-autoconf ch-automake ch-bash
 
-post-bash: ch-file ch-libtool ch-bzip2 ch-diffutils ch-kbd ch-e2fsprogs \
-	ch-grep ch-grub ch-gzip ch-hotplug ch-man ch-make \
-	ch-module-init-tools ch-patch ch-procps ch-psmisc ch-shadow \
+post-bash: ch-file ch-libtool ch-bzip2 ch-diffutils ch-kbd ch-e2fsprogs ch-grep ch-grub ch-gzip \
+	ch-hotplug ch-man ch-make ch-module-init-tools ch-patch ch-procps ch-psmisc ch-shadow \
 	ch-sysklogd ch-sysvinit ch-tar ch-udev ch-util-linux ch-environment
 
-blfs: ch-openssl ch-wget ch-reiserfsprogs ch-xfsprogs ch-nano ch-joe \
-	ch-screen ch-curl ch-zip ch-unzip ch-lynx ch-libxml2 ch-expat \
-	ch-subversion stop-here ch-lfs-bootscripts ch-docbook-xml ch-libxslt \
-	ch-docbook-xsl ch-html_tidy ch-LFS-BOOK ch-libpng ch-freetype \
-	ch-fontconfig ch-Xorg ch-freefont ch-inputattach ch-fonts-dejavu \
-	ch-update-fontsdir ch-libjpeg ch-libtiff ch-links ch-openssh \
-	ch-pkgconfig ch-glib2 ch-libungif ch-imlib2 ch-pango ch-atk ch-gtk2 \
-	ch-cvs ch-popt ch-samba ch-libIDL ch-firefox ch-thunderbird \
-	ch-startup-notification ch-gvim ch-xfce ch-lua ch-ion ch-irssi \
-	ch-xchat ch-tcpwrappers ch-portmap ch-nfs-utils ch-traceroute \
-	ch-dialog ch-ncftp ch-pciutils ch-nALFS ch-device-mapper ch-LVM2 \
-	ch-dhcpcd ch-distcc ch-ppp ch-rp-pppoe ch-libaal ch-reiser4progs \
-	ch-squashfs ch-cpio ch-mutt ch-msmtp ch-slrn ch-raidtools ch-eject \
-	ch-linux ch-klibc ch-unionfs ch-initramfs ch-cdrtools \
-	ch-blfs-bootscripts ch-syslinux ch-nALFS-profile
+blfs: ch-openssl ch-wget ch-reiserfsprogs ch-xfsprogs ch-nano ch-joe ch-screen ch-curl ch-zip \
+	ch-unzip ch-lynx ch-libxml2 ch-expat ch-subversion stop-here ch-lfs-bootscripts ch-docbook-xml ch-libxslt \
+	ch-docbook-xsl ch-html_tidy ch-LFS-BOOK ch-libpng ch-freetype ch-fontconfig ch-Xorg ch-freefont ch-inputattach \
+	ch-fonts-dejavu ch-update-fontsdir ch-libjpeg ch-libtiff ch-links ch-openssh ch-pkgconfig ch-glib2 \
+	ch-libungif ch-imlib2 ch-pango ch-atk ch-gtk2 ch-cvs ch-popt ch-samba ch-libIDL ch-firefox ch-thunderbird \
+	ch-startup-notification ch-gvim ch-xfce ch-lua ch-ion ch-irssi ch-xchat ch-tcpwrappers ch-portmap \
+	ch-nfs-utils ch-traceroute ch-dialog ch-ncftp ch-pciutils ch-nALFS ch-device-mapper ch-LVM2 ch-dhcpcd \
+	ch-distcc ch-ppp ch-rp-pppoe ch-libaal ch-reiser4progs ch-squashfs ch-cpio ch-mutt ch-msmtp ch-slrn \
+	ch-raidtools ch-eject ch-linux ch-klibc ch-unionfs ch-initramfs ch-cdrtools ch-blfs-bootscripts ch-syslinux
 
 # Rules for building tools/stage1
 # These can be called individually, if necessary
@@ -372,8 +341,7 @@
 popdev:
 	@if [ ! -c /dev/console ] ; then mknod -m 600 /dev/console c 5 1 && \
 	 mknod -m 666 /dev/null c 1 3 ; fi
-	@if ! tail -n 3 /proc/mounts | grep -q "dev ramfs" ; then \
-	 mount -n -t ramfs none /dev && \
+	@if ! tail -n 3 /proc/mounts | grep -q "dev ramfs" ; then mount -n -t ramfs none /dev && \
 	 mknod -m 662 /dev/console c 5 1 && \
 	 mknod -m 666 /dev/null c 1 3 && \
 	 mknod -m 666 /dev/zero c 1 5 && \
@@ -1462,11 +1430,11 @@
 	make -C $(PKG)/unionfs stage2
 
 ch-strip: popdev
-	@$(WD)/bin/find /{,usr/}{bin,lib,sbin} -type f \
-	 -exec $(WD)/bin/strip --strip-debug '{}' ';'
+	@$(WD)/bin/find /{,usr/}{bin,lib,sbin} -type f -exec $(WD)/bin/strip --strip-debug '{}' ';'
 
-# Targets to create the iso
-#==============================================================================
+##################################
+# Rules to create the iso
+#----------------------------------
 
 prepiso: unmount
 	@-rm $(MP)/etc/rc.d/rc{2,3,5}.d/{K,S}21xprint
@@ -1528,4 +1496,10 @@
 	@-umount $(MP)/dev
 	@-umount $(MP)/proc
 	@-umount $(MP)/sys
-	@rm -f $(ROOT)/prep-chroot
+
+.PHONY: lfs-base pre-which pre-wget tools prep-chroot chroot createdirs createfiles popdev \
+	clean scrub unloadmodule unmount lfs-wget lfs-rm-wget lfs-binutils-pass1 lfs-gcc-pass1 \
+	lfs-linux-libc-headers lfs-glibc lfs-adjust-toolchain lfs-tcl lfs-expect lfs-dejagnu lfs-gcc-pass2 \
+	lfs-binutils-pass2 lfs-gawk lfs-coreutils lfs-bzip2 lfs-gzip lfs-diffutils lfs-findutils lfs-make \
+	lfs-grep lfs-gettext lfs-ncurses lfs-patch lfs-tar lfs-texinfo lfs-bash lfs-m4 lfs-bison lfs-flex \
+	lfs-util-linux lfs-perl

Modified: x86/branches/utf8/initramfs/Makefile
===================================================================
--- x86/branches/utf8/initramfs/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/initramfs/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -38,7 +38,7 @@
 	rm -rf temp
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-initramfs $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-initramfs $(chbash2)'
 
 clean:
 	-rm -rf temp

Modified: x86/branches/utf8/packages/LFS-BOOK/Makefile
===================================================================
--- x86/branches/utf8/packages/LFS-BOOK/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/LFS-BOOK/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -13,7 +13,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/LVM2/Makefile
===================================================================
--- x86/branches/utf8/packages/LVM2/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/LVM2/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/Xorg/Makefile
===================================================================
--- x86/branches/utf8/packages/Xorg/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/Xorg/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -16,7 +16,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/atk/Makefile
===================================================================
--- x86/branches/utf8/packages/atk/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/atk/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/autoconf/Makefile
===================================================================
--- x86/branches/utf8/packages/autoconf/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/autoconf/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -13,7 +13,7 @@
 .PHONY:  clean stage2 chroot
 
 chroot:
-	@chroot "$(MP)" $(chenv-pre-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-pre-bash)'
+	@chroot "$(MP)" $(chenv1) 'cd $(ROOT) && make ch-$(NM) $(chbash1)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/automake/Makefile
===================================================================
--- x86/branches/utf8/packages/automake/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/automake/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -13,7 +13,7 @@
 .PHONY:  clean stage2 chroot
 
 chroot:
-	@chroot "$(MP)" $(chenv-pre-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-pre-bash)'
+	@chroot "$(MP)" $(chenv1) 'cd $(ROOT) && make ch-$(NM) $(chbash1)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/bash/Makefile
===================================================================
--- x86/branches/utf8/packages/bash/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/bash/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -38,7 +38,7 @@
 	@make clean
 
 chroot:
-	@chroot "$(MP)" $(chenv-pre-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-pre-bash)'
+	@chroot "$(MP)" $(chenv1) 'cd $(ROOT) && make ch-$(NM) $(chbash1)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/binutils/Makefile
===================================================================
--- x86/branches/utf8/packages/binutils/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/binutils/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -1,170 +1,81 @@
 # Binutils Makefile
-#==============================================================================
 
+# Package versions
 NM= binutils
-VRS= 2.16.1
+VRS= 2.15.94.0.2.2
 DIR= $(NM)-$(VRS)
 FILE= $(DIR).tar.bz2
 URL= $(HTTP)/$(NM)/$(FILE)
-SHA= 5c80fd5657da47efc16a63fdd93ef7395319fbbf
 
-# Targets
-# =============================================================================
+# RULES
 
-include $(ROOT)/scripts/functions
+.PHONY: pass1 pass2 chroot-re-adjust-toolchain clean chroot stage2
 
-$(FILE):
-	@$(call download,$(FILE),$(URL),$(SHA))
+pass1:
+	@echo ""
+	@echo "=====> Building $(NM) Pass 1"
+	@echo ""
+	@if [ ! -f $(SRC)/$(FILE) ] ; then $(WGET) $(URL) && \
+	 mv $(FILE) $(SRC) ; fi
+	@if [ ! -f $(WD)/bin/ld ] ; then unpack $(SRC)/$(FILE) && cd $(DIR) && \
+	 mkdir ../$(NM)-build && cd ../$(NM)-build && \
+	 ../$(DIR)/configure --prefix=$(WD) --disable-nls && make && \
+	make install && \
+	make -C ld clean && \
+	make -j3 -C ld LDFLAGS="-all-static" LIB_PATH=/tools/lib ; fi
 
-pass1: Makefile $(FILE)
-	@unpack $(FILE)
-	@make -C $(DIR) -f ../Makefile compile-$@
-	@cp $(SRC)/$(FILE) $(LFSSRC)
-	@touch $@
-
-compile-pass1:
-	@$(call echo_message, Configuring)
-#==============================================================================
-# Configure commands below \/
-#==============================================================================
-	@$(sep_dir)
-	@../$(DIR)/configure --prefix=$(WD) --disable-nls >../$(DIR)-$@.log \
-	2>&1
-#
-#==Status Messages==========================================
-#
-	@$(OK)
-	@$(call echo_message, Making)
-#==============================================================================
-# Make commands below \/
-#==============================================================================
-	@make $(PM) >>../$(DIR)-$@.log 2>&1
-#
-#==Status Messages==========================================
-#
-	@$(OK)
-	@$(call echo_message, Installing)
-#==============================================================================
-# Install commands below \/
-#==============================================================================
-	@make install >>../$(DIR)-$@.log 2>&1
-	@make -C ld clean >>../$(DIR)-$@.log 2>&1
-	@make -C ld LIB_PATH=$(WD)/lib >>../$(DIR)-$@.log 2&>1
-#
-#==Status Messages==========================================
-#
-	@$(OK)
-
 adjust-toolchain:
-	@echo 'main(){}' > dummy.c && cc dummy.c && \
-	 readelf -l a.out > .specstest
+	@echo 'main(){}' > dummy.c && cc dummy.c && readelf -l a.out > .specstest
 	@if ! cat .specstest | grep -q $(WD) ; then cd $(NM)-build && \
 	 make -C ld install && SPECFILE=`gcc --print-file specs` && \
-         sed 's@ /lib/ld-linux.so.2@ $(WD)/lib/ld-linux.so.2 at g' \
-	 $$SPECFILE > tempspecfile && \
-         mv -f tempspecfile $$SPECFILE && unset SPECFILE && \
-         rm -f $(WD)/lib/gcc/*/*/include/{pthread.h,bits/sigthread.h} && \
-	 cd .. && make clean ; fi
-	@touch $@
+	 sed 's@ /lib/ld-linux.so.2@ $(WD)/lib/ld-linux.so.2 at g' $$SPECFILE > tempspecfile && \
+	 mv -f tempspecfile $$SPECFILE && unset SPECFILE && \
+	 rm -f $(WD)/lib/gcc/*/*/include/{pthread.h,bits/sigthread.h} && cd .. && make clean ; fi
+	@touch adjust-toolchain
 
+pass2:
+	@echo ""
+	@echo "=====> Building $(NM) Pass 2"
+	@echo ""
+	@if [ ! -f $(SRC)/$(FILE) ] ; then $(WGET) $(URL) && \
+	 mv $(FILE) $(SRC) ; fi
+	@if [ ! -f .pass2 ] ; then unpack $(SRC)/$(FILE) && cd $(DIR) && \
+	 mkdir ../$(NM)-build && cd ../$(NM)-build && \
+	 ../$(DIR)/configure --prefix=$(WD) --disable-nls \
+	 --enable-shared --with-lib-path=$(WD)/lib && \
+	 make -j3 && \
+	 make install && \
+	 make -C ld clean && make -C ld LIB_PATH=/usr/lib:/lib ; fi
+	@touch .pass2
 
-pass2: Makefile $(FILE)
-	@unpack $(FILE)
-	@make -C $(DIR) -f ../Makefile compile-$@
-	@touch $@
-
-
-compile-pass2:
-	@$(call echo_message, Configuring)
-#==============================================================================
-# Configure commands below \/
-#==============================================================================
-	@$(sep_dir)
-	@../$(DIR)/configure --prefix=$(WD) --disable-nls \
-	 --enable-shared --with-lib-path=$(WD)/lib >../$(DIR)-$@.log 2>&1
-#
-#==Status Messages==========================================
-#
-	@$(OK)
-	@$(call echo_message, Making)
-#==============================================================================
-# Make commands below \/
-#==============================================================================
-	@make $(PM) >>../$(DIR)-$@.log 2>&1
-#
-#==Status Messages===========================================
-#
-	@$(OK)
-	@$(call echo_message, Installing)
-#==============================================================================
-# Install commands below \/
-#==============================================================================
-	@make install >>../$(DIR)-$@.log 2>&1
-	@make -C ld clean >>../$(DIR)-$@.log 2>&1
-	@make -C ld LIB_PATH=/usr/lib:/lib >>../$(DIR)-$@.log 2>&1
-
-#
-#==Status Messages===========================================
-#
-	@$(OK)
-
 chroot-re-adjust-toolchain:
-	@chroot "$(MP)" $(chenv-pre-bash) \
-	'cd $(ROOT) && make ch-re-adjust-toolchain $(chbash-pre-bash)'
+	@chroot "$(MP)" $(chenv1) 'cd $(ROOT) && make ch-re-adjust-toolchain $(chbash1)'
 
 re-adjust-toolchain:
-	@echo 'main(){}' > dummy.c && cc dummy.c && \
-	 readelf -l a.out > .specstest
-	@if cat .specstest | grep -q $(WD) ; then cd $(NM)-build && \
-	 make -C ld INSTALL=$(WD)/bin/install install && \
-         perl -pi -e 's@ $(WD)/lib/ld-linux.so.2@ /lib/ld-linux.so.2 at g;' \
-	 -e 's@\*startfile_prefix_spec:\n@$$_/usr/lib/@g;' \
-	 `gcc --print-file specs` ; fi
+	@echo 'main(){}' > dummy.c && cc dummy.c && readelf -l a.out > .specstest
+	@if cat .specstest | grep -q $(WD) ; then cd $(NM)-build && make -C ld INSTALL=$(WD)/bin/install install && \
+	 perl -pi -e 's@ $(WD)/lib/ld-linux.so.2@ /lib/ld-linux.so.2 at g;' -e 's@\*startfile_prefix_spec:\n@$$_/usr/lib/@g;' `gcc --print-file specs` ; fi
+	@touch re-adjust-toolchain
 	@make clean
-	@touch $@
 
 chroot:
-	@chroot "$(MP)" $(chenv-pre-bash) \
-	'cd $(ROOT) && make ch-$(NM) $(chbash-pre-bash)'
+	@chroot "$(MP)" $(chenv1) 'cd $(ROOT) && make ch-binutils $(chbash1)'
 
-stage2: Makefile $(FILE)
-	$(std_build)
+stage2:
+	@echo ""
+	@echo "=====> Building $(NM) in chroot"
+	@echo ""
+	@if [ ! -f $(SRC)/$(FILE) ] ; then $(WGET) $(URL) && \
+	 mv $(FILE) $(SRC) ; fi
+	@if [ ! -f /usr/bin/ld ] ; then unpack $(SRC)/$(FILE) && cd $(DIR) && \
+	 mkdir ../$(NM)-build && cd ../$(NM)-build && \
+	 ../$(DIR)/configure --prefix=/usr --enable-shared && \
+	 make -j3 tooldir=/usr && \
+	 make tooldir=/usr install && \
+	 cp ../$(DIR)/include/libiberty.h /usr/include ; fi
+	@make clean
 
-compile-stage2:
-	$(call echo_message, Configuring)
-#==============================================================================
-# Configure commands below \/
-#==============================================================================
-	@$(sep_dir)
-	@../$(DIR)/configure --prefix=/usr --enable-shared >../$(DIR)-$@.log \
-	 2>&1
-#
-#==Status Messages==========================================
-#
-	@$(OK)
-	@$(call echo_message, Making)
-#==============================================================================
-# Make commands below \/
-#==============================================================================
-	@make $(PM) tooldir=/usr >>../$(DIR)-$@.log 2>&1
-#
-#==Status Messages===========================================
-#
-	@$(OK)
-	@$(call echo_message, Installing)
-#==============================================================================
-# Install commands below \/
-#==============================================================================
-	@make tooldir=/usr install >>../$(DIR)-$@.log 2>&1
-	@cp ../$(DIR)/include/libiberty.h /usr/include
-
-#
-#==Status Messages===========================================
-#
-	@$(OK)
-
-	
 clean:
 	@-rm -rf $(DIR)
-
-.PHONY: compile-pass1 clean chroot compile-pass2 compile-stage2
+	@-rm -rf $(NM)-build
+	@-rm -rf dummy.c a.out .specstest

Modified: x86/branches/utf8/packages/bison/Makefile
===================================================================
--- x86/branches/utf8/packages/bison/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/bison/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -22,7 +22,7 @@
 	@make clean
 
 chroot:
-	@chroot "$(MP)" $(chenv-pre-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-pre-bash)'
+	@chroot "$(MP)" $(chenv1) 'cd $(ROOT) && make ch-$(NM) $(chbash1)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/blfs-bootscripts/Makefile
===================================================================
--- x86/branches/utf8/packages/blfs-bootscripts/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/blfs-bootscripts/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -13,7 +13,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/bzip2/Makefile
===================================================================
--- x86/branches/utf8/packages/bzip2/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/bzip2/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -22,7 +22,7 @@
 	@make clean
 
 chroot:
-	@chroot "$(MP)" $(chenv-post-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv2) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/cdrtools/Makefile
===================================================================
--- x86/branches/utf8/packages/cdrtools/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/cdrtools/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/coreutils/Makefile
===================================================================
--- x86/branches/utf8/packages/coreutils/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/coreutils/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -91,7 +91,7 @@
 	@make clean
 
 chroot:
-	@chroot "$(MP)" $(chenv-pre-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-pre-bash)'
+	@chroot "$(MP)" $(chenv1) 'cd $(ROOT) && make ch-$(NM) $(chbash1)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/cpio/Makefile
===================================================================
--- x86/branches/utf8/packages/cpio/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/cpio/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/curl/Makefile
===================================================================
--- x86/branches/utf8/packages/curl/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/curl/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/cvs/Makefile
===================================================================
--- x86/branches/utf8/packages/cvs/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/cvs/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -14,7 +14,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/device-mapper/Makefile
===================================================================
--- x86/branches/utf8/packages/device-mapper/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/device-mapper/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/dhcpcd/Makefile
===================================================================
--- x86/branches/utf8/packages/dhcpcd/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/dhcpcd/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -14,7 +14,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/dialog/Makefile
===================================================================
--- x86/branches/utf8/packages/dialog/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/dialog/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/diffutils/Makefile
===================================================================
--- x86/branches/utf8/packages/diffutils/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/diffutils/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -27,7 +27,7 @@
 	@make clean
 
 chroot:
-	@chroot "$(MP)" $(chenv-post-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv2) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/distcc/Makefile
===================================================================
--- x86/branches/utf8/packages/distcc/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/distcc/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean stage2 chroot
 
 chroot:
-	@chroot "$(MP)" $(chenv-pre-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-pre-bash)'
+	@chroot "$(MP)" $(chenv1) 'cd $(ROOT) && make ch-$(NM) $(chbash1)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/docbook-xml/Makefile
===================================================================
--- x86/branches/utf8/packages/docbook-xml/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/docbook-xml/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -14,7 +14,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/docbook-xsl/Makefile
===================================================================
--- x86/branches/utf8/packages/docbook-xsl/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/docbook-xsl/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -14,7 +14,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/e2fsprogs/Makefile
===================================================================
--- x86/branches/utf8/packages/e2fsprogs/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/e2fsprogs/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -13,7 +13,7 @@
 .PHONY:  clean stage2 chroot
 
 chroot:
-	@chroot "$(MP)" $(chenv-post-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv2) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/eject/Makefile
===================================================================
--- x86/branches/utf8/packages/eject/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/eject/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: stage1 clean stage2 chroot
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/expat/Makefile
===================================================================
--- x86/branches/utf8/packages/expat/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/expat/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -14,7 +14,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/file/Makefile
===================================================================
--- x86/branches/utf8/packages/file/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/file/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY:  clean stage2 chroot
 
 chroot:
-	@chroot "$(MP)" $(chenv-post-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv2) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/findutils/Makefile
===================================================================
--- x86/branches/utf8/packages/findutils/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/findutils/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -22,7 +22,7 @@
 	@make clean
 
 chroot:
-	@chroot "$(MP)" $(chenv-pre-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-pre-bash)'
+	@chroot "$(MP)" $(chenv1) 'cd $(ROOT) && make ch-$(NM) $(chbash1)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/firefox/Makefile
===================================================================
--- x86/branches/utf8/packages/firefox/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/firefox/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/flex/Makefile
===================================================================
--- x86/branches/utf8/packages/flex/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/flex/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -27,7 +27,7 @@
 	@make clean
 
 chroot:
-	@chroot "$(MP)" $(chenv-pre-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-pre-bash)'
+	@chroot "$(MP)" $(chenv1) 'cd $(ROOT) && make ch-$(NM) $(chbash1)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/fontconfig/Makefile
===================================================================
--- x86/branches/utf8/packages/fontconfig/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/fontconfig/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -13,7 +13,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/fonts-dejavu/Makefile
===================================================================
--- x86/branches/utf8/packages/fonts-dejavu/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/fonts-dejavu/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -13,7 +13,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-fonts-dejavu $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-fonts-dejavu $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/freefont/Makefile
===================================================================
--- x86/branches/utf8/packages/freefont/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/freefont/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -13,7 +13,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/freetype/Makefile
===================================================================
--- x86/branches/utf8/packages/freetype/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/freetype/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -14,7 +14,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/gawk/Makefile
===================================================================
--- x86/branches/utf8/packages/gawk/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/gawk/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -65,7 +65,7 @@
 	@make clean
 
 chroot:
-	@chroot "$(MP)" $(chenv-pre-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-pre-bash)'
+	@chroot "$(MP)" $(chenv1) 'cd $(ROOT) && make ch-$(NM) $(chbash1)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/gcc/Makefile
===================================================================
--- x86/branches/utf8/packages/gcc/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/gcc/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -1,166 +1,80 @@
-# Gcc Makefile
-#==============================================================================
+# GCC Makefile
 
+# Package versions
 NM= gcc
-VRS= 3.4.4
+VRS= 3.4.3
 DIR= $(NM)-$(VRS)
-
-FILE= $(DIR).tar.bz2
-SHA= dbe5935c04f799c77b49d6806f9d7db6d9b5cd35
-
-PATCH1= $(DIR)-no_fixincludes-1.patch
-SHA1= 2175d7dd8fa64038cc3e7db1ad57bb2cf0f8c693
-
-PATCH2= $(DIR)-specs-2.patch
-SHA2= 946226d5a463e85829b70c922e827c1ce6cd211c
-
-PATCH3= $(DIR)-linkonce-1.patch
-SHA3= 50de9e6d265d191ea0e6877c4152fd1cff78fb2c
-
+FILE= $(NM)-$(VRS).tar.bz2
+PATCH1= $(NM)-$(VRS)-no_fixincludes-1.patch
+PATCH2= $(NM)-$(VRS)-specs-2.patch
+PATCH3= $(NM)-$(VRS)-linkonce-1.patch
 URL= $(HTTP)/$(NM)/$(FILE)
-URL1= http://www.linuxfromscratch.org/patches/downloads/$(NM)/$(PATCH1)
-URL2= http://www.linuxfromscratch.org/patches/downloads/$(NM)/$(PATCH2)
-URL3= http://www.linuxfromscratch.org/patches/downloads/$(NM)/$(PATCH3)
+URL1= $(HTTP)/$(NM)/$(PATCH1)
+URL2= $(HTTP)/$(NM)/$(PATCH2)
+URL3= $(HTTP)/$(NM)/$(PATCH3)
 
-# Targets
-# =============================================================================
+# RULES
 
-include $(ROOT)/scripts/functions
+.PHONY: pass1 pass2 clean chroot stage2
 
-$(FILE):
-	@$(call download,$(FILE),$(URL),$(SHA))
+pass1:
+	@echo ""
+	@echo "=====> Building $(NM) Pass 1"
+	@echo ""
+	@if [ ! -f $(SRC)/$(FILE) ] ; then $(WGET) $(URL) && \
+	 mv $(FILE) $(SRC) ; fi
+	@if [ ! -f $(WD)/bin/$(NM) ] ; then unpack $(SRC)/$(FILE) && cd $(DIR) && \
+	 mkdir ../$(NM)-build && cd ../$(NM)-build && \
+	 ../$(DIR)/configure --prefix=$(WD) --libexecdir=$(WD)/lib --with-local-prefix=$(WD) \
+	 --disable-nls --enable-shared --enable-languages=c && \
+	 make -j3 bootstrap && \
+	 make install && ln -s gcc $(WD)/bin/cc ; fi
+	@make clean
 
-$(PATCH1):
-	@$(call download,$(PATCH1),$(URL1),$(SHA1))
+pass2:
+	@echo ""
+	@echo "=====> Building $(NM) Pass 2"
+	@echo ""
+	@if [ ! -f $(SRC)/$(FILE) ] ; then $(WGET) $(URL) && \
+	 mv $(FILE) $(SRC) ; fi
+	@if [ ! -f $(SRC)/$(PATCH1) ] ; then $(WGET) $(URL1) && \
+	 mv $(PATCH1) $(SRC) ; fi
+	@if [ ! -f $(SRC)/$(PATCH2) ] ; then $(WGET) $(URL2) && \
+	 mv $(PATCH2) $(SRC) ; fi
+	@if [ ! -f .pass2 ] ; then unpack $(SRC)/$(FILE) && cd $(DIR) && \
+	 patch -Np1 -i $(SRC)/$(PATCH1) && patch -Np1 -i $(SRC)/$(PATCH2) && \
+	 mkdir ../$(NM)-build && cd ../$(NM)-build && \
+	 ../$(DIR)/configure --prefix=$(WD) --libexecdir=$(WD)/lib --with-local-prefix=$(WD) --enable-clocale=gnu \
+	 --enable-shared --enable-threads=posix --enable-__cxa_atexit \
+	 --enable-languages=c,c++ --disable-libstdcxx-pch && \
+	 make -j3 && make install ; fi
+	@make clean
+	@touch .pass2
 
-$(PATCH2):
-	@$(call download,$(PATCH2),$(URL2),$(SHA2))
-
-$(PATCH3):
-	@$(call download,$(PATCH3),$(URL3),$(SHA3))
-
-pass1: Makefile $(FILE)
-	@$(std_build)
-	@cp $(SRC)/$(FILE) $(LFSSRC)/
-
-compile-pass1:
-	@$(call echo_message, Configuring)
-#==============================================================================
-# Configure commands below \/
-#==============================================================================
-	@$(sep_dir)
-	@../$(DIR)/configure --prefix=$(WD) --libexecdir=$(WD)/lib \
-	 --with-local-prefix=$(WD) --disable-nls --enable-shared \
-	 --enable-languages=c >../$(DIR)-$@.log 2>&1
-#
-#==Status Messages==========================================
-#
-	@$(OK)
-	@$(call echo_message, Making)
-#==============================================================================
-# Make commands below \/
-#==============================================================================
-	@make $(PM) bootstrap >>../$(DIR)-$@.log 2>&1
-#
-#==Status Messages==========================================
-#
-	@$(OK)
-	@$(call echo_message, Installing)
-#==============================================================================
-# Install commands below \/
-#==============================================================================
-	@make install >>../$(DIR)-$@.log 2>&1
-	ln -s gcc $(WD)/bin/cc
-#
-#==Status Messages==========================================
-#
-	@$(OK)
-
-pass2: Makefile $(FILE) $(PATCH1) $(PATCH2)
-	@$(std_build)
-
-compile-pass2:
-	@$(call echo_message, Configuring)
-#==============================================================================
-# Configure commands below \/
-#==============================================================================
-	@patch -Np1 -i ../$(PATCH1)
-	@patch -Np1 -i ../$(PATCH2)
-	@$(sep_dir)
-	@../$(DIR)/configure --prefix=$(WD) --libexecdir=$(WD)/lib \
-	 --with-local-prefix=$(WD) --enable-clocale=gnu --enable-shared \
-	 --enable-threads=posix --enabel-__cxa_atexit --enable-languages=c,c++ \
-	 --disable-libstdcxx-pch >../$(DIR)-$@.log 2>&1
-#
-#==Status Messages==========================================
-#
-	@$(OK)
-	@$(call echo_message, Making)
-#==============================================================================
-# Make commands below \/
-#==============================================================================
-	@make $(PM) >>../$(DIR)-$@.log 2>&1
-#
-#==Status Messages===========================================
-#
-	@$(OK)
-	@$(call echo_message, Installing)
-#==============================================================================
-# Install commands below \/
-#==============================================================================
-	@make install >>../$(DIR)-$@.log 2>&1
-
-#
-#==Status Messages===========================================
-#
-	@$(OK)
-
 chroot:
-	@chroot "$(MP)" $(chenv-pre-bash) \
-	'cd $(ROOT) && make ch-$(NM) $(chbash-pre-bash)'
+	@chroot "$(MP)" $(chenv1) 'cd $(ROOT) && make ch-gcc $(chbash1)'
 
-stage2: Makefile $(FILE) $(PATCH1) $(PATCH3)
-	$(std_build)
+stage2:
+	@echo ""
+	@echo "=====> Building $(NM) in chroot"
+	@echo ""
+	@if [ ! -f $(SRC)/$(FILE) ] ; then $(WGET) $(URL) && \
+	 mv $(FILE) $(SRC) ; fi
+	@if [ ! -f $(SRC)/$(PATCH1) ] ; then $(WGET) $(URL1) && \
+	 mv $(PATCH1) $(SRC) ; fi
+	@if [ ! -f $(SRC)/$(PATCH2) ] ; then $(WGET) $(URL2) && \
+	 mv $(PATCH2) $(SRC) ; fi
+	@if [ ! -f $(SRC)/$(PATCH3) ] ; then $(WGET) $(URL3) && \
+	 mv $(PATCH3) $(SRC) ; fi
+	@if [ ! -f /usr/bin/gcc ] ; then unpack $(SRC)/$(FILE) && cd $(DIR) && \
+	 patch -Np1 -i $(SRC)/$(PATCH1) && patch -Np1 -i $(SRC)/$(PATCH3) && \
+	 sed -i 's/install_to_$$(INSTALL_DEST) //' libiberty/Makefile.in && \
+	 mkdir ../$(NM)-build && cd ../$(NM)-build && \
+	 ../$(DIR)/configure --prefix=/usr --libexecdir=/usr/lib --enable-shared --enable-threads=posix \
+	 --enable-__cxa_atexit --enable-clocale=gnu --enable-languages=c,c++ && \
+	 make -j3 && make install && ln -s ../usr/bin/cpp /lib && ln -s gcc /usr/bin/cc ; fi
+	@make clean	
 
-compile-stage2:
-	$(call echo_message, Configuring)
-#==============================================================================
-# Configure commands below \/
-#==============================================================================
-	@patch -Np1 -i ../$(PATCH1)
-	@patch -Np1 -i ../$(PATCH3)
-	@sed -i 's/install_to_$$(INSTALL_DEST) //' libiberty/Makefile.in
-	@$(sep_dir)
-	@../$(DIR)/configure --prefix=/usr --libexecdir=/usr/lib \
-	 --enable-shared --enable-threads=posix --enable-__cxa_atexit \
-	 --enable-clocale=gnu --enable-languages=c,c++ >../$(DIR)-$@.log 2>&1
-#
-#==Status Messages==========================================
-#
-	@$(OK)
-	@$(call echo_message, Making)
-#==============================================================================
-# Make commands below \/
-#==============================================================================
-	@make $(PM) >>../$(DIR)-$@.log 2>&1
-#
-#==Status Messages===========================================
-#
-	@$(OK)
-	@$(call echo_message, Installing)
-#==============================================================================
-# Install commands below \/
-#==============================================================================
-	@make install >>../$(DIR)-$@.log 2>&1
-	@ln -s ../usr/bin/cpp /lib
-	@ln -s gcc /usr/bin/cc
-#
-#==Status Messages===========================================
-#
-	@$(OK)
-
-	
 clean:
 	@-rm -rf $(DIR)
-
-.PHONY: compile-pass1 clean chroot compile-pass2 compile-stage2
+	@-rm -rf $(NM)-build

Modified: x86/branches/utf8/packages/gettext/Makefile
===================================================================
--- x86/branches/utf8/packages/gettext/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/gettext/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -22,7 +22,7 @@
 	@make clean
 
 chroot:
-	@chroot "$(MP)" $(chenv-pre-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-pre-bash)'
+	@chroot "$(MP)" $(chenv1) 'cd $(ROOT) && make ch-$(NM) $(chbash1)'
 
 stage2:
 	echo ""

Modified: x86/branches/utf8/packages/glib2/Makefile
===================================================================
--- x86/branches/utf8/packages/glib2/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/glib2/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM)2 $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM)2 $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/glibc/Makefile
===================================================================
--- x86/branches/utf8/packages/glibc/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/glibc/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -33,7 +33,7 @@
 	@make clean
 
 chroot:
-	@chroot "$(MP)" $(chenv-pre-bash) 'cd $(ROOT) && make ch-glibc $(chbash-pre-bash)'
+	@chroot "$(MP)" $(chenv1) 'cd $(ROOT) && make ch-glibc $(chbash1)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/gpm/Makefile
===================================================================
--- x86/branches/utf8/packages/gpm/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/gpm/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -19,7 +19,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/grep/Makefile
===================================================================
--- x86/branches/utf8/packages/grep/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/grep/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -70,7 +70,7 @@
 	@make clean
 
 chroot:
-	@chroot "$(MP)" $(chenv-post-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv2) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/groff/Makefile
===================================================================
--- x86/branches/utf8/packages/groff/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/groff/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -14,7 +14,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-pre-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-pre-bash)'
+	@chroot "$(MP)" $(chenv1) 'cd $(ROOT) && make ch-$(NM) $(chbash1)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/grub/Makefile
===================================================================
--- x86/branches/utf8/packages/grub/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/grub/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -13,7 +13,7 @@
 .PHONY:  clean stage2 chroot
 
 chroot:
-	@chroot "$(MP)" $(chenv-post-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv2) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/gtk+2/Makefile
===================================================================
--- x86/branches/utf8/packages/gtk+2/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/gtk+2/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-gtk2 $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-gtk2 $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/gzip/Makefile
===================================================================
--- x86/branches/utf8/packages/gzip/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/gzip/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -24,7 +24,7 @@
 	@make clean
 
 chroot:
-	@chroot "$(MP)" $(chenv-post-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv2) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/hotplug/Makefile
===================================================================
--- x86/branches/utf8/packages/hotplug/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/hotplug/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -14,7 +14,7 @@
 .PHONY:  clean stage2 chroot
 
 chroot:
-	@chroot "$(MP)" $(chenv-post-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv2) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/html_tidy/Makefile
===================================================================
--- x86/branches/utf8/packages/html_tidy/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/html_tidy/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -16,7 +16,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-html_$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-html_$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/iana-etc/Makefile
===================================================================
--- x86/branches/utf8/packages/iana-etc/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/iana-etc/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: chroot stage2 clean
 
 chroot:
-	@chroot "$(MP)" $(chenv-pre-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-pre-bash)'
+	@chroot "$(MP)" $(chenv1) 'cd $(ROOT) && make ch-$(NM) $(chbash1)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/imlib2/Makefile
===================================================================
--- x86/branches/utf8/packages/imlib2/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/imlib2/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/inetutils/Makefile
===================================================================
--- x86/branches/utf8/packages/inetutils/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/inetutils/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -16,7 +16,7 @@
 .PHONY: chroot stage2 clean
 
 chroot:
-	@chroot "$(MP)" $(chenv-pre-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-pre-bash)'
+	@chroot "$(MP)" $(chenv1) 'cd $(ROOT) && make ch-$(NM) $(chbash1)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/inputattach/Makefile
===================================================================
--- x86/branches/utf8/packages/inputattach/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/inputattach/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -8,7 +8,7 @@
 .PHONY: stage2 chroot
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/ion/Makefile
===================================================================
--- x86/branches/utf8/packages/ion/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/ion/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/iproute2/Makefile
===================================================================
--- x86/branches/utf8/packages/iproute2/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/iproute2/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -15,7 +15,7 @@
 .PHONY: chroot stage2 clean
 
 chroot:
-	@chroot "$(MP)" $(chenv-pre-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-pre-bash)'
+	@chroot "$(MP)" $(chenv1) 'cd $(ROOT) && make ch-$(NM) $(chbash1)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/irssi/Makefile
===================================================================
--- x86/branches/utf8/packages/irssi/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/irssi/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/isoinfo/Makefile
===================================================================
--- x86/branches/utf8/packages/isoinfo/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/isoinfo/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot klibc-isoinfo
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 klibc-isoinfo:
 	@echo ""

Modified: x86/branches/utf8/packages/joe/Makefile
===================================================================
--- x86/branches/utf8/packages/joe/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/joe/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/kbd/Makefile
===================================================================
--- x86/branches/utf8/packages/kbd/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/kbd/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -16,7 +16,7 @@
 .PHONY:  clean stage2 chroot
 
 chroot:
-	@chroot "$(MP)" $(chenv-post-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv2) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/klibc/Makefile
===================================================================
--- x86/branches/utf8/packages/klibc/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/klibc/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -13,7 +13,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/less/Makefile
===================================================================
--- x86/branches/utf8/packages/less/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/less/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-pre-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-pre-bash)'
+	@chroot "$(MP)" $(chenv1) 'cd $(ROOT) && make ch-$(NM) $(chbash1)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/lfs-bootscripts/Makefile
===================================================================
--- x86/branches/utf8/packages/lfs-bootscripts/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/lfs-bootscripts/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -13,7 +13,7 @@
 .PHONY:  clean stage2 chroot
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/libIDL/Makefile
===================================================================
--- x86/branches/utf8/packages/libIDL/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/libIDL/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/libaal/Makefile
===================================================================
--- x86/branches/utf8/packages/libaal/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/libaal/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/libjpeg/Makefile
===================================================================
--- x86/branches/utf8/packages/libjpeg/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/libjpeg/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -13,7 +13,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/libpng/Makefile
===================================================================
--- x86/branches/utf8/packages/libpng/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/libpng/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -16,7 +16,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/libtiff/Makefile
===================================================================
--- x86/branches/utf8/packages/libtiff/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/libtiff/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -13,7 +13,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-lib$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-lib$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/libtool/Makefile
===================================================================
--- x86/branches/utf8/packages/libtool/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/libtool/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -13,7 +13,7 @@
 .PHONY:  clean stage2 chroot
 
 chroot:
-	@chroot "$(MP)" $(chenv-post-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv2) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/libungif/Makefile
===================================================================
--- x86/branches/utf8/packages/libungif/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/libungif/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/libxml2/Makefile
===================================================================
--- x86/branches/utf8/packages/libxml2/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/libxml2/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -14,7 +14,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/libxslt/Makefile
===================================================================
--- x86/branches/utf8/packages/libxslt/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/libxslt/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -14,7 +14,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/links/Makefile
===================================================================
--- x86/branches/utf8/packages/links/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/links/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -13,7 +13,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/linux/Makefile
===================================================================
--- x86/branches/utf8/packages/linux/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/linux/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -15,7 +15,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/linux-libc-headers/Makefile
===================================================================
--- x86/branches/utf8/packages/linux-libc-headers/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/linux-libc-headers/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -22,7 +22,7 @@
 	@make clean
 
 chroot:
-	@chroot "$(MP)" $(chenv-pre-bash) 'cd $(MKTREE) && make ch-linux-libc-headers $(chbash-pre-bash)'
+	@chroot "$(MP)" $(chenv1) 'cd $(MKTREE) && make ch-linux-libc-headers $(chbash1)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/lua/Makefile
===================================================================
--- x86/branches/utf8/packages/lua/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/lua/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/lynx/Makefile
===================================================================
--- x86/branches/utf8/packages/lynx/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/lynx/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -14,7 +14,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/m4/Makefile
===================================================================
--- x86/branches/utf8/packages/m4/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/m4/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -22,7 +22,7 @@
 	@make clean
 
 chroot:
-	@chroot "$(MP)" $(chenv-pre-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-pre-bash)'
+	@chroot "$(MP)" $(chenv1) 'cd $(ROOT) && make ch-$(NM) $(chbash1)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/make/Makefile
===================================================================
--- x86/branches/utf8/packages/make/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/make/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -22,7 +22,7 @@
 	@make clean
 
 chroot:
-	@chroot "$(MP)" $(chenv-post-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv2) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/man/Makefile
===================================================================
--- x86/branches/utf8/packages/man/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/man/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -13,7 +13,7 @@
 .PHONY:  clean stage2 chroot
 
 chroot:
-	@chroot "$(MP)" $(chenv-post-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv2) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/man-pages/Makefile
===================================================================
--- x86/branches/utf8/packages/man-pages/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/man-pages/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: chroot stage2 clean
 
 chroot:
-	@chroot "$(MP)" $(chenv-pre-bash) 'cd $(MKTREE) && make ch-man-pages $(chbash-pre-bash)'
+	@chroot "$(MP)" $(chenv1) 'cd $(MKTREE) && make ch-man-pages $(chbash1)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/mktemp/Makefile
===================================================================
--- x86/branches/utf8/packages/mktemp/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/mktemp/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -14,7 +14,7 @@
 .PHONY:  clean stage2 chroot
 
 chroot:
-	@chroot "$(MP)" $(chenv-pre-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-pre-bash)'
+	@chroot "$(MP)" $(chenv1) 'cd $(ROOT) && make ch-$(NM) $(chbash1)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/module-init-tools/Makefile
===================================================================
--- x86/branches/utf8/packages/module-init-tools/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/module-init-tools/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -13,7 +13,7 @@
 .PHONY:  clean stage2 chroot
 
 chroot:
-	@chroot "$(MP)" $(chenv-post-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv2) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/msmtp/Makefile
===================================================================
--- x86/branches/utf8/packages/msmtp/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/msmtp/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -11,7 +11,7 @@
 
 .PHONY: clean stage2 chroot
 
-	@chroot "$(MP)" $(chenv-pre-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-pre-bash)'
+	@chroot "$(MP)" $(chenv1) 'cd $(ROOT) && make ch-$(NM) $(chbash1)'
 
 # This target is for building the package once we're already inside
 # the chroot environment.

Modified: x86/branches/utf8/packages/mutt/Makefile
===================================================================
--- x86/branches/utf8/packages/mutt/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/mutt/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -14,7 +14,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/nALFS/Makefile
===================================================================
--- x86/branches/utf8/packages/nALFS/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/nALFS/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/nano/Makefile
===================================================================
--- x86/branches/utf8/packages/nano/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/nano/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -13,7 +13,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/ncftp/Makefile
===================================================================
--- x86/branches/utf8/packages/ncftp/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/ncftp/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/ncurses/Makefile
===================================================================
--- x86/branches/utf8/packages/ncurses/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/ncurses/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -33,7 +33,7 @@
 	@make clean
 
 chroot:
-	@chroot "$(MP)" $(chenv-pre-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-pre-bash)'
+	@chroot "$(MP)" $(chenv1) 'cd $(ROOT) && make ch-$(NM) $(chbash1)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/nfs-utils/Makefile
===================================================================
--- x86/branches/utf8/packages/nfs-utils/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/nfs-utils/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/openssh/Makefile
===================================================================
--- x86/branches/utf8/packages/openssh/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/openssh/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/openssl/Makefile
===================================================================
--- x86/branches/utf8/packages/openssl/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/openssl/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -14,7 +14,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/pango/Makefile
===================================================================
--- x86/branches/utf8/packages/pango/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/pango/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/patch/Makefile
===================================================================
--- x86/branches/utf8/packages/patch/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/patch/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -22,7 +22,7 @@
 	@make clean
 
 chroot:
-	@chroot "$(MP)" $(chenv-post-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv2) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/pciutils/Makefile
===================================================================
--- x86/branches/utf8/packages/pciutils/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/pciutils/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/perl/Makefile
===================================================================
--- x86/branches/utf8/packages/perl/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/perl/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -29,7 +29,7 @@
 	@make clean
 
 chroot:
-	@chroot "$(MP)" $(chenv-pre-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-pre-bash)'
+	@chroot "$(MP)" $(chenv1) 'cd $(ROOT) && make ch-$(NM) $(chbash1)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/pkgconfig/Makefile
===================================================================
--- x86/branches/utf8/packages/pkgconfig/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/pkgconfig/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/popt/Makefile
===================================================================
--- x86/branches/utf8/packages/popt/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/popt/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -14,7 +14,7 @@
 .PHONY: clean stage2 chroot
 
 chroot:
-	@chroot "$(MP)" $(chenv-pre-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-pre-bash)'
+	@chroot "$(MP)" $(chenv1) 'cd $(ROOT) && make ch-$(NM) $(chbash1)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/portmap/Makefile
===================================================================
--- x86/branches/utf8/packages/portmap/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/portmap/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -16,7 +16,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/ppp/Makefile
===================================================================
--- x86/branches/utf8/packages/ppp/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/ppp/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/procps/Makefile
===================================================================
--- x86/branches/utf8/packages/procps/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/procps/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY:  clean stage2 chroot
 
 chroot:
-	@chroot "$(MP)" $(chenv-post-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv2) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/psmisc/Makefile
===================================================================
--- x86/branches/utf8/packages/psmisc/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/psmisc/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -14,7 +14,7 @@
 .PHONY:  clean stage2 chroot
 
 chroot:
-	@chroot "$(MP)" $(chenv-post-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv2) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/raidtools/Makefile
===================================================================
--- x86/branches/utf8/packages/raidtools/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/raidtools/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -13,7 +13,7 @@
 .PHONY: clean stage2 chroot
 
 chroot:
-	@chroot "$(MP)" $(chenv-pre-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-pre-bash)'
+	@chroot "$(MP)" $(chenv1) 'cd $(ROOT) && make ch-$(NM) $(chbash1)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/readline/Makefile
===================================================================
--- x86/branches/utf8/packages/readline/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/readline/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -19,7 +19,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-pre-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-pre-bash)'
+	@chroot "$(MP)" $(chenv1) 'cd $(ROOT) && make ch-$(NM) $(chbash1)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/redhat-patches/Makefile
===================================================================
--- x86/branches/utf8/packages/redhat-patches/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/redhat-patches/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -14,7 +14,7 @@
 .PHONY: chroot stage2 clean
 
 chroot:
-	@chroot "$(MP)" $(chenv-pre-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-pre-bash)'
+	@chroot "$(MP)" $(chenv1) 'cd $(ROOT) && make ch-$(NM) $(chbash1)'
 
 # This target is for building the package once we're already inside
 # the chroot environment.

Modified: x86/branches/utf8/packages/reiser4progs/Makefile
===================================================================
--- x86/branches/utf8/packages/reiser4progs/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/reiser4progs/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/reiserfsprogs/Makefile
===================================================================
--- x86/branches/utf8/packages/reiserfsprogs/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/reiserfsprogs/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/rp-pppoe/Makefile
===================================================================
--- x86/branches/utf8/packages/rp-pppoe/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/rp-pppoe/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -14,7 +14,7 @@
 .PHONY:  clean stage2 chroot
 
 chroot:
-	@chroot "$(MP)" $(chenv-post-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv2) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/samba/Makefile
===================================================================
--- x86/branches/utf8/packages/samba/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/samba/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/screen/Makefile
===================================================================
--- x86/branches/utf8/packages/screen/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/screen/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/sed/Makefile
===================================================================
--- x86/branches/utf8/packages/sed/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/sed/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -22,7 +22,7 @@
 	@make clean
 
 chroot:
-	@chroot "$(MP)" $(chenv-pre-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-pre-bash)'
+	@chroot "$(MP)" $(chenv1) 'cd $(ROOT) && make ch-$(NM) $(chbash1)'
 
 stage2:
 	@echo""

Modified: x86/branches/utf8/packages/shadow/Makefile
===================================================================
--- x86/branches/utf8/packages/shadow/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/shadow/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY:  clean stage2 chroot
 
 chroot:
-	@chroot "$(MP)" $(chenv-post-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv2) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/sharutils/Makefile
===================================================================
--- x86/branches/utf8/packages/sharutils/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/sharutils/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-pre-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-pre-bash)'
+	@chroot "$(MP)" $(chenv1) 'cd $(ROOT) && make ch-$(NM) $(chbash1)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/slang/Makefile
===================================================================
--- x86/branches/utf8/packages/slang/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/slang/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/slrn/Makefile
===================================================================
--- x86/branches/utf8/packages/slrn/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/slrn/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/squashfs/Makefile
===================================================================
--- x86/branches/utf8/packages/squashfs/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/squashfs/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -13,7 +13,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/startup-notification/Makefile
===================================================================
--- x86/branches/utf8/packages/startup-notification/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/startup-notification/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/subversion/Makefile
===================================================================
--- x86/branches/utf8/packages/subversion/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/subversion/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -14,7 +14,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/sysklogd/Makefile
===================================================================
--- x86/branches/utf8/packages/sysklogd/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/sysklogd/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -15,7 +15,7 @@
 .PHONY:  clean stage2 chroot
 
 chroot:
-	@chroot "$(MP)" $(chenv-post-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv2) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/syslinux/Makefile
===================================================================
--- x86/branches/utf8/packages/syslinux/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/syslinux/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/sysvinit/Makefile
===================================================================
--- x86/branches/utf8/packages/sysvinit/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/sysvinit/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -14,7 +14,7 @@
 .PHONY:  clean stage2 chroot
 
 chroot:
-	@chroot "$(MP)" $(chenv-post-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv2) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/tar/Makefile
===================================================================
--- x86/branches/utf8/packages/tar/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/tar/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -24,7 +24,7 @@
 	@make clean
 
 chroot:
-	@chroot "$(MP)" $(chenv-post-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv2) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/tcpwrappers/Makefile
===================================================================
--- x86/branches/utf8/packages/tcpwrappers/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/tcpwrappers/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -16,7 +16,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/template/Makefile
===================================================================
--- x86/branches/utf8/packages/template/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/template/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -1,118 +1,54 @@
-# [package-name] Makefile (This is a template for package Makefiles)
-#==============================================================================
+# [package-name] Makefile
 
+# Package versions
 NM= [package-name]
-VRS= [version-number]
+VRS= 1.2.3
 DIR= $(NM)-$(VRS)
-FILE= $(DIR).tar.bz2 # Use bz2 files wherever possible, especially for lfs-base
-SHA= [sha1sum of $(FILE)]
+FILE= $(DIR).tar.bz2
+PATCH1= $(DIR)-some_patch-1.patch
 URL= $(HTTP)/$(NM)/$(FILE)
+URL1= $(HTTP)/$(NM)/$(PATCH1)
 
-PATCH1= $(DIR)-some-1.patch
-SHA1= [sha1sum of $(PATCH1)
-PATCHURL= http://www.linuxfromscratch.org/patches/downloads/$(NM)/$(PATCH)
+# RULES
 
-# Targets
-# =============================================================================
+.PHONY: stage1 clean stage2 chroot
 
-include $(ROOT)/scripts/functions
+# Stage1 is for packages built to the /tools dir in the base LFS
+stage1:
+	@echo ""
+	@echo "=====> Building $(NM)"
+	@echo ""
+	@if [ ! -f $(SRC)/$(FILE) ] ; then $(WGET) $(URL) && \
+	 mv $(FILE) $(SRC) ; fi # This command, mv file to sources directory, is only for LFS Core packages and patches
+	@if [ ! -f $(WD)/bin/ls ] ; then unpack $(SRC)/$(FILE) && cd $(DIR) && \
+	 ./configure --prefix=$(WD) && make -j3 && make install ; fi
+	@make clean
 
-$(FILE):
-	$(call download,$(FILE),$(URL),$(SHA))
-
-$(PATCH1):
-	$(call download,$(PATCH1),$(URL1),$(SHA1))
-
-stage1: Makefile $(FILE)
-	@$(std_build) # See the scripts/functions file for functions like this
-	@cp $(SRC)/$(FILE) $(LFSSRC) # Copy LFS-Base packages to safe location
-
-compile-stage1:
-	@$(call echo_message, Configuring)
-#==============================================================================
-# Configure commands below \/
-#==============================================================================
-	@$(sep_dir) # Simple function to create a separate build directory
-	@./configure --prefix=$(WD) >../$(DIR)-$@.log 2>&1
-#
-#==Status Messages==========================================
-#
-	@$(OK)
-	@$(call echo_message, Making)
-#==============================================================================
-# Make commands below \/
-#==============================================================================
-	@make $(PM) >>../$(DIR)-$@.log 2>&1
-#
-#==Status Messages==========================================
-#
-	@$(OK)
-	@$(call echo_message, Installing)
-#==============================================================================
-# Install commands below \/
-#==============================================================================
-	@make install >>../$(DIR)-$@.log 2>&1
-#
-#==Status Messages==========================================
-#
-	@$(OK)
-
-# The following target is for use with packages that must be built in chroot
-# and which you want to build one at a time. Mostly for troubleshooting.
-# For use with packages built in chroot but before the chroot installation of
-# Bash.
-# NOTE: You would never call the 'chroot' targets directly, they would be
-# referenced by other targets in the root Makefile.
+# This target allows us to chroot if we haven't already
+# Useful if the make has bombed and we want to build just
+# this package for the chroot environment. In that case, we
+# just call "make package-name" from the top directory, and
+# this target is used to enter chroot and recall the ch-package-name
+# target from the top Makefile.
 chroot:
-	@chroot "$(MP)" $(chenv-pre-bash) \
-	'cd $(ROOT) && make ch-$(NM) $(chbash-pre-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
-# Below is a variation of the above target. This would be used with packages
-# built in chroot after Bash, but before BLFS-type packages.
-#chroot:
-#	@chroot "$(MP)" $(chenv-post-bash) \
-	'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
-
-# Below is the final variation of the above two. For use with packages built
-# in chroot but after the lfs-base is done. BLFS-type packages.
-#chroot:
-#	@chroot "$(MP)" $(chenv-blfs) \
-	'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
-
-stage2: Makefile $(FILE) $(PATCH1)
-	@$(std_build)
-
-compile-stage2:
-	@$(call echo_message, Configuring)
-#==============================================================================
-# Configure commands below \/
-#==============================================================================
-	@patch -Np1 -i ../$(PATCH1)
-	@./configure --prefix=/usr >../$(DIR)-$@.log 2>&1
-#
-#==Status Messages==========================================
-#
-	@$(OK)
-	@$(call echo_message, Making)
-#==============================================================================
-# Make commands below \/
-#==============================================================================
-	@make $(PM) >>../$(DIR)-$@.log 2>&1
-#
-#==Status Messages===========================================
-#
-	@$(OK)
-	@$(call echo_message, Installing)
-#==============================================================================
-# Install commands below \/
-#==============================================================================
-	@make install >>../$(DIR)-$@.log 2>&1
-#
-#==Status Messages===========================================
-#
-	@$(OK)
-
+# This target is for building the package once we're already inside
+# the chroot environment.
+stage2:
+	@echo ""
+	@echo "=====> Building $(NM) in chroot"
+	@echo ""
+	@if [ ! -f $(SRC)/$(FILE) ] ; then $(WGET) $(URL) && \
+	 mv $(FILE) $(SRC) ; fi # This command, mv file to sources directory, is only for LFS Core packages and patches
+	@if [ ! -f $(SRC)/$(PATCH1) ] ; then $(WGET) $(URL1) && \
+	 mv $(PATCH1) $(SRC) ; fi # This command, mv file to sources directory, is only for LFS Core packages and patches
+	@if [ ! -f /bin/ls ] ; then unpack $(SRC)/$(FILE) && cd $(DIR) && \
+	 patch -Np1 -i $(SRC)/$(PATCH1) && \
+	 ./configure --prefix=/usr && \
+	 make -j3 && make install ; fi
+	@make clean
+	 
+# Does what it says
 clean:
 	@-rm -rf $(DIR)
-
-.PHONY: compile-stage1 clean chroot compile-stage2

Modified: x86/branches/utf8/packages/texinfo/Makefile
===================================================================
--- x86/branches/utf8/packages/texinfo/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/texinfo/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -23,7 +23,7 @@
 	@make clean
 
 chroot:
-	@chroot "$(MP)" $(chenv-pre-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-pre-bash)'
+	@chroot "$(MP)" $(chenv1) 'cd $(ROOT) && make ch-$(NM) $(chbash1)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/thunderbird/Makefile
===================================================================
--- x86/branches/utf8/packages/thunderbird/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/thunderbird/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/traceroute/Makefile
===================================================================
--- x86/branches/utf8/packages/traceroute/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/traceroute/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/udev/Makefile
===================================================================
--- x86/branches/utf8/packages/udev/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/udev/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -14,7 +14,7 @@
 .PHONY:  clean stage2 chroot
 
 chroot:
-	@chroot "$(MP)" $(chenv-post-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv2) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/unionfs/Makefile
===================================================================
--- x86/branches/utf8/packages/unionfs/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/unionfs/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/unzip/Makefile
===================================================================
--- x86/branches/utf8/packages/unzip/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/unzip/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -20,7 +20,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/util-linux/Makefile
===================================================================
--- x86/branches/utf8/packages/util-linux/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/util-linux/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -26,7 +26,7 @@
 	@make clean
 
 chroot:
-	@chroot "$(MP)" $(chenv-post-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv2) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/vim/Makefile
===================================================================
--- x86/branches/utf8/packages/vim/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/vim/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -16,10 +16,10 @@
 .PHONY: clean chroot stage2 stage3
 
 chroot:
-	@chroot "$(MP)" $(chenv-pre-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-pre-bash)'
+	@chroot "$(MP)" $(chenv1) 'cd $(ROOT) && make ch-$(NM) $(chbash1)'
 
 chroot3:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-gvim $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-gvim $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/wget/Makefile
===================================================================
--- x86/branches/utf8/packages/wget/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/wget/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -1,92 +1,40 @@
 # Wget Makefile
-#==============================================================================
 
+# Package versions
 NM= wget
 VRS= 1.9.1
 DIR= $(NM)-$(VRS)
 FILE= $(DIR).tar.gz
 
-# Targets
-# =============================================================================
+#RULES
 
-include $(ROOT)/scripts/functions
+.PHONY: prebuild clean chroot stage2
 
-$(FILE):
-	@cd $(SRC) ; ftpget $(VRS)
-	@ln -s $(SRC)/$(FILE) .
-	
+prebuild:
+	@echo ""
+	@echo "=====> Building $(NM)"
+	@echo ""
+	@if [ ! -f $(FILE) ] ; then ftpget ; fi
+	@if [ ! -f $(WD)/bin/$(NM) ] ; then \
+	 unpack $(FILE) && cd $(DIR) && \
+	 ./configure --prefix=$(WD) --libdir=$(WD)/lib --without-ssl \
+	 --enable-static --disable-shared && \
+	 make -j3 && make install ; fi
+	@make clean
 
-prebuild: Makefile $(FILE)
-	@$(std_build)
-
-compile-prebuild:
-	@$(call echo_message, Configuring)
-#==============================================================================
-# Configure commands below \/
-#==============================================================================
-	@./configure --prefix=$(WD) --libdir=$(WD)/lib --without-ssl \
-	 --enable-static --disable-shared >../$(DIR)-$@.log 2>&1
-#
-#==Status Messages==========================================
-#
-	@$(OK)
-	@$(call echo_message, Making)
-#==============================================================================
-# Make commands below \/
-#==============================================================================
-	@make $(PM) >>../$(DIR)-$@.log 2>&1
-#
-#==Status Messages==========================================
-#
-	@$(OK)
-	@$(call echo_message, Installing)
-#==============================================================================
-# Install commands below \/
-#==============================================================================
-	@make install >>../$(DIR)-$@.log 2>&1
-#
-#==Status Messages==========================================
-#
-	@$(OK)
-
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) \
-	'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
-stage2: Makefile $(FILE)
-	@$(std_build)
+stage2:
+	@echo ""
+	@echo "=====> Building $(NM) in chroot"
+	@echo ""
+	@if [ ! -f $(FILE) ] ; then $(WD)/bin/ftpget ; fi
+	@if [ ! -f /usr/bin/$(NM) ] ; then \
+	 unpack $(FILE) && cd $(DIR) && \
+	 ./configure --prefix=/usr --sysconfdir=/etc --with-ssl && \
+	 make -j3 && make install ; fi
+	@make clean
 
-compile-stage2:
-	@$(call echo_message, Configuring)
-#==============================================================================
-# Configure commands below \/
-#==============================================================================
-	@./configure --prefix=/usr --sysconfdir=/etc \
-	 --with-ssl >../$(DIR)-$@.log 2>&1
-#
-#==Status Messages==========================================
-#
-	@$(OK)
-	@$(call echo_message, Making)
-#==============================================================================
-# Make commands below \/
-#==============================================================================
-	@make $(PM) >>../$(DIR)-$@.log 2>&1
-#
-#==Status Messages===========================================
-#
-	@$(OK)
-	@$(call echo_message, Installing)
-#==============================================================================
-# Install commands below \/
-#==============================================================================
-	@make install >>../$(DIR)-$@.log 2>&1
-#
-#==Status Messages===========================================
-#
-	@$(OK)
-
 clean:
 	@-rm -rf $(DIR)
-
-.PHONY: compile-prebuild clean chroot compile-stage2

Modified: x86/branches/utf8/packages/xchat/Makefile
===================================================================
--- x86/branches/utf8/packages/xchat/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/xchat/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/xfce/Makefile
===================================================================
--- x86/branches/utf8/packages/xfce/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/xfce/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/xfsprogs/Makefile
===================================================================
--- x86/branches/utf8/packages/xfsprogs/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/xfsprogs/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/zip/Makefile
===================================================================
--- x86/branches/utf8/packages/zip/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/zip/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -12,7 +12,7 @@
 .PHONY: clean chroot stage2
 
 chroot:
-	@chroot "$(MP)" $(chenv-blfs) 'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)'
+	@chroot "$(MP)" $(chenv3) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
 
 stage2:
 	@echo ""

Modified: x86/branches/utf8/packages/zlib/Makefile
===================================================================
--- x86/branches/utf8/packages/zlib/Makefile	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/packages/zlib/Makefile	2005-07-20 04:58:47 UTC (rev 392)
@@ -13,7 +13,7 @@
 .PHONY: chroot stage2 clean
 
 chroot:
-	@chroot "$(MP)" $(chenv-pre-bash) 'cd $(ROOT) && make ch-$(NM) $(chbash-pre-bash)'
+	@chroot "$(MP)" $(chenv1) 'cd $(ROOT) && make ch-$(NM) $(chbash1)'
 
 stage2:
 	@echo ""

Deleted: x86/branches/utf8/scripts/ftpget
===================================================================
--- x86/branches/utf8/scripts/ftpget	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/scripts/ftpget	2005-07-20 04:58:47 UTC (rev 392)
@@ -1,13 +0,0 @@
-#!/bin/sh
-VERS="$1"
-if [ ! -f wget-$1.tar.gz ] ; then
-ftp -n << END
-open ftp.gnu.org
-user anonymous
-passive
-binary
-cd gnu/wget
-get wget-$1.tar.gz
-bye
-END
-fi

Deleted: x86/branches/utf8/scripts/functions
===================================================================
--- x86/branches/utf8/scripts/functions	2005-07-20 04:17:51 UTC (rev 391)
+++ x86/branches/utf8/scripts/functions	2005-07-20 04:58:47 UTC (rev 392)
@@ -1,39 +0,0 @@
-#==============================================================================
-# Functions for use in the LiveCD Makefiles
-#
-# Author: Jeremy Huntwork
-# Date  : 2005-07-17
-#==============================================================================
-define echo_message
-	@echo $(BRW)
-	@echo ===========================================================
-	@echo $(BRW)$(1) $(ORANGE)$(NM)-$(VRS)$(BRW) for target $(ORANGE)$@$(BRW)
-	@echo ===========================================================$(WHITE)
-endef
-
-define OK
-	@echo $(GREEN) [ OK ]$(WHITE)
-endef
-
-define std_build
-        @unpack $(FILE)
-        @make -C $(DIR) -f ../Makefile compile-$@
-        @make clean
-        @touch $@
-endef
-
-define sep_dir
-	@if [ -d ../$(NM)-build ] ; then rm -rf ../$(NM)-build ; fi
-	@mkdir ../$(NM)-build && cd ../$(NM)-build
-endef
-
-# This takes the form of 'download [filename] [url] [sha1sum]'
-define download
-	@cd $(SRC) ; if [ ! -f $(1) ] ; then $(WGET) $(2) ; \
-	 elif ! echo "$(3)  $(SRC)/$(1)" | sha1sum -c - >/dev/null 2>/dev/null ; then \
-	 $(WGET) -c $(2) ; fi
-	@if echo "$(3)  $(SRC)/$(1)" | sha1sum -c - >/dev/null 2/dev/null ; then \
-	 echo $(BRW)sha1sum check on $(SRC)/$(1): $(GREEN)[ OK ]$(WHITE); \
-	 else echo $(BRW)sha1sum check on $(SRC)/$(1): $(RED)[ FAILED ]$(WHITE); fi
-	@ln -s $(SRC)/$(1) .
-endef




More information about the livecd mailing list