Reimplemented support for partial builds.
This commit is contained in:
parent
b0ba1f0652
commit
dbcdfd7f69
7 changed files with 82 additions and 108 deletions
|
@ -20,19 +20,15 @@ cat << EOF
|
||||||
@\$(call echo_message, Building)
|
@\$(call echo_message, Building)
|
||||||
@mkdir \$(MOUNT_PT)/tools && \\
|
@mkdir \$(MOUNT_PT)/tools && \\
|
||||||
rm -f /tools && \\
|
rm -f /tools && \\
|
||||||
ln -s \$(MOUNT_PT)/tools / && \\
|
ln -s \$(MOUNT_PT)/tools /
|
||||||
touch \$@ && \\
|
@\$(call housekeeping)
|
||||||
echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
|
|
||||||
echo --------------------------------------------------------------------------------\$(WHITE)
|
|
||||||
|
|
||||||
024-creatingcrossdir: 023-creatingtoolsdir
|
024-creatingcrossdir: 023-creatingtoolsdir
|
||||||
@\$(call echo_message, Building)
|
@\$(call echo_message, Building)
|
||||||
@mkdir -v \$(MOUNT_PT)/cross-tools && \\
|
@mkdir -v \$(MOUNT_PT)/cross-tools && \\
|
||||||
rm -f /cross-tools && \\
|
rm -f /cross-tools && \\
|
||||||
ln -s \$(MOUNT_PT)/cross-tools / && \\
|
ln -s \$(MOUNT_PT)/cross-tools /
|
||||||
touch \$@ && \\
|
@\$(call housekeeping)
|
||||||
echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
|
|
||||||
echo --------------------------------------------------------------------------------\$(WHITE)
|
|
||||||
|
|
||||||
025-addinguser: 024-creatingcrossdir
|
025-addinguser: 024-creatingcrossdir
|
||||||
@\$(call echo_message, Building)
|
@\$(call echo_message, Building)
|
||||||
|
@ -45,10 +41,8 @@ cat << EOF
|
||||||
@chown \$(LUSER) \$(MOUNT_PT)/tools && \\
|
@chown \$(LUSER) \$(MOUNT_PT)/tools && \\
|
||||||
chown \$(LUSER) \$(MOUNT_PT)/cross-tools && \\
|
chown \$(LUSER) \$(MOUNT_PT)/cross-tools && \\
|
||||||
chmod -R a+wt \$(MOUNT_PT)/\$(SCRIPT_ROOT) && \\
|
chmod -R a+wt \$(MOUNT_PT)/\$(SCRIPT_ROOT) && \\
|
||||||
chmod a+wt \$(SRCSDIR) && \\
|
chmod a+wt \$(SRCSDIR)
|
||||||
touch \$@ && \\
|
@\$(call housekeeping)
|
||||||
echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
|
|
||||||
echo --------------------------------------------------------------------------------\$(WHITE)
|
|
||||||
|
|
||||||
026-settingenvironment: 025-addinguser
|
026-settingenvironment: 025-addinguser
|
||||||
@\$(call echo_message, Building)
|
@\$(call echo_message, Building)
|
||||||
|
@ -75,10 +69,8 @@ cat << EOF
|
||||||
@chown \$(LUSER):\$(LGROUP) /home/\$(LUSER)/.bashrc && \\
|
@chown \$(LUSER):\$(LGROUP) /home/\$(LUSER)/.bashrc && \\
|
||||||
touch envars && \\
|
touch envars && \\
|
||||||
chmod -R a+wt \$(MOUNT_PT) && \\
|
chmod -R a+wt \$(MOUNT_PT) && \\
|
||||||
chown -R \$(LUSER) \$(MOUNT_PT)/\$(SCRIPT_ROOT) && \\
|
chown -R \$(LUSER) \$(MOUNT_PT)/\$(SCRIPT_ROOT)
|
||||||
touch \$@ && \\
|
@\$(call housekeeping)
|
||||||
echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
|
|
||||||
echo --------------------------------------------------------------------------------\$(WHITE)
|
|
||||||
EOF
|
EOF
|
||||||
) >> $MKFILE.tmp
|
) >> $MKFILE.tmp
|
||||||
host_prep=" 023-creatingtoolsdir 024-creatingcrossdir 026-settingenvironment"
|
host_prep=" 023-creatingtoolsdir 024-creatingcrossdir 026-settingenvironment"
|
||||||
|
@ -782,32 +774,32 @@ ck_UID:
|
||||||
#---------------AS ROOT
|
#---------------AS ROOT
|
||||||
mk_SETUP:
|
mk_SETUP:
|
||||||
@\$(call echo_SU_request)
|
@\$(call echo_SU_request)
|
||||||
@sudo make SETUP
|
@sudo make make BREAKPOINT=\$(BREAKPOINT) SETUP
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
#---------------AS LUSER
|
#---------------AS LUSER
|
||||||
mk_CROSS: mk_SETUP
|
mk_CROSS: mk_SETUP
|
||||||
@\$(call echo_PHASE,Cross and Temporary Tools)
|
@\$(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
|
@sudo make restore-luser-env
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
mk_SUDO: mk_CROSS
|
mk_SUDO: mk_CROSS
|
||||||
@sudo make SUDO
|
@sudo make make BREAKPOINT=\$(BREAKPOINT) SUDO
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
#---------------CHROOT JAIL
|
#---------------CHROOT JAIL
|
||||||
mk_SYSTOOLS: mk_SUDO
|
mk_SYSTOOLS: mk_SUDO
|
||||||
@\$(call echo_CHROOT_request)
|
@\$(call echo_CHROOT_request)
|
||||||
@\$(call echo_PHASE, CHROOT JAIL )
|
@\$(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 \$@
|
@touch \$@
|
||||||
|
|
||||||
mk_CUSTOM_TOOLS: create-sbu_du-report
|
mk_CUSTOM_TOOLS: create-sbu_du-report
|
||||||
@if [ "\$(ADD_CUSTOM_TOOLS)" = "y" ]; then \\
|
@if [ "\$(ADD_CUSTOM_TOOLS)" = "y" ]; then \\
|
||||||
\$(call sh_echo_PHASE,Building CUSTOM_TOOLS); \\
|
\$(call sh_echo_PHASE,Building CUSTOM_TOOLS); \\
|
||||||
sudo mkdir -p ${BUILDDIR}${TRACKING_DIR}; \\
|
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;
|
fi;
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
|
@ -815,7 +807,7 @@ mk_BLFS_TOOL: mk_CUSTOM_TOOLS
|
||||||
@if [ "\$(ADD_BLFS_TOOLS)" = "y" ]; then \\
|
@if [ "\$(ADD_BLFS_TOOLS)" = "y" ]; then \\
|
||||||
\$(call sh_echo_PHASE,Building BLFS_TOOL); \\
|
\$(call sh_echo_PHASE,Building BLFS_TOOL); \\
|
||||||
sudo mkdir -p $BUILDDIR$TRACKING_DIR; \\
|
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;
|
fi;
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
|
@ -885,32 +877,32 @@ ck_UID:
|
||||||
|
|
||||||
mk_SETUP:
|
mk_SETUP:
|
||||||
@\$(call echo_SU_request)
|
@\$(call echo_SU_request)
|
||||||
@sudo make SETUP
|
@sudo make make BREAKPOINT=\$(BREAKPOINT) SETUP
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
#---------------AS LUSER
|
#---------------AS LUSER
|
||||||
|
|
||||||
mk_CROSS: mk_SETUP
|
mk_CROSS: mk_SETUP
|
||||||
@\$(call echo_PHASE,Cross Tool)
|
@\$(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 \$@
|
@touch \$@
|
||||||
|
|
||||||
mk_SUDO: mk_CROSS
|
mk_SUDO: mk_CROSS
|
||||||
@sudo make SUDO
|
@sudo make make BREAKPOINT=\$(BREAKPOINT) SUDO
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
#---------------AS ROOT
|
#---------------AS ROOT
|
||||||
|
|
||||||
mk_FINAL:
|
mk_FINAL:
|
||||||
@\$(call echo_PHASE,Final System)
|
@\$(call echo_PHASE,Final System)
|
||||||
@( source /root/.bash_profile && make AS_ROOT )
|
@( source /root/.bash_profile && make make BREAKPOINT=\$(BREAKPOINT) AS_ROOT )
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
mk_CUSTOM_TOOLS: mk_FINAL
|
mk_CUSTOM_TOOLS: mk_FINAL
|
||||||
@if [ "\$(ADD_CUSTOM_TOOLS)" = "y" ]; then \\
|
@if [ "\$(ADD_CUSTOM_TOOLS)" = "y" ]; then \\
|
||||||
\$(call sh_echo_PHASE,Building CUSTOM_TOOLS); \\
|
\$(call sh_echo_PHASE,Building CUSTOM_TOOLS); \\
|
||||||
mkdir -p ${TRACKING_DIR}; \\
|
mkdir -p ${TRACKING_DIR}; \\
|
||||||
( source /root/.bash_profile && make CUSTOM_TOOLS ); \\
|
( source /root/.bash_profile && make make BREAKPOINT=\$(BREAKPOINT) CUSTOM_TOOLS ); \\
|
||||||
fi;
|
fi;
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
|
@ -918,7 +910,7 @@ mk_BLFS_TOOL: mk_CUSTOM_TOOLS
|
||||||
@if [ "\$(ADD_BLFS_TOOLS)" = "y" ]; then \\
|
@if [ "\$(ADD_BLFS_TOOLS)" = "y" ]; then \\
|
||||||
\$(call sh_echo_PHASE,Building BLFS_TOOL); \\
|
\$(call sh_echo_PHASE,Building BLFS_TOOL); \\
|
||||||
mkdir -p $TRACKING_DIR; \\
|
mkdir -p $TRACKING_DIR; \\
|
||||||
( source /root/.bash_profile && make BLFS_TOOL ); \\
|
( source /root/.bash_profile && make make BREAKPOINT=\$(BREAKPOINT) BLFS_TOOL ); \\
|
||||||
fi
|
fi
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
|
|
|
@ -26,9 +26,7 @@ cat << EOF
|
||||||
else \\
|
else \\
|
||||||
touch luser-exist; \\
|
touch luser-exist; \\
|
||||||
fi;
|
fi;
|
||||||
@touch \$@ && \\
|
@\$(call housekeeping)
|
||||||
echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
|
|
||||||
echo --------------------------------------------------------------------------------\$(WHITE)
|
|
||||||
|
|
||||||
026-settingenvironment: 025-addinguser
|
026-settingenvironment: 025-addinguser
|
||||||
@\$(call echo_message, Building)
|
@\$(call echo_message, Building)
|
||||||
|
@ -54,9 +52,7 @@ cat << EOF
|
||||||
@chown \$(LUSER):\$(LGROUP) /home/\$(LUSER)/.bashrc && \\
|
@chown \$(LUSER):\$(LGROUP) /home/\$(LUSER)/.bashrc && \\
|
||||||
touch envars && \\
|
touch envars && \\
|
||||||
chown \$(LUSER):\$(LGROUP) envars
|
chown \$(LUSER):\$(LGROUP) envars
|
||||||
@touch \$@ && \\
|
@\$(call housekeeping)
|
||||||
echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
|
|
||||||
echo --------------------------------------------------------------------------------\$(WHITE)
|
|
||||||
|
|
||||||
027-create-directories: 026-settingenvironment
|
027-create-directories: 026-settingenvironment
|
||||||
@\$(call echo_message, Building)
|
@\$(call echo_message, Building)
|
||||||
|
@ -74,10 +70,7 @@ cat << EOF
|
||||||
@for dir in \$(MOUNT_PT)/usr{,/local}; do \\
|
@for dir in \$(MOUNT_PT)/usr{,/local}; do \\
|
||||||
ln -s share/{man,doc,info} \$\$dir ; \\
|
ln -s share/{man,doc,info} \$\$dir ; \\
|
||||||
done
|
done
|
||||||
|
@\$(call housekeeping)
|
||||||
@touch \$@ && \\
|
|
||||||
echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
|
|
||||||
echo --------------------------------------------------------------------------------\$(WHITE)
|
|
||||||
|
|
||||||
028-creating-sysfile: 027-create-directories
|
028-creating-sysfile: 027-create-directories
|
||||||
@\$(call echo_message, Building)
|
@\$(call echo_message, Building)
|
||||||
|
@ -105,10 +98,7 @@ cat << EOF
|
||||||
@chmod 664 \$(MOUNT_PT)/var/run/utmp \$(MOUNT_PT)/var/log/lastlog
|
@chmod 664 \$(MOUNT_PT)/var/run/utmp \$(MOUNT_PT)/var/log/lastlog
|
||||||
@chown -R \$(LUSER) \$(MOUNT_PT) && \\
|
@chown -R \$(LUSER) \$(MOUNT_PT) && \\
|
||||||
chmod -R a+wt \$(MOUNT_PT)/\$(SCRIPT_ROOT)
|
chmod -R a+wt \$(MOUNT_PT)/\$(SCRIPT_ROOT)
|
||||||
|
@\$(call housekeeping)
|
||||||
@touch \$@ && \\
|
|
||||||
echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
|
|
||||||
echo --------------------------------------------------------------------------------\$(WHITE)
|
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
) >> $MKFILE.tmp
|
) >> $MKFILE.tmp
|
||||||
|
@ -437,19 +427,19 @@ ck_UID:
|
||||||
|
|
||||||
mk_SETUP:
|
mk_SETUP:
|
||||||
@\$(call echo_SU_request)
|
@\$(call echo_SU_request)
|
||||||
@sudo make SETUP
|
@sudo make BREAKPOINT=\$(BREAKPOINT) SETUP
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
mk_LUSER: mk_SETUP
|
mk_LUSER: mk_SETUP
|
||||||
@\$(call echo_SULUSER_request)
|
@\$(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 \$@
|
@touch \$@
|
||||||
|
|
||||||
mk_CUSTOM_TOOLS: create-sbu_du-report
|
mk_CUSTOM_TOOLS: create-sbu_du-report
|
||||||
@if [ "\$(ADD_CUSTOM_TOOLS)" = "y" ]; then \\
|
@if [ "\$(ADD_CUSTOM_TOOLS)" = "y" ]; then \\
|
||||||
\$(call sh_echo_PHASE,Building CUSTOM_TOOLS); \\
|
\$(call sh_echo_PHASE,Building CUSTOM_TOOLS); \\
|
||||||
(sudo \$(SU_LUSER) "mkdir -p $BUILDDIR$TRACKING_DIR"); \\
|
(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;
|
fi;
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
|
@ -457,7 +447,7 @@ mk_BLFS_TOOL: mk_CUSTOM_TOOLS
|
||||||
@if [ "\$(ADD_BLFS_TOOLS)" = "y" ]; then \\
|
@if [ "\$(ADD_BLFS_TOOLS)" = "y" ]; then \\
|
||||||
\$(call sh_echo_PHASE,Building BLFS_TOOL); \\
|
\$(call sh_echo_PHASE,Building BLFS_TOOL); \\
|
||||||
(sudo \$(SU_LUSER) "mkdir -p $BUILDDIR$TRACKING_DIR"); \\
|
(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;
|
fi;
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
|
@ -465,7 +455,7 @@ mk_ROOT: create-sbu_du-report
|
||||||
@\$(call echo_SU_request)
|
@\$(call echo_SU_request)
|
||||||
@echo "$VERSION-sysroot - jhalfs build" > clfs-release && \\
|
@echo "$VERSION-sysroot - jhalfs build" > clfs-release && \\
|
||||||
sudo mv clfs-release \$(MOUNT_PT)/etc
|
sudo mv clfs-release \$(MOUNT_PT)/etc
|
||||||
@sudo make ROOT
|
@sudo make BREAKPOINT=\$(BREAKPOINT) ROOT
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
SETUP: $host_prep
|
SETUP: $host_prep
|
||||||
|
|
|
@ -26,9 +26,7 @@ cat << EOF
|
||||||
else \\
|
else \\
|
||||||
touch luser-exist; \\
|
touch luser-exist; \\
|
||||||
fi;
|
fi;
|
||||||
@touch \$@ && \\
|
@\$(call housekeeping)
|
||||||
echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
|
|
||||||
echo --------------------------------------------------------------------------------\$(WHITE)
|
|
||||||
|
|
||||||
026-settingenvironment: 025-addinguser
|
026-settingenvironment: 025-addinguser
|
||||||
@\$(call echo_message, Building)
|
@\$(call echo_message, Building)
|
||||||
|
@ -56,9 +54,7 @@ cat << EOF
|
||||||
@chown \$(LUSER):\$(LGROUP) /home/\$(LUSER)/.bashrc && \\
|
@chown \$(LUSER):\$(LGROUP) /home/\$(LUSER)/.bashrc && \\
|
||||||
touch envars && \\
|
touch envars && \\
|
||||||
chown \$(LUSER):\$(LGROUP) envars
|
chown \$(LUSER):\$(LGROUP) envars
|
||||||
@touch \$@ && \\
|
@\$(call housekeeping)
|
||||||
echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
|
|
||||||
echo --------------------------------------------------------------------------------\$(WHITE)
|
|
||||||
|
|
||||||
027-create-directories: 026-settingenvironment
|
027-create-directories: 026-settingenvironment
|
||||||
@\$(call echo_message, Building)
|
@\$(call echo_message, Building)
|
||||||
|
@ -76,10 +72,7 @@ cat << EOF
|
||||||
@for dir in \$(MOUNT_PT)/usr{,/local}; do \\
|
@for dir in \$(MOUNT_PT)/usr{,/local}; do \\
|
||||||
ln -s share/{man,doc,info} \$\$dir ; \\
|
ln -s share/{man,doc,info} \$\$dir ; \\
|
||||||
done
|
done
|
||||||
|
@\$(call housekeeping)
|
||||||
@touch \$@ && \\
|
|
||||||
echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
|
|
||||||
echo --------------------------------------------------------------------------------\$(WHITE)
|
|
||||||
|
|
||||||
028-creating-sysfile: 027-create-directories
|
028-creating-sysfile: 027-create-directories
|
||||||
@\$(call echo_message, Building)
|
@\$(call echo_message, Building)
|
||||||
|
@ -107,10 +100,7 @@ cat << EOF
|
||||||
@chmod 664 \$(MOUNT_PT)/var/run/utmp \$(MOUNT_PT)/var/log/lastlog
|
@chmod 664 \$(MOUNT_PT)/var/run/utmp \$(MOUNT_PT)/var/log/lastlog
|
||||||
@chown -R \$(LUSER) \$(MOUNT_PT) && \\
|
@chown -R \$(LUSER) \$(MOUNT_PT) && \\
|
||||||
chmod -R a+wt \$(MOUNT_PT)/\$(SCRIPT_ROOT)
|
chmod -R a+wt \$(MOUNT_PT)/\$(SCRIPT_ROOT)
|
||||||
|
@\$(call housekeeping)
|
||||||
@touch \$@ && \\
|
|
||||||
echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
|
|
||||||
echo --------------------------------------------------------------------------------\$(WHITE)
|
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
) >> $MKFILE.tmp
|
) >> $MKFILE.tmp
|
||||||
|
@ -484,19 +474,19 @@ ck_UID:
|
||||||
|
|
||||||
mk_SETUP:
|
mk_SETUP:
|
||||||
@\$(call echo_SU_request)
|
@\$(call echo_SU_request)
|
||||||
@sudo make SETUP
|
@sudo make BREAKPOINT=\$(BREAKPOINT) SETUP
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
mk_LUSER: mk_SETUP
|
mk_LUSER: mk_SETUP
|
||||||
@\$(call echo_SULUSER_request)
|
@\$(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 \$@
|
@touch \$@
|
||||||
|
|
||||||
mk_CUSTOM_TOOLS: create-sbu_du-report
|
mk_CUSTOM_TOOLS: create-sbu_du-report
|
||||||
@if [ "\$(ADD_CUSTOM_TOOLS)" = "y" ]; then \\
|
@if [ "\$(ADD_CUSTOM_TOOLS)" = "y" ]; then \\
|
||||||
\$(call sh_echo_PHASE,Building CUSTOM_TOOLS); \\
|
\$(call sh_echo_PHASE,Building CUSTOM_TOOLS); \\
|
||||||
(sudo \$(SU_LUSER) "mkdir -p $BUILDDIR$TRACKING_DIR"); \\
|
(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;
|
fi;
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
|
@ -504,7 +494,7 @@ mk_ROOT:
|
||||||
@\$(call echo_SU_request)
|
@\$(call echo_SU_request)
|
||||||
@echo "$VERSION-embedded - jhalfs build" > clfs-release && \\
|
@echo "$VERSION-embedded - jhalfs build" > clfs-release && \\
|
||||||
sudo mv clfs-release \$(MOUNT_PT)/etc
|
sudo mv clfs-release \$(MOUNT_PT)/etc
|
||||||
@sudo make ROOT
|
@sudo make BREAKPOINT=\$(BREAKPOINT) ROOT
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -109,10 +109,8 @@ cat << EOF
|
||||||
@\$(call echo_message, Building)
|
@\$(call echo_message, Building)
|
||||||
@mkdir \$(MOUNT_PT)/tools && \\
|
@mkdir \$(MOUNT_PT)/tools && \\
|
||||||
rm -f /tools && \\
|
rm -f /tools && \\
|
||||||
ln -s \$(MOUNT_PT)/tools / && \\
|
ln -s \$(MOUNT_PT)/tools /
|
||||||
touch \$@ && \\
|
@\$(call housekeeping)
|
||||||
echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
|
|
||||||
echo --------------------------------------------------------------------------------\$(WHITE)
|
|
||||||
|
|
||||||
021-addinguser: 020-creatingtoolsdir
|
021-addinguser: 020-creatingtoolsdir
|
||||||
@\$(call echo_message, Building)
|
@\$(call echo_message, Building)
|
||||||
|
@ -124,10 +122,8 @@ cat << EOF
|
||||||
fi;
|
fi;
|
||||||
@chown \$(LUSER) \$(MOUNT_PT)/tools && \\
|
@chown \$(LUSER) \$(MOUNT_PT)/tools && \\
|
||||||
chmod -R a+wt \$(MOUNT_PT)/\$(SCRIPT_ROOT) && \\
|
chmod -R a+wt \$(MOUNT_PT)/\$(SCRIPT_ROOT) && \\
|
||||||
chmod a+wt \$(SRCSDIR) && \\
|
chmod a+wt \$(SRCSDIR)
|
||||||
touch \$@ && \\
|
@\$(call housekeeping)
|
||||||
echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
|
|
||||||
echo --------------------------------------------------------------------------------\$(WHITE)
|
|
||||||
|
|
||||||
022-settingenvironment: 021-addinguser
|
022-settingenvironment: 021-addinguser
|
||||||
@\$(call echo_message, Building)
|
@\$(call echo_message, Building)
|
||||||
|
@ -151,10 +147,8 @@ cat << EOF
|
||||||
chown \$(LUSER):\$(LGROUP) /home/\$(LUSER)/.bashrc && \\
|
chown \$(LUSER):\$(LGROUP) /home/\$(LUSER)/.bashrc && \\
|
||||||
chmod -R a+wt \$(MOUNT_PT) && \\
|
chmod -R a+wt \$(MOUNT_PT) && \\
|
||||||
touch envars && \\
|
touch envars && \\
|
||||||
chown \$(LUSER) envars && \\
|
chown \$(LUSER) envars
|
||||||
touch \$@ && \\
|
@\$(call housekeeping)
|
||||||
echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
|
|
||||||
echo --------------------------------------------------------------------------------\$(WHITE)
|
|
||||||
EOF
|
EOF
|
||||||
) >> $MKFILE.tmp
|
) >> $MKFILE.tmp
|
||||||
chapter3=" 020-creatingtoolsdir 021-addinguser 022-settingenvironment"
|
chapter3=" 020-creatingtoolsdir 021-addinguser 022-settingenvironment"
|
||||||
|
@ -546,12 +540,12 @@ ck_UID:
|
||||||
|
|
||||||
mk_SETUP:
|
mk_SETUP:
|
||||||
@\$(call echo_SU_request)
|
@\$(call echo_SU_request)
|
||||||
@sudo make SETUP
|
@sudo make BREAKPOINT=\$(BREAKPOINT) SETUP
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
mk_LUSER: mk_SETUP
|
mk_LUSER: mk_SETUP
|
||||||
@\$(call echo_SULUSER_request)
|
@\$(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
|
@sudo make restore-luser-env
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
|
@ -567,19 +561,19 @@ mk_CHROOT: mk_SUDO
|
||||||
sudo chown -R 0:0 \$(MOUNT_PT)/dev;
|
sudo chown -R 0:0 \$(MOUNT_PT)/dev;
|
||||||
fi;
|
fi;
|
||||||
@\$(call echo_CHROOT_request)
|
@\$(call echo_CHROOT_request)
|
||||||
@( sudo \$(CHROOT1) "cd \$(SCRIPT_ROOT) && make CHROOT")
|
@( sudo \$(CHROOT1) "cd \$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) CHROOT")
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
mk_BOOT: mk_CHROOT
|
mk_BOOT: mk_CHROOT
|
||||||
@\$(call echo_CHROOT_request)
|
@\$(call echo_CHROOT_request)
|
||||||
@( sudo \$(CHROOT2) "cd \$(SCRIPT_ROOT) && make BOOT")
|
@( sudo \$(CHROOT2) "cd \$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) BOOT")
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
mk_CUSTOM_TOOLS: create-sbu_du-report
|
mk_CUSTOM_TOOLS: create-sbu_du-report
|
||||||
@if [ "\$(ADD_CUSTOM_TOOLS)" = "y" ]; then \\
|
@if [ "\$(ADD_CUSTOM_TOOLS)" = "y" ]; then \\
|
||||||
\$(call sh_echo_PHASE,Building CUSTOM_TOOLS); \\
|
\$(call sh_echo_PHASE,Building CUSTOM_TOOLS); \\
|
||||||
sudo mkdir -p ${BUILDDIR}${TRACKING_DIR}; \\
|
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;
|
fi;
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
|
@ -587,7 +581,7 @@ mk_BLFS_TOOL: mk_CUSTOM_TOOLS
|
||||||
@if [ "\$(ADD_BLFS_TOOLS)" = "y" ]; then \\
|
@if [ "\$(ADD_BLFS_TOOLS)" = "y" ]; then \\
|
||||||
\$(call sh_echo_PHASE,Building BLFS_TOOL); \\
|
\$(call sh_echo_PHASE,Building BLFS_TOOL); \\
|
||||||
sudo mkdir -p $BUILDDIR$TRACKING_DIR; \\
|
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;
|
fi;
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
|
|
|
@ -24,10 +24,8 @@ chapter4_Makefiles() { #
|
||||||
@\$(call echo_message, Building)
|
@\$(call echo_message, Building)
|
||||||
@mkdir \$(MOUNT_PT)/tools && \\
|
@mkdir \$(MOUNT_PT)/tools && \\
|
||||||
rm -f /tools && \\
|
rm -f /tools && \\
|
||||||
ln -s \$(MOUNT_PT)/tools / && \\
|
ln -s \$(MOUNT_PT)/tools /
|
||||||
touch \$@ && \\
|
@\$(call housekeeping)
|
||||||
echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
|
|
||||||
echo --------------------------------------------------------------------------------\$(WHITE)
|
|
||||||
|
|
||||||
021-addinguser: 020-creatingtoolsdir
|
021-addinguser: 020-creatingtoolsdir
|
||||||
@\$(call echo_message, Building)
|
@\$(call echo_message, Building)
|
||||||
|
@ -39,10 +37,8 @@ chapter4_Makefiles() { #
|
||||||
fi;
|
fi;
|
||||||
@chown \$(LUSER) \$(MOUNT_PT)/tools && \\
|
@chown \$(LUSER) \$(MOUNT_PT)/tools && \\
|
||||||
chmod -R a+wt \$(MOUNT_PT)/\$(SCRIPT_ROOT) && \\
|
chmod -R a+wt \$(MOUNT_PT)/\$(SCRIPT_ROOT) && \\
|
||||||
chmod a+wt \$(SRCSDIR) && \\
|
chmod a+wt \$(SRCSDIR)
|
||||||
touch \$@ && \\
|
@\$(call housekeeping)
|
||||||
echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
|
|
||||||
echo --------------------------------------------------------------------------------\$(WHITE)
|
|
||||||
|
|
||||||
022-settingenvironment: 021-addinguser
|
022-settingenvironment: 021-addinguser
|
||||||
@\$(call echo_message, Building)
|
@\$(call echo_message, Building)
|
||||||
|
@ -61,10 +57,8 @@ chapter4_Makefiles() { #
|
||||||
echo "source $JHALFSDIR/envars" >> /home/\$(LUSER)/.bashrc && \\
|
echo "source $JHALFSDIR/envars" >> /home/\$(LUSER)/.bashrc && \\
|
||||||
chown \$(LUSER):\$(LGROUP) /home/\$(LUSER)/.bashrc && \\
|
chown \$(LUSER):\$(LGROUP) /home/\$(LUSER)/.bashrc && \\
|
||||||
touch envars && \\
|
touch envars && \\
|
||||||
chown \$(LUSER) envars && \\
|
chown \$(LUSER) envars
|
||||||
touch \$@ && \\
|
@\$(call housekeeping)
|
||||||
echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
|
|
||||||
echo --------------------------------------------------------------------------------\$(WHITE)
|
|
||||||
EOF
|
EOF
|
||||||
) > $MKFILE.tmp
|
) > $MKFILE.tmp
|
||||||
|
|
||||||
|
@ -424,34 +418,34 @@ ck_UID:
|
||||||
|
|
||||||
mk_SETUP:
|
mk_SETUP:
|
||||||
@\$(call echo_SU_request)
|
@\$(call echo_SU_request)
|
||||||
@sudo make SETUP
|
@sudo make BREAKPOINT=\$(BREAKPOINT) SETUP
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
mk_LUSER: mk_SETUP
|
mk_LUSER: mk_SETUP
|
||||||
@\$(call echo_SULUSER_request)
|
@\$(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
|
@sudo make restore-luser-env
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
mk_SUDO: mk_LUSER
|
mk_SUDO: mk_LUSER
|
||||||
@sudo make SUDO
|
@sudo make BREAKPOINT=\$(BREAKPOINT) SUDO
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
mk_CHROOT: mk_SUDO
|
mk_CHROOT: mk_SUDO
|
||||||
@\$(call echo_CHROOT_request)
|
@\$(call echo_CHROOT_request)
|
||||||
@( sudo \$(CHROOT1) "cd \$(SCRIPT_ROOT) && make CHROOT")
|
@( sudo \$(CHROOT1) "cd \$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) CHROOT")
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
mk_BOOT: mk_CHROOT
|
mk_BOOT: mk_CHROOT
|
||||||
@\$(call echo_CHROOT_request)
|
@\$(call echo_CHROOT_request)
|
||||||
@( sudo \$(CHROOT2) "cd \$(SCRIPT_ROOT) && make BOOT")
|
@( sudo \$(CHROOT2) "cd \$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) BOOT")
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
mk_CUSTOM_TOOLS: create-sbu_du-report
|
mk_CUSTOM_TOOLS: create-sbu_du-report
|
||||||
@if [ "\$(ADD_CUSTOM_TOOLS)" = "y" ]; then \\
|
@if [ "\$(ADD_CUSTOM_TOOLS)" = "y" ]; then \\
|
||||||
\$(call sh_echo_PHASE,Building CUSTOM_TOOLS); \\
|
\$(call sh_echo_PHASE,Building CUSTOM_TOOLS); \\
|
||||||
sudo mkdir -p ${BUILDDIR}${TRACKING_DIR}; \\
|
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;
|
fi;
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
|
@ -459,7 +453,7 @@ mk_BLFS_TOOL: mk_CUSTOM_TOOLS
|
||||||
@if [ "\$(ADD_BLFS_TOOLS)" = "y" ]; then \\
|
@if [ "\$(ADD_BLFS_TOOLS)" = "y" ]; then \\
|
||||||
\$(call sh_echo_PHASE,Building BLFS_TOOL); \\
|
\$(call sh_echo_PHASE,Building BLFS_TOOL); \\
|
||||||
sudo mkdir -p $BUILDDIR$TRACKING_DIR; \\
|
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;
|
fi;
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
|
@ -490,10 +484,8 @@ restore-luser-env:
|
||||||
@if [ -f /home/\$(LUSER)/.bash_profile.XXX ]; then \\
|
@if [ -f /home/\$(LUSER)/.bash_profile.XXX ]; then \\
|
||||||
mv /home/\$(LUSER)/.bash_profile.XXX /home/\$(LUSER)/.bash_profile; \\
|
mv /home/\$(LUSER)/.bash_profile.XXX /home/\$(LUSER)/.bash_profile; \\
|
||||||
fi;
|
fi;
|
||||||
@chown \$(LUSER):\$(LGROUP) /home/\$(LUSER)/.bash* && \\
|
@chown \$(LUSER):\$(LGROUP) /home/\$(LUSER)/.bash*
|
||||||
touch \$@ && \\
|
@\$(call housekeeping)
|
||||||
echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
|
|
||||||
echo --------------------------------------------------------------------------------\$(WHITE)
|
|
||||||
|
|
||||||
do_housekeeping:
|
do_housekeeping:
|
||||||
@-umount \$(MOUNT_PT)/sys
|
@-umount \$(MOUNT_PT)/sys
|
||||||
|
|
13
README
13
README
|
@ -261,6 +261,19 @@ $Id$
|
||||||
understanding of host/target hardware combination. Please read the book
|
understanding of host/target hardware combination. Please read the book
|
||||||
carefully and don't skip the easy parts (there are none..)
|
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:
|
Authors:
|
||||||
George Boudreau
|
George Boudreau
|
||||||
Manuel Canales Esparcia
|
Manuel Canales Esparcia
|
||||||
|
|
|
@ -129,8 +129,11 @@ define housekeeping
|
||||||
@touch $@ && \
|
@touch $@ && \
|
||||||
sleep .25 && \
|
sleep .25 && \
|
||||||
echo -e "\n" $(BOLD)Target $(BLUE)$@ $(WHITE)$(BOLD)OK && \
|
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
|
endef
|
||||||
|
|
||||||
#=======================
|
#=======================
|
||||||
|
|
Reference in a new issue