r2032 - jhalfs/trunk

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Fri Sep 30 13:47:34 PDT 2005


Author: manuel
Date: 2005-09-30 14:47:34 -0600 (Fri, 30 Sep 2005)
New Revision: 2032

Modified:
   jhalfs/trunk/jhalfs
Log:
Reverted Makefiles dependencies. They don't do what I supossed.
Added a first try of  time and disk usage logging.
Moved the make run to their own function.

Modified: jhalfs/trunk/jhalfs
===================================================================
--- jhalfs/trunk/jhalfs	2005-09-30 18:59:04 UTC (rev 2031)
+++ jhalfs/trunk/jhalfs	2005-09-30 20:47:34 UTC (rev 2032)
@@ -285,12 +285,9 @@
   # and binutils in chapter 5)
   name=`echo $i | sed -e 's@[0-9]\{3\}-@@' -e 's at -pass[0-9]\{1\}@@'`
 
-  # Set the dependency for the first target.
-  if [ -z $PREV ] ; then PREV=chapter4 ; fi
-
   # Drop in the name of the target on a new line, and the
   # pevious target as a dependency.
-  echo -e "\n$i: $PREV" >> $MKFILE.tmp
+  echo -e "\n$i:" >> $MKFILE.tmp
 
   # Find the version of the command files, if it corresponds with the building of
   # a specific package
@@ -313,9 +310,15 @@
     echo -e "\techo \"export PKGDIR\" >> envars && \\" >> $MKFILE.tmp
   fi
 
+  # Inser date and disk usage at the top of the log file.
+  echo -e "\techo -e \"\\\n\`date\`\\\n\\\nKB: \`du -sk --exclude=0??-* \$(LFS)\`\\\n\" >\$(LOGDIR)/$i && \\" >> $MKFILE.tmp
+
   # Insert the script run
-  echo -e "\tsu - lfs -c \". /home/lfs/.bashrc && $JHALFSDIR/commands/$file\" >\$(LOGDIR)/$i 2>&1 && \\" >> $MKFILE.tmp
+  echo -e "\tsu - lfs -c \". /home/lfs/.bashrc && $JHALFSDIR/commands/$file\" >>\$(LOGDIR)/$i 2>&1 && \\" >> $MKFILE.tmp
 
+  # Inser date and disk usage at the bottom of the log file.
+  echo -e "\techo -e \"\\\n\`date\`\\\n\\\nKB: \`du -sk --exclude=0??-* \$(LFS)\`\\\n\" >>\$(LOGDIR)/$i && \\" >> $MKFILE.tmp
+
   # Include a touch of the target name so make can check
   # if it's already been made.
   echo -e "\ttouch \$@" >> $MKFILE.tmp
@@ -384,7 +387,7 @@
   echo -e "\tln -sv \$(LFS)/tools / && \\" >> $MKFILE
   echo -e "\ttouch \$@\n" >> $MKFILE
 
-  echo "021-addinguser:  020-creatingtoolsdir" >> $MKFILE
+  echo "021-addinguser:" >> $MKFILE
   echo -e "\tgroupadd lfs && \\" >> $MKFILE
   echo -e "\tuseradd -s /bin/bash -g lfs -m -k /dev/null lfs && \\" >> $MKFILE
   echo -e "\tchown lfs \$(LFS)/tools && \\" >> $MKFILE
@@ -393,7 +396,7 @@
   echo -e "\tchmod -R +x $JHALFSDIR/commands && \\" >> $MKFILE
   echo -e "\ttouch \$@\n" >> $MKFILE
 
-  echo "022-settingenvironment:  021-addinguser" >> $MKFILE
+  echo "022-settingenvironment:" >> $MKFILE
   echo -e "\techo \"exec env -i HOME=\\\$\$HOME TERM=\\\$\$TERM PS1='\u:\w\$$ ' /bin/bash\" > /home/lfs/.bash_profile && \\" >> $MKFILE
   echo -e "\techo \"set +h\" > /home/lfs/.bashrc && \\" >> $MKFILE
   echo -e "\techo \"umask 022\" >> /home/lfs/.bashrc && \\" >> $MKFILE
@@ -403,9 +406,9 @@
   echo -e "\techo \"export LFS LC_ALL PATH\" >> /home/lfs/.bashrc && \\" >> $MKFILE
   # Source the file where we place changing variables.
   echo -e "\techo \". $JHALFSDIR/envars\" >> /home/lfs/.bashrc && \\" >> $MKFILE
-  echo -e "\tchown lfs /home/lfs/.bash* && \\" >> $MKFILE
+  echo -e "\tchown lfs:lfs /home/lfs/.bash* && \\" >> $MKFILE
   echo -e "\ttouch envars && \\" >> $MKFILE
-  echo -e "\ttouch \$@\n" >> $MKFILE
+  echo -e "\ttouch \$@" >> $MKFILE
 
 
   # Bring over the items from the Makefile.tmp
@@ -414,6 +417,14 @@
   echo -ne "done\n"
 }
 
+run_make() {
+  # Build the system
+  if [ -e $MKFILE ] ; then
+    echo -ne "Building the LFS system\n"
+    cd $JHALFSDIR && make
+    echo -ne "done\n"
+  fi
+}
 
 if [ ! -d $JHALFSDIR ] ; then
   mkdir -p $JHALFSDIR
@@ -431,6 +442,4 @@
 
 get_book
 build_Makefile
-if [ -e $MKFILE ] ; then
-  cd $JHALFSDIR && make
-fi
+#run_make




More information about the alfs-log mailing list