r3489 - jhalfs/branches/experimental/common/libs

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Tue Sep 25 12:12:36 PDT 2007


Author: manuel
Date: 2007-09-25 13:12:36 -0600 (Tue, 25 Sep 2007)
New Revision: 3489

Modified:
   jhalfs/branches/experimental/common/libs/func_wrt_Makefile
Log:
Revising func_wrt_Makefile

Modified: jhalfs/branches/experimental/common/libs/func_wrt_Makefile
===================================================================
--- jhalfs/branches/experimental/common/libs/func_wrt_Makefile	2007-09-25 18:06:33 UTC (rev 3488)
+++ jhalfs/branches/experimental/common/libs/func_wrt_Makefile	2007-09-25 19:12:36 UTC (rev 3489)
@@ -38,8 +38,6 @@
 
 SU_LUSER       = su - \$(LUSER) -c
 LUSER_HOME     = \$(LHOME)/\$(LUSER)
-PRT_DU         = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) --exclude=lost+found \$(MOUNT_PT) \`\n"
-PRT_DU_CR      = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) --exclude=lost+found / \`\n"
 
 ADD_REPORT       = $REPORT
 ADD_CUSTOM_TOOLS = $CUSTOM_TOOLS
@@ -57,50 +55,10 @@
 #=======================
 
 
-#==== PACKAGES NAMES ===
-
-#----------------------------------#
-get_package_tarball_name() {       #
-#----------------------------------#
-  local script_name=`echo ${1} | sed -e 's@[0-9]\{1\}-@@'`
-
-   # The use of 'head' is necessary to limit the return value to the FIRST match..
-   # hopefully this will not cause problems.
-   #
-   case $script_name in
-     tcl) echo $(grep "^tcl" $JHALFSDIR/pkg_tarball_list | head -n1 )
-         ;;
-     powerpc-utils) echo $(grep "^powerpc-utils" $JHALFSDIR/pkg_tarball_list | head -n1 )
-         ;;
-     uClibc)
-         if [[ "${PROGNAME}" = "clfs3" ]]; then
-           echo $(grep "^uClibc-" $JHALFSDIR/pkg_tarball_list | head -n1 )
-         else
-           echo $(grep "^$script_name-[[:digit:]]" $JHALFSDIR/pkg_tarball_list | head -n1 )
-         fi
-         ;;
-     linux-headers)
-         if [[ "${PROGNAME}" = "lfs" ]] || [[ "${PROGNAME}" = "hlfs" ]] ; then
-           # Uses kernel headers directly
-           echo $(grep "^linux-[[:digit:]]" $JHALFSDIR/pkg_tarball_list | head -n1 )
-         else
-           # CLFS{,2,3} use massaged headers package
-           echo $(grep "^linux-headers-[[:digit:]]" $JHALFSDIR/pkg_tarball_list | head -n1 )
-         fi
-         ;;
-     *)  echo $(grep "^$script_name-[[:digit:]]" $JHALFSDIR/pkg_tarball_list | head -n1 )
-         ;;
-   esac
-
-}
-
-#=======================
-
-
 #==== TARGET HEADER ====
 
 #----------------------------------#
-LUSER_wrt_target() {               # Create target and initialize log file
+LUSER_wrt_target() {               # Create target and initialize envars file
 #----------------------------------#
   local i=$1
   local PREV=$2
@@ -110,14 +68,13 @@
 $i:  $PREV
 	@\$(call echo_message, Building)
 	@export BASHBIN=\$(SHELL) && \$(SHELL) progress_bar.sh \$@ \$\$PPID &
-	@echo "\$(nl_)\`date\`\$(nl_)" >logs/\$@
-	@\$(PRT_DU) >>logs/\$@
+	@rm -f envars && touch envars
 EOF
 ) >> $MKFILE.tmp
 }
 
 #----------------------------------#
-CHROOT_wrt_target() {              # Create target and initialize log file
+CHROOT_wrt_target() {              #
 #----------------------------------#
   local i=$1
   local PREV=$2
@@ -127,8 +84,7 @@
 $i:  $PREV
 	@\$(call echo_message, Building)
 	@export BASHBIN=\$(SHELL) && \$(SHELL) progress_bar.sh \$@ \$\$PPID &
-	@echo "\$(nl_)\`date\`\$(nl_)" >logs/\$@
-	@\$(PRT_DU_CR) >>logs/\$@
+	@rm -f envars && touch envars
 EOF
 ) >> $MKFILE.tmp
 }
@@ -136,54 +92,6 @@
 #=======================
 
 
-#======== UNPACK =======
-
-#----------------------------------#
-LUSER_wrt_unpack() {               # Unpack and set 'ROOT' var
-#----------------------------------#
-  local FILE=$1
-  local optSAVE_PREVIOUS=$2
-
-  if [[ "${optSAVE_PREVIOUS}" != "1" ]]; then
-(
-cat << EOF
-	@\$(call remove_existing_dirs,$FILE)
-EOF
-) >> $MKFILE.tmp
-  fi
-
-(
-cat << EOF
-	@\$(call unpack,$FILE)
-	@\$(call get_pkg_root_LUSER)
-EOF
-) >> $MKFILE.tmp
-}
-
-#----------------------------------#
-CHROOT_Unpack() {                  #
-#----------------------------------#
-  local FILE=$1
-  local optSAVE_PREVIOUS=$2
-
-  if [ "${optSAVE_PREVIOUS}" != "1" ]; then
-(
-cat << EOF
-	@\$(call remove_existing_dirs2,$FILE)
-EOF
-) >> $MKFILE.tmp
-  fi
-(
-cat  << EOF
-	@\$(call unpack2,$FILE)
-	@\$(call get_pkg_root2)
-EOF
-) >> $MKFILE.tmp
-}
-
-#=======================
-
-
 #===== TESTS LOGS ======
 
 #----------------------------------#
@@ -193,7 +101,7 @@
 (
 cat  << EOF
 	@echo "export  TEST_LOG=\$(TESTLOGDIR)/$TESTLOGFILE" >> envars && \\
-	echo "\$(nl_)\`date\`\$(nl_)" >\$(TESTLOGDIR)/\$@
+	echo "\$(nl_)\`date\`\$(nl_)" > \$(TESTLOGDIR)/\$@
 EOF
 ) >> $MKFILE.tmp
 }
@@ -205,7 +113,7 @@
 (
 cat  << EOF
 	@echo "export TEST_LOG=\$(crTESTLOGDIR)/$TESTLOGFILE" >> envars && \\
-	echo "\$(nl_)\`date\`\$(nl_)" >test-logs/\$@
+	echo "\$(nl_)\`date\`\$(nl_)" > test-logs/\$@
 EOF
 ) >> $MKFILE.tmp
 }
@@ -232,23 +140,19 @@
 
 (
 cat << EOF
-	@export ${MOUNT_ENV}=\$(MOUNT_PT) && \\
-	${PROGNAME}-commands/`dirname $file`/\$@ >>logs/\$@ 2>&1 && \\
-	\$(PRT_DU) >>logs/\$@
+	@export ${MOUNT_ENV}=\$(MOUNT_PT) && ${PROGNAME}-commands/`dirname $file`/\$@ > logs/\$@ 2>&1
 EOF
 ) >> $MKFILE.tmp
 }
 
 #----------------------------------#
-LUSER_wrt_RunAsUser() {            # Calculate time with perl, footer to log file
+LUSER_wrt_RunAsUser() {            #
 #----------------------------------#
   local file=$1
 
 (
 cat << EOF
-	@source ~/.bashrc && \\
-	\$(CMDSDIR)/`dirname $file`/\$@ >> logs/\$@ 2>&1 && \\
-	\$(PRT_DU) >>logs/\$@
+	@source ~/.bashrc && \$(CMDSDIR)/`dirname $file`/\$@ > logs/\$@ 2>&1
 EOF
 ) >> $MKFILE.tmp
 }
@@ -259,9 +163,7 @@
   local file=$1
 (
 cat << EOF
-	@source envars && \\
-	\$(crCMDSDIR)/`dirname $file`/\$@ >>logs/\$@ 2>&1 && \\
-	\$(PRT_DU_CR) >>logs/\$@
+	@source envars && \$(crCMDSDIR)/`dirname $file`/\$@ > logs/\$@ 2>&1
 EOF
 ) >> $MKFILE.tmp
 
@@ -277,8 +179,7 @@
 #----------------------------------#
 (
 cat << EOF
-	@cp -v \$(MOUNT_PT)/sources/fstab \$(MOUNT_PT)/etc/fstab >>logs/\$@ 2>&1 && \\
-	\$(PRT_DU) >>logs/\$@
+	@cp -v \$(MOUNT_PT)/sources/fstab \$(MOUNT_PT)/etc/fstab > logs/\$@ 2>&1
 EOF
 ) >> $MKFILE.tmp
 }
@@ -288,8 +189,7 @@
 #----------------------------------#
 (
 cat << EOF
-	@cp -v /sources/fstab /etc/fstab >>logs/\$@ 2>&1 && \\
-	\$(PRT_DU_CR) >>logs/\$@
+	@cp -v /sources/fstab /etc/fstab > logs/\$@ 2>&1
 EOF
 ) >> $MKFILE.tmp
 }
@@ -344,33 +244,6 @@
 #=======================
 
 
-#==== RM BUILD DIRS ====
-
-#----------------------------------#
-LUSER_RemoveBuildDirs() {          #
-#----------------------------------#
-  local name=$1
-(
-cat << EOF
-	@\$(call remove_build_dirs,$name)
-EOF
-) >> $MKFILE.tmp
-}
-
-#----------------------------------#
-CHROOT_wrt_RemoveBuildDirs() {     #
-#----------------------------------#
-  local name=$1
-(
-cat << EOF
-	@\$(call remove_build_dirs2,$name)
-EOF
-) >> $MKFILE.tmp
-}
-
-#=======================
-
-
 #======== TOUCH ========
 
 #----------------------------------#




More information about the alfs-log mailing list