r2038 - jhalfs/trunk

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Sun Oct 2 03:29:00 PDT 2005


Author: manuel
Date: 2005-10-02 04:28:59 -0600 (Sun, 02 Oct 2005)
New Revision: 2038

Modified:
   jhalfs/trunk/jhalfs
Log:
Added Makefile dependencies trakking.

Modified: jhalfs/trunk/jhalfs
===================================================================
--- jhalfs/trunk/jhalfs	2005-10-02 09:26:10 UTC (rev 2037)
+++ jhalfs/trunk/jhalfs	2005-10-02 10:28:59 UTC (rev 2038)
@@ -289,9 +289,13 @@
     # and binutils in chapter 5)
     name=`echo $i | sed -e 's@[0-9]\{3\}-@@' -e 's at -pass[0-9]\{1\}@@'`
 
-    # Drop in the name of the target on a new line.
-    echo -e "\n$i:" >> $MKFILE.tmp
+    # Set the dependency for the first target.
+    if [ -z $PREV ] ; then PREV=022-settingenvironment ; fi
 
+    # Drop in the name of the target on a new line, and the previous target
+    # as a dependency.
+    echo -e "\n$i:  $PREV" >> $MKFILE.tmp
+
     # Find the version of the command files, if it corresponds with the building of
     # a specific package
     vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`
@@ -390,6 +394,9 @@
     echo -e "\tif [ ! -e \$@ ] ; then \\" >> $MKFILE.tmp
     echo -e "\t\techo \"The build of \$@ has failed\" && exit 1; \\" >> $MKFILE.tmp
     echo -e "\tfi;" >> $MKFILE.tmp
+
+    # Keep the script file name for Makefile dependencies.
+    PREV=$i
   done
 
   # Stick variables and some defines at the top of the real makefile
@@ -437,7 +444,7 @@
   echo -e "\tln -sv \$(LFS)/tools / && \\" >> $MKFILE
   echo -e "\ttouch \$@\n" >> $MKFILE
 
-  echo "021-addinguser:" >> $MKFILE
+  echo "021-addinguser:  020-creatingtoolsdir" >> $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
@@ -446,7 +453,7 @@
   echo -e "\tchmod -R +x $JHALFSDIR/commands && \\" >> $MKFILE
   echo -e "\ttouch \$@\n" >> $MKFILE
 
-  echo "022-settingenvironment:" >> $MKFILE
+  echo "022-settingenvironment:  021-addinguser" >> $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




More information about the alfs-log mailing list