r3334 - in jhalfs/trunk: . CLFS CLFS2 CLFS3 HLFS LFS common

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Sun Mar 18 03:14:04 PDT 2007


Author: manuel
Date: 2007-03-18 04:14:04 -0600 (Sun, 18 Mar 2007)
New Revision: 3334

Modified:
   jhalfs/trunk/CLFS/master.sh
   jhalfs/trunk/CLFS2/master.sh
   jhalfs/trunk/CLFS3/master.sh
   jhalfs/trunk/HLFS/master.sh
   jhalfs/trunk/LFS/master.sh
   jhalfs/trunk/README
   jhalfs/trunk/common/makefile-functions
Log:
Reimplemented support for partial builds.

Modified: jhalfs/trunk/CLFS/master.sh
===================================================================
--- jhalfs/trunk/CLFS/master.sh	2007-03-18 09:46:24 UTC (rev 3333)
+++ jhalfs/trunk/CLFS/master.sh	2007-03-18 10:14:04 UTC (rev 3334)
@@ -20,19 +20,15 @@
 	@\$(call echo_message, Building)
 	@mkdir \$(MOUNT_PT)/tools && \\
 	rm -f /tools && \\
-	ln -s \$(MOUNT_PT)/tools / && \\
-	touch \$@ && \\
-	echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
-	echo --------------------------------------------------------------------------------\$(WHITE)
+	ln -s \$(MOUNT_PT)/tools /
+	@\$(call housekeeping)
 
 024-creatingcrossdir: 023-creatingtoolsdir
 	@\$(call echo_message, Building)
 	@mkdir -v \$(MOUNT_PT)/cross-tools && \\
 	rm -f /cross-tools && \\
-	ln -s \$(MOUNT_PT)/cross-tools / && \\
-	touch \$@ && \\
-	echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
-	echo --------------------------------------------------------------------------------\$(WHITE)
+	ln -s \$(MOUNT_PT)/cross-tools /
+	@\$(call housekeeping)
 
 025-addinguser:  024-creatingcrossdir
 	@\$(call echo_message, Building)
@@ -45,10 +41,8 @@
 	@chown \$(LUSER) \$(MOUNT_PT)/tools && \\
 	chown \$(LUSER) \$(MOUNT_PT)/cross-tools && \\
 	chmod -R a+wt \$(MOUNT_PT)/\$(SCRIPT_ROOT) && \\
-	chmod a+wt \$(SRCSDIR) && \\
-	touch \$@ && \\
-	echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
-	echo --------------------------------------------------------------------------------\$(WHITE)
+	chmod a+wt \$(SRCSDIR)
+	@\$(call housekeeping)
 
 026-settingenvironment:  025-addinguser
 	@\$(call echo_message, Building)
@@ -75,10 +69,8 @@
 	@chown \$(LUSER):\$(LGROUP) /home/\$(LUSER)/.bashrc && \\
 	touch envars && \\
 	chmod -R a+wt \$(MOUNT_PT) && \\
-	chown -R \$(LUSER) \$(MOUNT_PT)/\$(SCRIPT_ROOT) && \\
-	touch \$@ && \\
-	echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
-	echo --------------------------------------------------------------------------------\$(WHITE)
+	chown -R \$(LUSER) \$(MOUNT_PT)/\$(SCRIPT_ROOT)
+	@\$(call housekeeping)
 EOF
 ) >> $MKFILE.tmp
   host_prep=" 023-creatingtoolsdir 024-creatingcrossdir 026-settingenvironment"
@@ -782,32 +774,32 @@
 #---------------AS ROOT
 mk_SETUP:
 	@\$(call echo_SU_request)
-	@sudo make SETUP
+	@sudo make make BREAKPOINT=\$(BREAKPOINT) SETUP
 	@touch \$@
 
 #---------------AS LUSER
 mk_CROSS: mk_SETUP
 	@\$(call echo_PHASE,Cross and Temporary Tools)
-	@(sudo \$(SU_LUSER) "source .bashrc && cd \$(MOUNT_PT)/\$(SCRIPT_ROOT) && make AS_LUSER" )
+	@(sudo \$(SU_LUSER) "source .bashrc && cd \$(MOUNT_PT)/\$(SCRIPT_ROOT) && make make BREAKPOINT=\$(BREAKPOINT) AS_LUSER" )
 	@sudo make restore-luser-env
 	@touch \$@
 
 mk_SUDO: mk_CROSS
-	@sudo make SUDO
+	@sudo make make BREAKPOINT=\$(BREAKPOINT) SUDO
 	@touch \$@
 
 #---------------CHROOT JAIL
 mk_SYSTOOLS: mk_SUDO
 	@\$(call echo_CHROOT_request)
 	@\$(call echo_PHASE, CHROOT JAIL )
-	@( sudo \$(CHROOT1) "cd \$(SCRIPT_ROOT) && make CHROOT_JAIL")
+	@( sudo \$(CHROOT1) "cd \$(SCRIPT_ROOT) && make make BREAKPOINT=\$(BREAKPOINT) CHROOT_JAIL")
 	@touch \$@
 
 mk_CUSTOM_TOOLS: create-sbu_du-report
 	@if [ "\$(ADD_CUSTOM_TOOLS)" = "y" ]; then \\
 	  \$(call sh_echo_PHASE,Building CUSTOM_TOOLS); \\
 	  sudo mkdir -p ${BUILDDIR}${TRACKING_DIR}; \\
-	  (sudo \$(CHROOT1) "cd \$(SCRIPT_ROOT) && make CUSTOM_TOOLS"); \\
+	  (sudo \$(CHROOT1) "cd \$(SCRIPT_ROOT) && make make BREAKPOINT=\$(BREAKPOINT) CUSTOM_TOOLS"); \\
 	fi;
 	@touch \$@
 
@@ -815,7 +807,7 @@
 	@if [ "\$(ADD_BLFS_TOOLS)" = "y" ]; then \\
 	  \$(call sh_echo_PHASE,Building BLFS_TOOL); \\
 	  sudo mkdir -p $BUILDDIR$TRACKING_DIR; \\
-	  sudo \$(CHROOT1) "cd \$(SCRIPT_ROOT) && make BLFS_TOOL"; \\
+	  sudo \$(CHROOT1) "cd \$(SCRIPT_ROOT) && make make BREAKPOINT=\$(BREAKPOINT) BLFS_TOOL"; \\
 	fi;
 	@touch \$@
 
@@ -885,32 +877,32 @@
 
 mk_SETUP:
 	@\$(call echo_SU_request)
-	@sudo make SETUP
+	@sudo make make BREAKPOINT=\$(BREAKPOINT) SETUP
 	@touch \$@
 
 #---------------AS LUSER
 
 mk_CROSS: mk_SETUP
 	@\$(call echo_PHASE,Cross Tool)
-	@(sudo \$(SU_LUSER) "source .bashrc && cd \$(MOUNT_PT)/\$(SCRIPT_ROOT) && make AS_LUSER" )
+	@(sudo \$(SU_LUSER) "source .bashrc && cd \$(MOUNT_PT)/\$(SCRIPT_ROOT) && make make BREAKPOINT=\$(BREAKPOINT) AS_LUSER" )
 	@touch \$@
 
 mk_SUDO: mk_CROSS
-	@sudo make SUDO
+	@sudo make make BREAKPOINT=\$(BREAKPOINT) SUDO
 	@touch \$@
 
 #---------------AS ROOT
 
 mk_FINAL:
 	@\$(call echo_PHASE,Final System)
-	@( source /root/.bash_profile && make AS_ROOT )
+	@( source /root/.bash_profile && make make BREAKPOINT=\$(BREAKPOINT) AS_ROOT )
 	@touch \$@
 
 mk_CUSTOM_TOOLS: mk_FINAL
 	@if [ "\$(ADD_CUSTOM_TOOLS)" = "y" ]; then \\
 	  \$(call sh_echo_PHASE,Building CUSTOM_TOOLS); \\
 	  mkdir -p ${TRACKING_DIR}; \\
-	  ( source /root/.bash_profile && make CUSTOM_TOOLS ); \\
+	  ( source /root/.bash_profile && make make BREAKPOINT=\$(BREAKPOINT) CUSTOM_TOOLS ); \\
 	fi;
 	@touch \$@
 
@@ -918,7 +910,7 @@
 	@if [ "\$(ADD_BLFS_TOOLS)" = "y" ]; then \\
 	  \$(call sh_echo_PHASE,Building BLFS_TOOL); \\
 	  mkdir -p $TRACKING_DIR; \\
-	  ( source /root/.bash_profile && make BLFS_TOOL ); \\
+	  ( source /root/.bash_profile && make make BREAKPOINT=\$(BREAKPOINT) BLFS_TOOL ); \\
 	fi
 	@touch \$@
 

Modified: jhalfs/trunk/CLFS2/master.sh
===================================================================
--- jhalfs/trunk/CLFS2/master.sh	2007-03-18 09:46:24 UTC (rev 3333)
+++ jhalfs/trunk/CLFS2/master.sh	2007-03-18 10:14:04 UTC (rev 3334)
@@ -26,9 +26,7 @@
 	else \\
 		touch luser-exist; \\
 	fi;
-	@touch \$@ && \\
-	echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
-	echo --------------------------------------------------------------------------------\$(WHITE)
+	@\$(call housekeeping)
 
 026-settingenvironment:  025-addinguser
 	@\$(call echo_message, Building)
@@ -54,9 +52,7 @@
 	@chown \$(LUSER):\$(LGROUP) /home/\$(LUSER)/.bashrc && \\
 	touch envars && \\
 	chown \$(LUSER):\$(LGROUP) envars
-	@touch \$@ && \\
-	echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
-	echo --------------------------------------------------------------------------------\$(WHITE)
+	@\$(call housekeeping)
 
 027-create-directories: 026-settingenvironment
 	@\$(call echo_message, Building)
@@ -74,11 +70,8 @@
 	@for dir in \$(MOUNT_PT)/usr{,/local}; do \\
 	  ln -s share/{man,doc,info} \$\$dir ; \\
 	done
+	@\$(call housekeeping)
 
-	@touch \$@ && \\
-	echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
-	echo --------------------------------------------------------------------------------\$(WHITE)
-
 028-creating-sysfile: 027-create-directories
 	@\$(call echo_message, Building)
 
@@ -105,11 +98,8 @@
 	@chmod 664 \$(MOUNT_PT)/var/run/utmp \$(MOUNT_PT)/var/log/lastlog
 	@chown -R \$(LUSER) \$(MOUNT_PT) && \\
 	chmod -R a+wt \$(MOUNT_PT)/\$(SCRIPT_ROOT)
+	@\$(call housekeeping)
 
-	@touch \$@ && \\
-	echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
-	echo --------------------------------------------------------------------------------\$(WHITE)
-
 EOF
 ) >> $MKFILE.tmp
 
@@ -437,19 +427,19 @@
 
 mk_SETUP:
 	@\$(call echo_SU_request)
-	@sudo make SETUP
+	@sudo make BREAKPOINT=\$(BREAKPOINT) SETUP
 	@touch \$@
 
 mk_LUSER: mk_SETUP
 	@\$(call echo_SULUSER_request)
-	@(sudo \$(SU_LUSER) "source .bashrc && cd \$(MOUNT_PT)/\$(SCRIPT_ROOT) && make LUSER" )
+	@(sudo \$(SU_LUSER) "source .bashrc && cd \$(MOUNT_PT)/\$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) LUSER" )
 	@touch \$@
 
 mk_CUSTOM_TOOLS: create-sbu_du-report
 	@if [ "\$(ADD_CUSTOM_TOOLS)" = "y" ]; then \\
 	  \$(call sh_echo_PHASE,Building CUSTOM_TOOLS); \\
 	  (sudo \$(SU_LUSER) "mkdir -p $BUILDDIR$TRACKING_DIR"); \\
-	  (sudo \$(SU_LUSER) "source .bashrc && cd \$(MOUNT_PT)/\$(SCRIPT_ROOT) && make CUSTOM_TOOLS"); \\
+	  (sudo \$(SU_LUSER) "source .bashrc && cd \$(MOUNT_PT)/\$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) CUSTOM_TOOLS"); \\
 	fi;
 	@touch \$@
 
@@ -457,7 +447,7 @@
 	@if [ "\$(ADD_BLFS_TOOLS)" = "y" ]; then \\
 	  \$(call sh_echo_PHASE,Building BLFS_TOOL); \\
 	  (sudo \$(SU_LUSER) "mkdir -p $BUILDDIR$TRACKING_DIR"); \\
-	  (sudo \$(SU_LUSER) "source .bashrc && cd \$(MOUNT_PT)/\$(SCRIPT_ROOT) && make BLFS_TOOL"); \\
+	  (sudo \$(SU_LUSER) "source .bashrc && cd \$(MOUNT_PT)/\$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) BLFS_TOOL"); \\
 	fi;
 	@touch \$@
 
@@ -465,7 +455,7 @@
 	@\$(call echo_SU_request)
 	@echo "$VERSION-sysroot - jhalfs build" > clfs-release && \\
 	sudo mv clfs-release \$(MOUNT_PT)/etc
-	@sudo make ROOT
+	@sudo make BREAKPOINT=\$(BREAKPOINT) ROOT
 	@touch \$@
 
 SETUP:        $host_prep

Modified: jhalfs/trunk/CLFS3/master.sh
===================================================================
--- jhalfs/trunk/CLFS3/master.sh	2007-03-18 09:46:24 UTC (rev 3333)
+++ jhalfs/trunk/CLFS3/master.sh	2007-03-18 10:14:04 UTC (rev 3334)
@@ -26,9 +26,7 @@
 	else \\
 		touch luser-exist; \\
 	fi;
-	@touch \$@ && \\
-	echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
-	echo --------------------------------------------------------------------------------\$(WHITE)
+	@\$(call housekeeping)
 
 026-settingenvironment:  025-addinguser
 	@\$(call echo_message, Building)
@@ -56,9 +54,7 @@
 	@chown \$(LUSER):\$(LGROUP) /home/\$(LUSER)/.bashrc && \\
 	touch envars && \\
 	chown \$(LUSER):\$(LGROUP) envars
-	@touch \$@ && \\
-	echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
-	echo --------------------------------------------------------------------------------\$(WHITE)
+	@\$(call housekeeping)
 
 027-create-directories: 026-settingenvironment
 	@\$(call echo_message, Building)
@@ -76,11 +72,8 @@
 	@for dir in \$(MOUNT_PT)/usr{,/local}; do \\
 	  ln -s share/{man,doc,info} \$\$dir ; \\
 	done
+	@\$(call housekeeping)
 
-	@touch \$@ && \\
-	echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
-	echo --------------------------------------------------------------------------------\$(WHITE)
-
 028-creating-sysfile: 027-create-directories
 	@\$(call echo_message, Building)
 
@@ -107,11 +100,8 @@
 	@chmod 664 \$(MOUNT_PT)/var/run/utmp \$(MOUNT_PT)/var/log/lastlog
 	@chown -R \$(LUSER) \$(MOUNT_PT) && \\
 	chmod -R a+wt \$(MOUNT_PT)/\$(SCRIPT_ROOT)
+	@\$(call housekeeping)
 
-	@touch \$@ && \\
-	echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
-	echo --------------------------------------------------------------------------------\$(WHITE)
-
 EOF
 ) >> $MKFILE.tmp
 
@@ -484,19 +474,19 @@
 
 mk_SETUP:
 	@\$(call echo_SU_request)
-	@sudo make SETUP
+	@sudo make BREAKPOINT=\$(BREAKPOINT) SETUP
 	@touch \$@
 
 mk_LUSER: mk_SETUP
 	@\$(call echo_SULUSER_request)
-	@(sudo \$(SU_LUSER) "source .bashrc && cd \$(MOUNT_PT)/\$(SCRIPT_ROOT) && make LUSER" )
+	@(sudo \$(SU_LUSER) "source .bashrc && cd \$(MOUNT_PT)/\$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) LUSER" )
 	@touch \$@
 
 mk_CUSTOM_TOOLS: create-sbu_du-report
 	@if [ "\$(ADD_CUSTOM_TOOLS)" = "y" ]; then \\
 	  \$(call sh_echo_PHASE,Building CUSTOM_TOOLS); \\
 	  (sudo \$(SU_LUSER) "mkdir -p $BUILDDIR$TRACKING_DIR"); \\
-	  (sudo \$(SU_LUSER) "source .bashrc && cd \$(MOUNT_PT)/\$(SCRIPT_ROOT) && make CUSTOM_TOOLS"); \\
+	  (sudo \$(SU_LUSER) "source .bashrc && cd \$(MOUNT_PT)/\$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) CUSTOM_TOOLS"); \\
 	fi;
 	@touch \$@
 
@@ -504,7 +494,7 @@
 	@\$(call echo_SU_request)
 	@echo "$VERSION-embedded - jhalfs build" > clfs-release && \\
 	sudo mv clfs-release \$(MOUNT_PT)/etc
-	@sudo make ROOT
+	@sudo make BREAKPOINT=\$(BREAKPOINT) ROOT
 	@touch \$@
 
 

Modified: jhalfs/trunk/HLFS/master.sh
===================================================================
--- jhalfs/trunk/HLFS/master.sh	2007-03-18 09:46:24 UTC (rev 3333)
+++ jhalfs/trunk/HLFS/master.sh	2007-03-18 10:14:04 UTC (rev 3334)
@@ -109,10 +109,8 @@
 	@\$(call echo_message, Building)
 	@mkdir \$(MOUNT_PT)/tools && \\
 	rm -f /tools && \\
-	ln -s \$(MOUNT_PT)/tools / && \\
-	touch \$@ && \\
-	echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
-	echo --------------------------------------------------------------------------------\$(WHITE)
+	ln -s \$(MOUNT_PT)/tools /
+	@\$(call housekeeping)
 
 021-addinguser:  020-creatingtoolsdir
 	@\$(call echo_message, Building)
@@ -124,10 +122,8 @@
 	fi;
 	@chown \$(LUSER) \$(MOUNT_PT)/tools && \\
 	chmod -R a+wt \$(MOUNT_PT)/\$(SCRIPT_ROOT) && \\
-	chmod a+wt \$(SRCSDIR) && \\
-	touch \$@ && \\
-	echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
-	echo --------------------------------------------------------------------------------\$(WHITE)
+	chmod a+wt \$(SRCSDIR)
+	@\$(call housekeeping)
 
 022-settingenvironment:  021-addinguser
 	@\$(call echo_message, Building)
@@ -151,10 +147,8 @@
 	chown \$(LUSER):\$(LGROUP) /home/\$(LUSER)/.bashrc && \\
 	chmod -R a+wt \$(MOUNT_PT) && \\
 	touch envars && \\
-	chown \$(LUSER) envars && \\
-	touch \$@ && \\
-	echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
-	echo --------------------------------------------------------------------------------\$(WHITE)
+	chown \$(LUSER) envars
+	@\$(call housekeeping)
 EOF
 ) >> $MKFILE.tmp
   chapter3=" 020-creatingtoolsdir 021-addinguser 022-settingenvironment"
@@ -546,12 +540,12 @@
 
 mk_SETUP:
 	@\$(call echo_SU_request)
-	@sudo make SETUP
+	@sudo make BREAKPOINT=\$(BREAKPOINT) SETUP
 	@touch \$@
 
 mk_LUSER: mk_SETUP
 	@\$(call echo_SULUSER_request)
-	@(sudo \$(SU_LUSER) "source .bashrc && cd \$(MOUNT_PT)/\$(SCRIPT_ROOT) && make LUSER" )
+	@(sudo \$(SU_LUSER) "source .bashrc && cd \$(MOUNT_PT)/\$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) LUSER" )
 	@sudo make restore-luser-env
 	@touch \$@
 
@@ -567,19 +561,19 @@
 	  sudo chown -R 0:0 \$(MOUNT_PT)/dev;
 	fi;
 	@\$(call echo_CHROOT_request)
-	@( sudo \$(CHROOT1) "cd \$(SCRIPT_ROOT) && make CHROOT")
+	@( sudo \$(CHROOT1) "cd \$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) CHROOT")
 	@touch \$@
 
 mk_BOOT: mk_CHROOT
 	@\$(call echo_CHROOT_request)
-	@( sudo \$(CHROOT2) "cd \$(SCRIPT_ROOT) && make BOOT")
+	@( sudo \$(CHROOT2) "cd \$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) BOOT")
 	@touch \$@
 
 mk_CUSTOM_TOOLS: create-sbu_du-report
 	@if [ "\$(ADD_CUSTOM_TOOLS)" = "y" ]; then \\
 	  \$(call sh_echo_PHASE,Building CUSTOM_TOOLS); \\
 	  sudo mkdir -p ${BUILDDIR}${TRACKING_DIR}; \\
-	  (sudo \$(CHROOT2) "cd \$(SCRIPT_ROOT) && make CUSTOM_TOOLS"); \\
+	  (sudo \$(CHROOT2) "cd \$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) CUSTOM_TOOLS"); \\
 	fi;
 	@touch \$@
 
@@ -587,7 +581,7 @@
 	@if [ "\$(ADD_BLFS_TOOLS)" = "y" ]; then \\
 	  \$(call sh_echo_PHASE,Building BLFS_TOOL); \\
 	  sudo mkdir -p $BUILDDIR$TRACKING_DIR; \\
-	  (sudo \$(CHROOT2) "cd \$(SCRIPT_ROOT) && make BLFS_TOOL"); \\
+	  (sudo \$(CHROOT2) "cd \$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) BLFS_TOOL"); \\
 	fi;
 	@touch \$@
 

Modified: jhalfs/trunk/LFS/master.sh
===================================================================
--- jhalfs/trunk/LFS/master.sh	2007-03-18 09:46:24 UTC (rev 3333)
+++ jhalfs/trunk/LFS/master.sh	2007-03-18 10:14:04 UTC (rev 3334)
@@ -24,10 +24,8 @@
 	@\$(call echo_message, Building)
 	@mkdir \$(MOUNT_PT)/tools && \\
 	rm -f /tools && \\
-	ln -s \$(MOUNT_PT)/tools / && \\
-	touch \$@ && \\
-	echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
-	echo --------------------------------------------------------------------------------\$(WHITE)
+	ln -s \$(MOUNT_PT)/tools /
+	@\$(call housekeeping)
 
 021-addinguser:  020-creatingtoolsdir
 	@\$(call echo_message, Building)
@@ -39,10 +37,8 @@
 	fi;
 	@chown \$(LUSER) \$(MOUNT_PT)/tools && \\
 	chmod -R a+wt \$(MOUNT_PT)/\$(SCRIPT_ROOT) && \\
-	chmod a+wt \$(SRCSDIR) && \\
-	touch \$@ && \\
-	echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
-	echo --------------------------------------------------------------------------------\$(WHITE)
+	chmod a+wt \$(SRCSDIR)
+	@\$(call housekeeping)
 
 022-settingenvironment:  021-addinguser
 	@\$(call echo_message, Building)
@@ -61,10 +57,8 @@
 	echo "source $JHALFSDIR/envars" >> /home/\$(LUSER)/.bashrc && \\
 	chown \$(LUSER):\$(LGROUP) /home/\$(LUSER)/.bashrc && \\
 	touch envars && \\
-	chown \$(LUSER) envars && \\
-	touch \$@ && \\
-	echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
-	echo --------------------------------------------------------------------------------\$(WHITE)
+	chown \$(LUSER) envars
+	@\$(call housekeeping)
 EOF
 ) > $MKFILE.tmp
 
@@ -424,34 +418,34 @@
 
 mk_SETUP:
 	@\$(call echo_SU_request)
-	@sudo make SETUP
+	@sudo make BREAKPOINT=\$(BREAKPOINT) SETUP
 	@touch \$@
 
 mk_LUSER: mk_SETUP
 	@\$(call echo_SULUSER_request)
-	@( sudo \$(SU_LUSER) "source .bashrc && cd \$(MOUNT_PT)/\$(SCRIPT_ROOT) && make LUSER" )
+	@( sudo \$(SU_LUSER) "source .bashrc && cd \$(MOUNT_PT)/\$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) LUSER" )
 	@sudo make restore-luser-env
 	@touch \$@
 
 mk_SUDO: mk_LUSER
-	@sudo make SUDO
+	@sudo make BREAKPOINT=\$(BREAKPOINT) SUDO
 	@touch \$@
 
 mk_CHROOT: mk_SUDO
 	@\$(call echo_CHROOT_request)
-	@( sudo \$(CHROOT1) "cd \$(SCRIPT_ROOT) && make CHROOT")
+	@( sudo \$(CHROOT1) "cd \$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) CHROOT")
 	@touch \$@
 
 mk_BOOT: mk_CHROOT
 	@\$(call echo_CHROOT_request)
-	@( sudo \$(CHROOT2) "cd \$(SCRIPT_ROOT) && make BOOT")
+	@( sudo \$(CHROOT2) "cd \$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) BOOT")
 	@touch \$@
 
 mk_CUSTOM_TOOLS: create-sbu_du-report
 	@if [ "\$(ADD_CUSTOM_TOOLS)" = "y" ]; then \\
 	  \$(call sh_echo_PHASE,Building CUSTOM_TOOLS); \\
 	  sudo mkdir -p ${BUILDDIR}${TRACKING_DIR}; \\
-	  (sudo \$(CHROOT2) "cd \$(SCRIPT_ROOT) && make CUSTOM_TOOLS"); \\
+	  (sudo \$(CHROOT2) "cd \$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) CUSTOM_TOOLS"); \\
 	fi;
 	@touch \$@
 
@@ -459,7 +453,7 @@
 	@if [ "\$(ADD_BLFS_TOOLS)" = "y" ]; then \\
 	  \$(call sh_echo_PHASE,Building BLFS_TOOL); \\
 	  sudo mkdir -p $BUILDDIR$TRACKING_DIR; \\
-	  (sudo \$(CHROOT2) "cd \$(SCRIPT_ROOT) && make BLFS_TOOL"); \\
+	  (sudo \$(CHROOT2) "cd \$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) BLFS_TOOL"); \\
 	fi;
 	@touch \$@
 
@@ -490,10 +484,8 @@
 	@if [ -f /home/\$(LUSER)/.bash_profile.XXX ]; then \\
 		mv /home/\$(LUSER)/.bash_profile.XXX /home/\$(LUSER)/.bash_profile; \\
 	fi;
-	@chown \$(LUSER):\$(LGROUP) /home/\$(LUSER)/.bash* && \\
-	touch \$@ && \\
-	echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
-	echo --------------------------------------------------------------------------------\$(WHITE)
+	@chown \$(LUSER):\$(LGROUP) /home/\$(LUSER)/.bash*
+	@\$(call housekeeping)
 
 do_housekeeping:
 	@-umount \$(MOUNT_PT)/sys

Modified: jhalfs/trunk/README
===================================================================
--- jhalfs/trunk/README	2007-03-18 09:46:24 UTC (rev 3333)
+++ jhalfs/trunk/README	2007-03-18 10:14:04 UTC (rev 3334)
@@ -261,6 +261,19 @@
        understanding of host/target hardware combination. Please read the book
        carefully and don't skip the easy parts (there are none..)
 
+    Q. "How could I stop the build at a predefined chosen point?"
+    A. Launch the Makefile manually passing the last numbered target to be build
+       as the break point. For example:
+
+          make BREAKPOINT=84-bash
+
+       The build can be stopped also at the end of a top-level build phase by
+       calling directly the appropriate mk_* target. For example:
+
+          make mk_LUSER
+
+       See the Makefile to know the proper target names for that book build.
+
 Authors:
   George Boudreau
   Manuel Canales Esparcia

Modified: jhalfs/trunk/common/makefile-functions
===================================================================
--- jhalfs/trunk/common/makefile-functions	2007-03-18 09:46:24 UTC (rev 3333)
+++ jhalfs/trunk/common/makefile-functions	2007-03-18 10:14:04 UTC (rev 3334)
@@ -129,8 +129,11 @@
   @touch  $@ && \
   sleep .25 && \
   echo  -e "\n" $(BOLD)Target $(BLUE)$@ $(WHITE)$(BOLD)OK && \
-  echo --------------------------------------------------------------------------------$(WHITE)
-
+  echo --------------------------------------------------------------------------------$(WHITE) && \
+  if [ "$(BREAKPOINT)" = "$@" ] ; then \
+     echo $(tab_)$(RED)The build has been stopped at $(BLUE)$@ $(RED)as requested$(WHITE) ; \
+     false ; \
+  fi
 endef
 
 #=======================




More information about the alfs-log mailing list