Changeset 9c9775f for HLFS/master.sh
- Timestamp:
- 09/19/2007 04:50:48 PM (17 years ago)
- Branches:
- experimental
- Children:
- 3778352
- Parents:
- 0510381
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
HLFS/master.sh
-
Property mode
changed from
100755
to100644
r0510381 r9c9775f 1 #!/bin/ sh1 #!/bin/bash 2 2 set -e # Enable error trapping 3 3 … … 20 20 local remove_existing 21 21 22 tc_phase=`echo $toolchain | sed -e 's@[0-9]\{3\}-@@' -e 's@-toolchain@@' `22 tc_phase=`echo $toolchain | sed -e 's@[0-9]\{3\}-@@' -e 's@-toolchain@@' -e 's,'$N',,'` 23 23 case $tc_phase in 24 24 embryo | \ … … 94 94 echo "${tab_}${GREEN}Processing... ${L_arrow}Chapter3 ( SETUP ) ${R_arrow}" 95 95 96 # Define a few model dependant variables 97 if [[ ${MODEL} = "uclibc" ]]; then 98 TARGET="pc-linux-gnu"; LOADER="ld-uClibc.so.0" 99 else 100 TARGET="pc-linux-gnu"; LOADER="ld-linux.so.2" 101 fi 102 103 # If /home/$LUSER is already present in the host, we asume that the 96 # If $LUSER_HOME is already present in the host, we asume that the 104 97 # hlfs user and group are also presents in the host, and a backup 105 98 # of their bash init files is made. … … 111 104 rm -f /tools && \\ 112 105 ln -s \$(MOUNT_PT)/tools / 113 @if [ ! -d \$(MOUNT_PT)/sources ]; then \\ 114 mkdir \$(MOUNT_PT)/sources; \\ 115 fi; 116 @chmod a+wt \$(MOUNT_PT)/sources && \\ 117 touch \$@ && \\ 118 echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\ 119 echo --------------------------------------------------------------------------------\$(WHITE) 106 @\$(call housekeeping) 120 107 121 108 021-addinguser: 020-creatingtoolsdir 122 109 @\$(call echo_message, Building) 123 @if [ ! -d /home/\$(LUSER) ]; then \\110 @if [ ! -d \$(LUSER_HOME) ]; then \\ 124 111 groupadd \$(LGROUP); \\ 125 112 useradd -s /bin/bash -g \$(LGROUP) -m -k /dev/null \$(LUSER); \\ … … 128 115 fi; 129 116 @chown \$(LUSER) \$(MOUNT_PT)/tools && \\ 130 chown -R \$(LUSER) \$(MOUNT_PT)/\$(SCRIPT_ROOT) && \\ 131 chown \$(LUSER) \$(MOUNT_PT)/sources && \\ 132 touch \$@ && \\ 133 echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\ 134 echo --------------------------------------------------------------------------------\$(WHITE) 117 chmod -R a+wt \$(MOUNT_PT)/\$(SCRIPT_ROOT) && \\ 118 chmod a+wt \$(SRCSDIR) 119 @\$(call housekeeping) 135 120 136 121 022-settingenvironment: 021-addinguser 137 122 @\$(call echo_message, Building) 138 @if [ -f /home/\$(LUSER)/.bashrc -a ! -f /home/\$(LUSER)/.bashrc.XXX ]; then \\ 139 mv /home/\$(LUSER)/.bashrc /home/\$(LUSER)/.bashrc.XXX; \\ 140 fi; 141 @if [ -f /home/\$(LUSER)/.bash_profile -a ! -f /home/\$(LUSER)/.bash_profile.XXX ]; then \\ 142 mv /home/\$(LUSER)/.bash_profile /home/\$(LUSER)/.bash_profile.XXX; \\ 143 fi; 144 @echo "set +h" > /home/\$(LUSER)/.bashrc && \\ 145 echo "umask 022" >> /home/\$(LUSER)/.bashrc && \\ 146 echo "HLFS=\$(MOUNT_PT)" >> /home/\$(LUSER)/.bashrc && \\ 147 echo "LC_ALL=POSIX" >> /home/\$(LUSER)/.bashrc && \\ 148 echo "PATH=/tools/bin:/bin:/usr/bin" >> /home/\$(LUSER)/.bashrc && \\ 149 echo "export HLFS LC_ALL PATH" >> /home/\$(LUSER)/.bashrc && \\ 150 echo "" >> /home/\$(LUSER)/.bashrc && \\ 151 echo "target=$(uname -m)-${TARGET}" >> /home/\$(LUSER)/.bashrc && \\ 152 echo "ldso=/tools/lib/${LOADER}" >> /home/\$(LUSER)/.bashrc && \\ 153 echo "export target ldso" >> /home/\$(LUSER)/.bashrc && \\ 154 echo "source $JHALFSDIR/envars" >> /home/\$(LUSER)/.bashrc && \\ 155 chown \$(LUSER):\$(LGROUP) /home/\$(LUSER)/.bashrc && \\ 123 @if [ -f \$(LUSER_HOME)/.bashrc -a ! -f \$(LUSER_HOME)/.bashrc.XXX ]; then \\ 124 mv \$(LUSER_HOME)/.bashrc \$(LUSER_HOME)/.bashrc.XXX; \\ 125 fi; 126 @if [ -f \$(LUSER_HOME)/.bash_profile -a ! -f \$(LUSER_HOME)/.bash_profile.XXX ]; then \\ 127 mv \$(LUSER_HOME)/.bash_profile \$(LUSER_HOME)/.bash_profile.XXX; \\ 128 fi; 129 @echo "set +h" > \$(LUSER_HOME)/.bashrc && \\ 130 echo "umask 022" >> \$(LUSER_HOME)/.bashrc && \\ 131 echo "HLFS=\$(MOUNT_PT)" >> \$(LUSER_HOME)/.bashrc && \\ 132 echo "LC_ALL=POSIX" >> \$(LUSER_HOME)/.bashrc && \\ 133 echo "PATH=/tools/bin:/bin:/usr/bin" >> \$(LUSER_HOME)/.bashrc && \\ 134 echo "export HLFS LC_ALL PATH" >> \$(LUSER_HOME)/.bashrc && \\ 135 echo "" >> \$(LUSER_HOME)/.bashrc && \\ 136 echo "source $JHALFSDIR/envars" >> \$(LUSER_HOME)/.bashrc && \\ 137 chown \$(LUSER):\$(LGROUP) \$(LUSER_HOME)/.bashrc && \\ 156 138 chmod -R a+wt \$(MOUNT_PT) && \\ 157 139 touch envars && \\ 158 chown \$(LUSER) envars && \\ 159 touch \$@ && \\ 160 echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\ 161 echo --------------------------------------------------------------------------------\$(WHITE) 140 chown \$(LUSER) envars 141 @\$(call housekeeping) 162 142 EOF 163 143 ) >> $MKFILE.tmp … … 183 163 *expect* ) [[ "$TEST" = "0" ]] && continue; ;; 184 164 *dejagnu* ) [[ "$TEST" = "0" ]] && continue; ;; 185 # Nothing interestin in this script186 *introduction* ) continue ;;187 165 # Test if the stripping phase must be skipped 188 166 *stripping* ) [[ "$STRIP" = "n" ]] && continue ;; … … 195 173 196 174 # Grab the name of the target 197 name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@' `175 name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@' -e 's@-pass[0-9]\{1\}@@'` 198 176 199 177 # Adjust 'name' … … 225 203 LUSER_wrt_target "$this_script" "$PREV" 226 204 # Find the version of the command files, if it corresponds with the building of 227 # a specific package 228 pkg_tarball=$(get_package_tarball_name $name) 205 # a specific package. Fix GCC tarball name for 2.4-branch. 206 case $name in 207 gcc ) pkg_tarball=$(get_package_tarball_name gcc-core) ;; 208 * ) pkg_tarball=$(get_package_tarball_name $name) ;; 209 esac 229 210 # If $pkg_tarball isn't empty, we've got a package... 230 211 if [ "$pkg_tarball" != "" ] ; then … … 263 244 local this_script 264 245 # Set envars and scripts for iteration targets 265 LOGS="" # Start with an empty global LOGS envar266 246 if [[ -z "$1" ]] ; then 267 247 local N="" … … 274 254 # Overwrite existing symlinks, files, and dirs 275 255 sed -e 's/ln -s /ln -sf /g' \ 276 -e 's/^mv /&-f/g' -i ${script} 256 -e 's/^mv /&-f /g' \ 257 -e 's/mkdir -v/&p/g' -i ${script} 258 # Rename the scripts 259 mv ${script} ${script}$N 277 260 done 278 261 # Remove Bzip2 binaries before make install 279 sed -e 's@make install@rm -vf /usr/bin/bz*\n&@' -i chapter06$N/*-bzip2 262 sed -e 's@make install@rm -vf /usr/bin/bz*\n&@' -i chapter06$N/*-bzip2$N 280 263 # Fix how Module-Init-Tools do the install target 281 sed -e 's@make install@make INSTALL=install install@' -i chapter06$N/*-module-init-tools 282 # Delete *old Readline libraries just after make install 283 sed -e 's@make install@&\nrm -v /lib/lib{history,readline}*old@' -i chapter06$N/*-readline 264 sed -e 's@make install@make INSTALL=install install@' -i chapter06$N/*-module-init-tools$N 284 265 # Don't readd already existing groups 285 sed -e '/groupadd/d' -i chapter06$N/*-udev 266 sed -e '/groupadd/d' -i chapter06$N/*-udev$N 286 267 fi 287 268 … … 299 280 # Test if the stripping phase must be skipped 300 281 *-stripping* ) [[ "$STRIP" = "n" ]] && continue ;; 282 # Skip linux-headers in iterative builds 283 *linux-headers*) [[ -n "$N" ]] && continue ;; 301 284 esac 302 285 303 286 # Grab the name of the target 304 name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@' `287 name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@' -e 's,'$N',,'` 305 288 306 289 case $name in … … 309 292 310 293 # Find the version of the command files, if it corresponds with the building of 311 # a specific package 312 pkg_tarball=$(get_package_tarball_name $name) 294 # a specific package. Fix GCC tarball name for 2.4-branch. 295 case $name in 296 gcc ) pkg_tarball=$(get_package_tarball_name gcc-core) ;; 297 * ) pkg_tarball=$(get_package_tarball_name $name) ;; 298 esac 313 299 314 300 if [[ "$pkg_tarball" = "" ]] && [[ -n "$N" ]] ; then … … 321 307 # Append each name of the script files to a list (this will become 322 308 # the names of the targets in the Makefile 323 chapter6="$chapter6 ${this_script}${N}" 324 325 # Append each name of the script files to a list (this will become 326 # the names of the logs to be moved for each iteration) 327 LOGS="$LOGS ${this_script}" 309 case "${this_script}" in 310 *kernfs* ) runasroot=" ${this_script}" ;; 311 * ) chapter6="$chapter6 ${this_script}" ;; 312 esac 328 313 329 314 … … 335 320 # as a dependency. Also call the echo_message function. 336 321 if [[ ${name} = "butterfly-toolchain" ]]; then 337 CHROOT_wrt_target "${this_script}${N}" "$PREV" 338 process_toolchain "${this_script}" "${file}" 339 wrt_touch 340 PREV=$this_script 341 continue 322 CHROOT_wrt_target "${this_script}" "$PREV" 323 # Touch timestamp file if installed files logs will be created. 324 # But only for the firt build when running iterative builds. 325 if [ "${INSTALL_LOG}" = "y" ] && [ "x${N}" = "x" ] ; then 326 CHROOT_wrt_TouchTimestamp 327 fi 328 process_toolchain "${this_script}" "${file}" 329 if [ "${INSTALL_LOG}" = "y" ] && [ "x${N}" = "x" ] ; then 330 CHROOT_wrt_LogNewFiles "$name" 331 fi 332 wrt_touch 333 PREV=$this_script 334 continue 342 335 fi 343 344 CHROOT_wrt_target "${this_script}${N}" "$PREV" 336 # kernfs is run in SUDO target 337 case "${this_script}" in 338 *kernfs* ) LUSER_wrt_target "${this_script}" "$PREV" ;; 339 * ) CHROOT_wrt_target "${this_script}" "$PREV" ;; 340 esac 345 341 346 342 # If $pkg_tarball isn't empty, we've got a package... 347 343 # Insert instructions for unpacking the package and changing directories 348 344 if [ "$pkg_tarball" != "" ] ; then 345 # Touch timestamp file if installed files logs will be created. 346 # But only for the firt build when running iterative builds. 347 if [ "${INSTALL_LOG}" = "y" ] && [ "x${N}" = "x" ] ; then 348 CHROOT_wrt_TouchTimestamp 349 fi 349 350 CHROOT_Unpack "$pkg_tarball" 350 351 # If the testsuites must be run, initialize the log file 351 352 # butterfly-toolchain tests are enabled in 'process_tookchain' function 353 # 2.4-branch toolchain is ernabled here. 352 354 case $name in 353 glibc ) [[ "$TEST" != "0" ]] && CHROOT_wrt_test_log "${this_script}" 354 ;; 355 * ) [[ "$TEST" > "1" ]] && CHROOT_wrt_test_log "${this_script}" 356 ;; 355 glibc | gcc | binutils) 356 [[ "$TEST" != "0" ]] && CHROOT_wrt_test_log "${this_script}" ;; 357 * ) [[ "$TEST" > "1" ]] && CHROOT_wrt_test_log "${this_script}" ;; 357 358 esac 358 359 # If using optimizations, write the instructions … … 360 361 fi 361 362 362 # In the mount of kernel filesystems we need to set HLFS and not to use chroot.363 # In kernfs we need to set HLFS and not to use chroot. 363 364 case "${this_script}" in 364 *kernfs* | *changingowner*) 365 wrt_RunAsRoot "${this_script}" "${file}" 366 ;; 367 *) # The rest of Chapter06 368 CHROOT_wrt_RunAsRoot "${file}" 369 ;; 370 esac 371 # 372 # Remove the build directory(ies) except if the package build fails. 365 *kernfs* ) wrt_RunAsRoot "${file}" ;; 366 * ) CHROOT_wrt_RunAsRoot "${file}" ;; 367 esac 368 # 369 # Write installed files log and remove the build directory(ies) 370 # except if the package build fails. 373 371 if [ "$pkg_tarball" != "" ] ; then 374 372 CHROOT_wrt_RemoveBuildDirs "$name" 373 if [ "${INSTALL_LOG}" = "y" ] && [ "x${N}" = "x" ] ; then 374 CHROOT_wrt_LogNewFiles "$name" 375 fi 375 376 fi 376 377 # … … 383 384 384 385 # Keep the script file name for Makefile dependencies. 385 PREV=${this_script} ${N}386 PREV=${this_script} 386 387 # Set system_build envar for iteration targets 387 388 system_build=$chapter6 … … 401 402 this_script=`basename $file` 402 403 403 # Grub must be configured manually.404 # The filesystems can't be unmounted via Makefile and the user405 # should enter the chroot environment to create the root406 # password, edit several files and setup Grub.407 404 case $this_script in 408 *usage) continue ;; # Contains example commands 409 *grub) continue ;; 410 *console) continue ;; # Use the file generated by lfs-bootscripts 411 *fstab) [[ ! -z ${FSTAB} ]] && cp ${FSTAB} $BUILDDIR/sources/fstab 405 *grub) continue ;; # Grub must be configured manually. 406 *console) continue ;; # Use the file generated by lfs-bootscripts 407 *fstab) [[ ! -z ${FSTAB} ]] && cp ${FSTAB} $BUILDDIR/sources/fstab 412 408 ;; 413 *kernel) # If no .config file is supplied, the kernel build is skipped414 [[ -z $CONFIG ]] && continue415 cp $CONFIG $BUILDDIR/sources/kernel-config409 *kernel) # If no .config file is supplied, the kernel build is skipped 410 [[ -z $CONFIG ]] && continue 411 cp $CONFIG $BUILDDIR/sources/kernel-config 416 412 ;; 417 413 esac … … 431 427 case "${this_script}" in 432 428 *bootscripts*) 429 if [ "${INSTALL_LOG}" = "y" ] ; then 430 CHROOT_wrt_TouchTimestamp 431 fi 433 432 CHROOT_Unpack $(get_package_tarball_name "lfs-bootscripts") 434 433 blfs_bootscripts=$(get_package_tarball_name "blfs-bootscripts" | sed -e 's/.tar.*//' ) 435 434 echo -e "\t@echo \"\$(MOUNT_PT)\$(SRC)/$blfs_bootscripts\" >> sources-dir" >> $MKFILE.tmp 435 ;; 436 *kernel) 437 name="linux" 438 pkg_tarball=$(get_package_tarball_name $name) 439 if [ "${INSTALL_LOG}" = "y" ] ; then 440 CHROOT_wrt_TouchTimestamp 441 fi 442 CHROOT_Unpack "$pkg_tarball" 436 443 ;; 437 444 esac … … 457 464 @ROOT=\`head -n1 \$(SRC)/\$(PKG_LST) | sed 's@^./@@;s@/.*@@'\` && \\ 458 465 rm -r \$(SRC)/\$\$ROOT 459 @rm -r \`cat sources-dir\` && \\466 @rm -rf \`cat sources-dir\` && \\ 460 467 rm sources-dir 461 468 EOF 462 469 ) >> $MKFILE.tmp 470 if [ "${INSTALL_LOG}" = "y" ] ; then 471 CHROOT_wrt_LogNewFiles "$name" 472 fi 463 473 ;; 474 *kernel) CHROOT_wrt_RemoveBuildDirs "dummy" 475 if [ "${INSTALL_LOG}" = "y" ] ; then 476 CHROOT_wrt_LogNewFiles "$name" 477 fi ;; 464 478 esac 465 479 … … 492 506 [[ "$COMPARE" = "y" ]] && wrt_compare_targets 493 507 chapter7_Makefiles 508 # Add the CUSTOM_TOOLS targets, if needed 509 [[ "$CUSTOM_TOOLS" = "y" ]] && wrt_CustomTools_target 510 # Add the BLFS_TOOL targets, if needed 511 [[ "$BLFS_TOOL" = "y" ]] && wrt_blfs_tool_targets 494 512 495 513 # Add a header, some variables and include the function file 496 514 # to the top of the real Makefile. 497 ( 498 cat << EOF 499 $HEADER 500 501 SRC = /sources 502 MOUNT_PT = $BUILDDIR 503 PKG_LST = $PKG_LST 504 LUSER = $LUSER 505 LGROUP = $LGROUP 506 SCRIPT_ROOT = $SCRIPT_ROOT 507 508 BASEDIR = \$(MOUNT_PT) 509 SRCSDIR = \$(BASEDIR)/sources 510 CMDSDIR = \$(BASEDIR)/\$(SCRIPT_ROOT)/$PROGNAME-commands 511 LOGDIR = \$(BASEDIR)/\$(SCRIPT_ROOT)/logs 512 TESTLOGDIR = \$(BASEDIR)/\$(SCRIPT_ROOT)/test-logs 513 514 crSRCSDIR = /sources 515 crCMDSDIR = /\$(SCRIPT_ROOT)/$PROGNAME-commands 516 crLOGDIR = /\$(SCRIPT_ROOT)/logs 517 crTESTLOGDIR = /\$(SCRIPT_ROOT)/test-logs 518 519 SU_LUSER = su - \$(LUSER) -c 520 LUSER_HOME = /home/\$(LUSER) 521 PRT_DU = echo -e "\nKB: \`du -skx --exclude=jhalfs \$(MOUNT_PT)\`\n" 522 PRT_DU_CR = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) / \`\n" 523 524 export PATH := \${PATH}:/usr/sbin 525 526 include makefile-functions 527 528 EOF 529 ) > $MKFILE 530 515 wrt_Makefile_header 531 516 532 517 # Add chroot commands … … 536 521 chroot=`cat $file | \ 537 522 sed -e "s@chroot@$CHROOT_LOC@" \ 538 -e '/#!\/bin\/ sh/d' \523 -e '/#!\/bin\/bash/d' \ 539 524 -e '/^export/d' \ 540 525 -e '/^logout/d' \ … … 546 531 -e 's|$| -c|' \ 547 532 -e 's|"$$HLFS"|$(MOUNT_PT)|'\ 548 -e 's|set -e||'` 533 -e 's|set -e||' \ 534 -e 's|set +h||'` 549 535 echo -e "CHROOT$i= $chroot\n" >> $MKFILE 550 536 i=`expr $i + 1` … … 556 542 cat << EOF 557 543 558 all: ck_UID mk_SETUP mk_LUSER mk_SUDO mk_CHROOT mk_BOOT create-sbu_du-report 544 all: ck_UID mk_SETUP mk_LUSER mk_SUDO mk_CHROOT mk_BOOT create-sbu_du-report mk_CUSTOM_TOOLS mk_BLFS_TOOL 559 545 @sudo make do-housekeeping 546 @echo "$VERSION - jhalfs build" > hlfs-release && \\ 547 sudo install -m444 hlfs-release \$(MOUNT_PT)/etc/hlfs-release 560 548 @\$(call echo_finished,$VERSION) 561 549 … … 570 558 mk_SETUP: 571 559 @\$(call echo_SU_request) 572 @sudo make SETUP560 @sudo make BREAKPOINT=\$(BREAKPOINT) SETUP 573 561 @touch \$@ 574 562 575 563 mk_LUSER: mk_SETUP 576 564 @\$(call echo_SULUSER_request) 577 @(sudo \$(SU_LUSER) "source .bashrc && cd \$(MOUNT_PT)/\$(SCRIPT_ROOT) && make LUSER" )565 @(sudo \$(SU_LUSER) "source .bashrc && cd \$(MOUNT_PT)/\$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) LUSER" ) 578 566 @sudo make restore-luser-env 579 567 @touch \$@ … … 584 572 585 573 mk_CHROOT: mk_SUDO 586 @if [ ! -e \$(MOUNT_PT)/bin ]; then \\ 587 mkdir \$(MOUNT_PT)/bin; \\ 588 cd \$(MOUNT_PT)/bin && \\ 589 ln -sf /tools/bin/bash bash; ln -sf bash sh; \\ 590 sudo chown -R 0:0 \$(MOUNT_PT)/bin; \\ 591 fi; 592 @sudo sed -e 's|^ln -sv |ln -svf |' -i \$(CMDSDIR)/chapter06/064-createfiles 574 @if [ ! -e \$(MOUNT_PT)/dev ]; then \\ 575 mkdir \$(MOUNT_PT)/dev && \\ 576 sudo mknod -m 666 \$(MOUNT_PT)/dev/null c 1 3 && \\ 577 sudo mknod -m 600 \$(MOUNT_PT)/dev/console c 5 1 && \\ 578 sudo chown -R 0:0 \$(MOUNT_PT)/dev; \\ 579 fi; 593 580 @\$(call echo_CHROOT_request) 594 @( sudo \$(CHROOT1) "cd \$(SCRIPT_ROOT) && make CHROOT")581 @( sudo \$(CHROOT1) "cd \$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) CHROOT") 595 582 @touch \$@ 596 583 597 584 mk_BOOT: mk_CHROOT 598 585 @\$(call echo_CHROOT_request) 599 @( sudo \$(CHROOT2) "cd \$(SCRIPT_ROOT) && make B OOT")586 @( sudo \$(CHROOT2) "cd \$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) BOOT") 600 587 @touch \$@ 601 588 602 603 SETUP: $chapter3 604 605 LUSER: $chapter5 606 607 SUDO: 060-kernfs 062-changingowner 608 609 CHROOT: $chapter6 610 611 BOOT: $chapter7 612 589 mk_CUSTOM_TOOLS: create-sbu_du-report 590 @if [ "\$(ADD_CUSTOM_TOOLS)" = "y" ]; then \\ 591 \$(call sh_echo_PHASE,Building CUSTOM_TOOLS); \\ 592 sudo mkdir -p ${BUILDDIR}${TRACKING_DIR}; \\ 593 (sudo \$(CHROOT2) "cd \$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) CUSTOM_TOOLS"); \\ 594 fi; 595 @touch \$@ 596 597 mk_BLFS_TOOL: mk_CUSTOM_TOOLS 598 @if [ "\$(ADD_BLFS_TOOLS)" = "y" ]; then \\ 599 \$(call sh_echo_PHASE,Building BLFS_TOOL); \\ 600 sudo mkdir -p $BUILDDIR$TRACKING_DIR; \\ 601 (sudo \$(CHROOT2) "cd \$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) BLFS_TOOL"); \\ 602 fi; 603 @touch \$@ 604 605 606 SETUP: $chapter3 607 LUSER: $chapter5 608 SUDO: $runasroot 609 CHROOT: SHELL=/tools/bin/bash 610 CHROOT: $chapter6 611 BOOT: $chapter7 612 CUSTOM_TOOLS: $custom_list 613 BLFS_TOOL: $blfs_tool 614 615 616 create-sbu_du-report: mk_BOOT 617 @\$(call echo_message, Building) 618 @if [ "\$(ADD_REPORT)" = "y" ]; then \\ 619 ./create-sbu_du-report.sh logs $VERSION; \\ 620 \$(call echo_report,$VERSION-SBU_DU-$(date --iso-8601).report); \\ 621 fi; 622 @touch \$@ 613 623 614 624 restore-luser-env: 615 625 @\$(call echo_message, Building) 616 @if [ -f /home/\$(LUSER)/.bashrc.XXX ]; then \\617 mv -f /home/\$(LUSER)/.bashrc.XXX /home/\$(LUSER)/.bashrc; \\618 fi; 619 @if [ -f /home/\$(LUSER)/.bash_profile.XXX ]; then \\620 mv /home/\$(LUSER)/.bash_profile.XXX /home/\$(LUSER)/.bash_profile; \\621 fi; 622 @chown \$(LUSER):\$(LGROUP) /home/\$(LUSER)/.bash* && \\626 @if [ -f \$(LUSER_HOME)/.bashrc.XXX ]; then \\ 627 mv -f \$(LUSER_HOME)/.bashrc.XXX \$(LUSER_HOME)/.bashrc; \\ 628 fi; 629 @if [ -f \$(LUSER_HOME)/.bash_profile.XXX ]; then \\ 630 mv \$(LUSER_HOME)/.bash_profile.XXX \$(LUSER_HOME)/.bash_profile; \\ 631 fi; 632 @chown \$(LUSER):\$(LGROUP) \$(LUSER_HOME)/.bash* && \\ 623 633 touch \$@ && \\ 624 634 echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\ … … 634 644 @-if [ ! -f luser-exist ]; then \\ 635 645 userdel \$(LUSER); \\ 636 rm -rf /home/\$(LUSER); \\646 rm -rf \$(LUSER_HOME); \\ 637 647 fi; 638 648 … … 641 651 EOF 642 652 ) >> $MKFILE 643 644 # Add SBU-disk_usage report target645 echo "create-sbu_du-report:" >> $MKFILE646 if [[ "$REPORT" = "y" ]] ; then647 (648 cat << EOF649 @\$(call echo_message, Building)650 @./create-sbu_du-report.sh logs $VERSION651 @\$(call echo_report,$VERSION-SBU_DU-$(date --iso-8601).report)652 @touch \$@653 654 655 EOF656 ) >> $MKFILE657 else echo -e "\t@true\n\n" >> $MKFILE; fi658 653 659 654 # Bring over the items from the Makefile.tmp -
Property mode
changed from
Note:
See TracChangeset
for help on using the changeset viewer.