consolidate a number of Makefile functions
This commit is contained in:
parent
ae08ff1cc0
commit
17cde9842c
1 changed files with 28 additions and 62 deletions
|
@ -1182,15 +1182,15 @@ if [[ "${METHOD}" = "chroot" ]]; then
|
||||||
(
|
(
|
||||||
cat << EOF
|
cat << EOF
|
||||||
|
|
||||||
all: ck_UID mk_SETUP mk_CROSS mk_TEMP mk_SUDO mk_SYSTOOLS mk_FINAL mk_BOOTSCRIPT mk_BOOTABLE
|
all: ck_UID mk_SETUP mk_CROSS mk_SUDO mk_SYSTOOLS
|
||||||
@sudo make do-housekeeping
|
@sudo make do-housekeeping
|
||||||
@\$(call echo_finished,$VERSION)
|
@\$(call echo_finished,$VERSION)
|
||||||
|
|
||||||
ck_UID:
|
ck_UID:
|
||||||
@if [ \`id -u\` = "0" ]; then \\
|
@if [ \`id -u\` = "0" ]; then \\
|
||||||
echo "--------------------------------------------------"; \\
|
echo "+--------------------------------------------------+"; \\
|
||||||
echo "You cannot run this makefile from the root account"; \\
|
echo "|You cannot run this makefile from the root account|"; \\
|
||||||
echo "--------------------------------------------------"; \\
|
echo "+--------------------------------------------------+"; \\
|
||||||
exit 1; \\
|
exit 1; \\
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -1202,17 +1202,11 @@ mk_SETUP:
|
||||||
|
|
||||||
#---------------AS LUSER
|
#---------------AS LUSER
|
||||||
mk_CROSS: mk_SETUP
|
mk_CROSS: mk_SETUP
|
||||||
@\$(call echo_PHASE,Cross Tool)
|
@\$(call echo_PHASE,Cross and Temporary Tools)
|
||||||
@(sudo \$(SU_LUSER) "source .bashrc && cd \$(MOUNT_PT)/\$(SCRIPT_ROOT) && make CROSS" )
|
@(sudo \$(SU_LUSER) "source .bashrc && cd \$(MOUNT_PT)/\$(SCRIPT_ROOT) && make AS_LUSER" )
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
mk_TEMP: mk_CROSS
|
mk_SUDO: mk_CROSS
|
||||||
@\$(call echo_PHASE,Temporary Tools)
|
|
||||||
@(sudo \$(SU_LUSER) "source .bashrc && cd \$(MOUNT_PT)/\$(SCRIPT_ROOT) && make TEMP" )
|
|
||||||
@sudo make restore-luser-env
|
|
||||||
@touch \$@
|
|
||||||
|
|
||||||
mk_SUDO: mk_TEMP
|
|
||||||
@sudo make SUDO
|
@sudo make SUDO
|
||||||
@touch \$@
|
@touch \$@
|
||||||
#
|
#
|
||||||
|
@ -1231,25 +1225,16 @@ mk_SYSTOOLS: mk_SUDO
|
||||||
fi;
|
fi;
|
||||||
@sudo sed -e 's|^ln -sv |ln -svf |' -i \$(CMDSDIR)/chroot/082-createfiles
|
@sudo sed -e 's|^ln -sv |ln -svf |' -i \$(CMDSDIR)/chroot/082-createfiles
|
||||||
@\$(call echo_CHROOT_request)
|
@\$(call echo_CHROOT_request)
|
||||||
@\$(call echo_PHASE, Chroot systools)
|
@\$(call echo_PHASE, CHROOT JAIL )
|
||||||
@( sudo \$(CHROOT1) "cd \$(SCRIPT_ROOT) && make SYSTOOLS")
|
@( sudo \$(CHROOT1) "cd \$(SCRIPT_ROOT) && make CHROOT_JAIL")
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
mk_FINAL: mk_SYSTOOLS
|
|
||||||
@\$(call echo_PHASE,Final System)
|
|
||||||
@( sudo \$(CHROOT1) "cd \$(SCRIPT_ROOT) && make FINAL")
|
|
||||||
@touch \$@
|
|
||||||
|
|
||||||
mk_BOOTSCRIPT: mk_FINAL
|
|
||||||
@\$(call echo_PHASE,Bootscript)
|
|
||||||
@\$(call echo_CHROOT_request)
|
|
||||||
@( sudo \$(CHROOT1) "cd \$(SCRIPT_ROOT) && make BOOTSCRIPT")
|
|
||||||
@touch \$@
|
|
||||||
|
|
||||||
mk_BOOTABLE: mk_BOOTSCRIPT
|
SETUP: $host_prep
|
||||||
@\$(call echo_PHASE, Make bootable )
|
AS_LUSER: $cross_tools $temptools
|
||||||
@( sudo \$(CHROOT1) "cd \$(SCRIPT_ROOT) && make BOOTABLE")
|
SUDO: $orphan_scripts
|
||||||
@touch \$@
|
CHROOT_JAIL: ${chroottools}${boottools} $testsuitetools $basicsystem $bootscripttools $bootabletools
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
) >> $MKFILE
|
) >> $MKFILE
|
||||||
|
@ -1261,19 +1246,23 @@ if [[ "${METHOD}" = "boot" ]]; then
|
||||||
(
|
(
|
||||||
cat << EOF
|
cat << EOF
|
||||||
|
|
||||||
all: ck_UID mk_SETUP mk_CROSS mk_TEMP mk_SYSTOOLS mk_SUDO
|
all: ck_UID mk_SETUP mk_CROSS mk_SUDO
|
||||||
@sudo make restore-luser-env
|
@sudo make restore-luser-env
|
||||||
@\$(call echo_boot_finished,$VERSION)
|
@\$(call echo_boot_finished,$VERSION)
|
||||||
|
|
||||||
makesys: mk_FINAL mk_BOOTSCRIPT mk_BOOTABLE
|
makesys: mk_FINAL
|
||||||
@\$(call echo_finished,$VERSION)
|
@\$(call echo_finished,$VERSION)
|
||||||
|
|
||||||
|
|
||||||
ck_UID:
|
ck_UID:
|
||||||
@if [ \`id -u\` = "0" ]; then \\
|
@if [ \`id -u\` = "0" ]; then \\
|
||||||
echo "--------------------------------------------------"; \\
|
echo "+--------------------------------------------------+"; \\
|
||||||
echo "You cannot run this makefile from the root account"; \\
|
echo "|You cannot run this makefile from the root account|"; \\
|
||||||
echo "--------------------------------------------------"; \\
|
echo "|However, if this is the boot environment |"; \\
|
||||||
|
echo "| the command you are looking for is |"; \\
|
||||||
|
echo "| make makesys |"; \\
|
||||||
|
echo "| to finish off the build |"; \\
|
||||||
|
echo "+--------------------------------------------------+"; \\
|
||||||
exit 1; \\
|
exit 1; \\
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -1288,17 +1277,7 @@ mk_SETUP:
|
||||||
|
|
||||||
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 CROSS" )
|
@(sudo \$(SU_LUSER) "source .bashrc && cd \$(MOUNT_PT)/\$(SCRIPT_ROOT) && make AS_LUSER" )
|
||||||
@touch \$@
|
|
||||||
|
|
||||||
mk_TEMP: mk_CROSS
|
|
||||||
@\$(call echo_PHASE,Temporary Tools)
|
|
||||||
@(sudo \$(SU_LUSER) "source .bashrc && cd \$(MOUNT_PT)/\$(SCRIPT_ROOT) && make TEMP" )
|
|
||||||
@touch \$@
|
|
||||||
|
|
||||||
mk_SYSTOOLS: mk_TEMP
|
|
||||||
@\$(call echo_PHASE,Minimal Boot system)
|
|
||||||
@(sudo \$(SU_LUSER) "source .bashrc && cd \$(MOUNT_PT)/\$(SCRIPT_ROOT) && make SYSTOOLS" )
|
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
mk_SUDO: mk_SYSTOOLS
|
mk_SUDO: mk_SYSTOOLS
|
||||||
|
@ -1309,18 +1288,13 @@ mk_SUDO: mk_SYSTOOLS
|
||||||
|
|
||||||
mk_FINAL:
|
mk_FINAL:
|
||||||
@\$(call echo_PHASE,Final System)
|
@\$(call echo_PHASE,Final System)
|
||||||
@( make FINAL )
|
@( make AS_ROOT )
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
mk_BOOTSCRIPT: mk_FINAL
|
SETUP: $host_prep
|
||||||
@\$(call echo_PHASE,Bootscript)
|
AS_LUSER: $cross_tools $temptools ${chroottools}${boottools}
|
||||||
@( make BOOTSCRIPT )
|
SUDO: $orphan_scripts
|
||||||
@touch \$@
|
AS_ROOT: $testsuitetools $basicsystem $bootscripttools $bootabletools
|
||||||
|
|
||||||
mk_BOOTABLE: mk_BOOTSCRIPT
|
|
||||||
@\$(call echo_PHASE,Making Bootable)
|
|
||||||
@( make BOOTABLE )
|
|
||||||
@touch \$@
|
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
) >> $MKFILE
|
) >> $MKFILE
|
||||||
|
@ -1329,14 +1303,6 @@ fi
|
||||||
(
|
(
|
||||||
cat << EOF
|
cat << EOF
|
||||||
|
|
||||||
SETUP: $host_prep
|
|
||||||
CROSS: $cross_tools
|
|
||||||
TEMP: $temptools
|
|
||||||
SUDO: $orphan_scripts
|
|
||||||
SYSTOOLS: ${chroottools}${boottools}
|
|
||||||
FINAL: $testsuitetools $basicsystem
|
|
||||||
BOOTSCRIPT: $bootscripttools
|
|
||||||
BOOTABLE: $bootabletools
|
|
||||||
|
|
||||||
restart:
|
restart:
|
||||||
@echo "This feature does not exist for the CLFS makefile. (yet)"
|
@echo "This feature does not exist for the CLFS makefile. (yet)"
|
||||||
|
|
Reference in a new issue