Reimplemented support for partial builds.

This commit is contained in:
Manuel Canales Esparcia 2007-03-18 10:14:04 +00:00
parent b0ba1f0652
commit dbcdfd7f69
7 changed files with 82 additions and 108 deletions

View file

@ -20,19 +20,15 @@ cat << EOF
@\$(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 @@ cat << EOF
@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 @@ cat << EOF
@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 @@ ck_UID:
#---------------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 @@ mk_BLFS_TOOL: mk_CUSTOM_TOOLS
@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 @@ ck_UID:
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 @@ mk_BLFS_TOOL: mk_CUSTOM_TOOLS
@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 \$@

View file

@ -26,9 +26,7 @@ cat << EOF
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 @@ cat << EOF
@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,10 +70,7 @@ cat << EOF
@for dir in \$(MOUNT_PT)/usr{,/local}; do \\
ln -s share/{man,doc,info} \$\$dir ; \\
done
@touch \$@ && \\
echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
echo --------------------------------------------------------------------------------\$(WHITE)
@\$(call housekeeping)
028-creating-sysfile: 027-create-directories
@\$(call echo_message, Building)
@ -105,10 +98,7 @@ cat << EOF
@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)
@touch \$@ && \\
echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
echo --------------------------------------------------------------------------------\$(WHITE)
@\$(call housekeeping)
EOF
) >> $MKFILE.tmp
@ -437,19 +427,19 @@ ck_UID:
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 @@ mk_BLFS_TOOL: mk_CUSTOM_TOOLS
@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 @@ mk_ROOT: create-sbu_du-report
@\$(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

View file

@ -26,9 +26,7 @@ cat << EOF
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 @@ cat << EOF
@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,10 +72,7 @@ cat << EOF
@for dir in \$(MOUNT_PT)/usr{,/local}; do \\
ln -s share/{man,doc,info} \$\$dir ; \\
done
@touch \$@ && \\
echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
echo --------------------------------------------------------------------------------\$(WHITE)
@\$(call housekeeping)
028-creating-sysfile: 027-create-directories
@\$(call echo_message, Building)
@ -107,10 +100,7 @@ cat << EOF
@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)
@touch \$@ && \\
echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
echo --------------------------------------------------------------------------------\$(WHITE)
@\$(call housekeeping)
EOF
) >> $MKFILE.tmp
@ -484,19 +474,19 @@ ck_UID:
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 @@ mk_ROOT:
@\$(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 \$@

View file

@ -109,10 +109,8 @@ cat << EOF
@\$(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 @@ cat << EOF
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 @@ cat << EOF
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 @@ ck_UID:
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 @@ mk_CHROOT: mk_SUDO
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 @@ mk_BLFS_TOOL: mk_CUSTOM_TOOLS
@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 \$@

View file

@ -24,10 +24,8 @@ chapter4_Makefiles() { #
@\$(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 @@ chapter4_Makefiles() { #
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 @@ chapter4_Makefiles() { #
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 @@ ck_UID:
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 @@ mk_BLFS_TOOL: mk_CUSTOM_TOOLS
@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 @@ restore-luser-env:
@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

13
README
View file

@ -261,6 +261,19 @@ $Id$
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

View file

@ -129,8 +129,11 @@ define housekeeping
@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
#=======================