r3220 - in jhalfs/trunk: CLFS CLFS2 CLFS3 HLFS LFS common/libs

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Sat Nov 11 11:55:15 PST 2006


Author: manuel
Date: 2006-11-11 12:55:13 -0700 (Sat, 11 Nov 2006)
New Revision: 3220

Modified:
   jhalfs/trunk/CLFS/master.sh
   jhalfs/trunk/CLFS2/master.sh
   jhalfs/trunk/CLFS3/master.sh
   jhalfs/trunk/HLFS/master.sh
   jhalfs/trunk/LFS/master.sh
   jhalfs/trunk/common/libs/func_wrt_Makefile
Log:
Moved Makefile header creation to a common function.

Modified: jhalfs/trunk/CLFS/master.sh
===================================================================
--- jhalfs/trunk/CLFS/master.sh	2006-11-11 19:06:46 UTC (rev 3219)
+++ jhalfs/trunk/CLFS/master.sh	2006-11-11 19:55:13 UTC (rev 3220)
@@ -1121,41 +1121,8 @@
 
   # Add a header, some variables and include the function file
   # to the top of the real Makefile.
-(
-    cat << EOF
-$HEADER
+  wrt_Makefile_header
 
-SRC            = /sources
-MOUNT_PT       = $BUILDDIR
-PKG_LST        = $PKG_LST
-LUSER          = $LUSER
-LGROUP         = $LGROUP
-SCRIPT_ROOT    = $SCRIPT_ROOT
-ADD_BLFS_TOOLS = $BLFS_TOOL
-
-BASEDIR      = \$(MOUNT_PT)
-SRCSDIR      = \$(BASEDIR)/sources
-CMDSDIR      = \$(BASEDIR)/\$(SCRIPT_ROOT)/$PROGNAME-commands
-LOGDIR       = \$(BASEDIR)/\$(SCRIPT_ROOT)/logs
-TESTLOGDIR   = \$(BASEDIR)/\$(SCRIPT_ROOT)/test-logs
-
-crSRCSDIR    = /sources
-crCMDSDIR    = /\$(SCRIPT_ROOT)/$PROGNAME-commands
-crLOGDIR     = /\$(SCRIPT_ROOT)/logs
-crTESTLOGDIR = /\$(SCRIPT_ROOT)/test-logs
-
-SU_LUSER     = su - \$(LUSER) -c
-LUSER_HOME   = /home/\$(LUSER)
-PRT_DU       = echo -e "\nKB: \`du -skx --exclude=jhalfs --exclude=lost+found \$(MOUNT_PT)\`\n"
-PRT_DU_CR    = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) --exclude=lost+found / \`\n"
-
-export PATH := \${PATH}:/usr/sbin
-
-include makefile-functions
-
-EOF
-) > $MKFILE
-
   # Add chroot commands
   if [ "$METHOD" = "chroot" ] ; then
     CHROOT_LOC="`whereis -b chroot | cut -d " " -f2`"

Modified: jhalfs/trunk/CLFS2/master.sh
===================================================================
--- jhalfs/trunk/CLFS2/master.sh	2006-11-11 19:06:46 UTC (rev 3219)
+++ jhalfs/trunk/CLFS2/master.sh	2006-11-11 19:55:13 UTC (rev 3220)
@@ -432,34 +432,8 @@
 
   # Add a header, some variables and include the function file
   # to the top of the real Makefile.
-(
-    cat << EOF
-$HEADER
+  wrt_Makefile_header
 
-SRC         = /sources
-MOUNT_PT    = $BUILDDIR
-PKG_LST     = $PKG_LST
-LUSER       = $LUSER
-LGROUP      = $LGROUP
-SCRIPT_ROOT = $SCRIPT_ROOT
-
-BASEDIR    = \$(MOUNT_PT)
-SRCSDIR    = \$(BASEDIR)/sources
-CMDSDIR    = \$(BASEDIR)/\$(SCRIPT_ROOT)/$PROGNAME-commands
-LOGDIR     = \$(BASEDIR)/\$(SCRIPT_ROOT)/logs
-TESTLOGDIR = \$(BASEDIR)/\$(SCRIPT_ROOT)/test-logs
-
-SU_LUSER   = su - \$(LUSER) -c
-PRT_DU     = echo -e "\nKB: \`du -skx --exclude=jhalfs --exclude=lost+found \$(MOUNT_PT)\`\n"
-LUSER_HOME = /home/\$(LUSER)
-
-export PATH := \${PATH}:/usr/sbin
-
-include makefile-functions
-
-EOF
-) > $MKFILE
-
   # Drop in the main target 'all:' and the chapter targets with each sub-target
   # as a dependency.
 (

Modified: jhalfs/trunk/CLFS3/master.sh
===================================================================
--- jhalfs/trunk/CLFS3/master.sh	2006-11-11 19:06:46 UTC (rev 3219)
+++ jhalfs/trunk/CLFS3/master.sh	2006-11-11 19:55:13 UTC (rev 3220)
@@ -426,34 +426,8 @@
 
   # Add a header, some variables and include the function file
   # to the top of the real Makefile.
-(
-    cat << EOF
-$HEADER
+  wrt_Makefile_header
 
-SRC         = /sources
-MOUNT_PT    = $BUILDDIR
-PKG_LST     = $PKG_LST
-LUSER       = $LUSER
-LGROUP      = $LGROUP
-SCRIPT_ROOT = $SCRIPT_ROOT
-
-BASEDIR    = \$(MOUNT_PT)
-SRCSDIR    = \$(BASEDIR)/sources
-CMDSDIR    = \$(BASEDIR)/\$(SCRIPT_ROOT)/$PROGNAME-commands
-LOGDIR     = \$(BASEDIR)/\$(SCRIPT_ROOT)/logs
-TESTLOGDIR = \$(BASEDIR)/\$(SCRIPT_ROOT)/test-logs
-
-SU_LUSER   = su - \$(LUSER) -c
-PRT_DU     = echo -e "\nKB: \`du -skx --exclude=jhalfs --exclude=lost+found \$(MOUNT_PT)\`\n"
-LUSER_HOME = /home/\$(LUSER)
-
-export PATH := \${PATH}:/usr/sbin
-
-include makefile-functions
-
-EOF
-) > $MKFILE
-
   # Drop in the main target 'all:' and the chapter targets with each sub-target
   # as a dependency.
 (

Modified: jhalfs/trunk/HLFS/master.sh
===================================================================
--- jhalfs/trunk/HLFS/master.sh	2006-11-11 19:06:46 UTC (rev 3219)
+++ jhalfs/trunk/HLFS/master.sh	2006-11-11 19:55:13 UTC (rev 3220)
@@ -494,41 +494,8 @@
 
   # Add a header, some variables and include the function file
   # to the top of the real Makefile.
-(
-    cat << EOF
-$HEADER
+  wrt_Makefile_header
 
-SRC          = /sources
-MOUNT_PT     = $BUILDDIR
-PKG_LST      = $PKG_LST
-LUSER        = $LUSER
-LGROUP       = $LGROUP
-SCRIPT_ROOT  = $SCRIPT_ROOT
-
-BASEDIR      = \$(MOUNT_PT)
-SRCSDIR      = \$(BASEDIR)/sources
-CMDSDIR      = \$(BASEDIR)/\$(SCRIPT_ROOT)/$PROGNAME-commands
-LOGDIR       = \$(BASEDIR)/\$(SCRIPT_ROOT)/logs
-TESTLOGDIR   = \$(BASEDIR)/\$(SCRIPT_ROOT)/test-logs
-
-crSRCSDIR    = /sources
-crCMDSDIR    = /\$(SCRIPT_ROOT)/$PROGNAME-commands
-crLOGDIR     = /\$(SCRIPT_ROOT)/logs
-crTESTLOGDIR = /\$(SCRIPT_ROOT)/test-logs
-
-SU_LUSER     = su - \$(LUSER) -c
-LUSER_HOME   = /home/\$(LUSER)
-PRT_DU       = echo -e "\nKB: \`du -skx --exclude=jhalfs --exclude=lost+found \$(MOUNT_PT)\`\n"
-PRT_DU_CR    = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) --exclude=lost+found / \`\n"
-
-export PATH := \${PATH}:/usr/sbin
-
-include makefile-functions
-
-EOF
-) > $MKFILE
-
-
   # Add chroot commands
   CHROOT_LOC="`whereis -b chroot | cut -d " " -f2`"
   i=1

Modified: jhalfs/trunk/LFS/master.sh
===================================================================
--- jhalfs/trunk/LFS/master.sh	2006-11-11 19:06:46 UTC (rev 3219)
+++ jhalfs/trunk/LFS/master.sh	2006-11-11 19:55:13 UTC (rev 3220)
@@ -382,41 +382,8 @@
 
   # Add a header, some variables and include the function file
   # to the top of the real Makefile.
-(
-    cat << EOF
-$HEADER
+  wrt_Makefile_header
 
-
-SRC          = /sources
-MOUNT_PT     = $BUILDDIR
-PKG_LST      = $PKG_LST
-LUSER        = $LUSER
-LGROUP       = $LGROUP
-SCRIPT_ROOT  = $SCRIPT_ROOT
-
-BASEDIR      = \$(MOUNT_PT)
-SRCSDIR      = \$(BASEDIR)/sources
-CMDSDIR      = \$(BASEDIR)/\$(SCRIPT_ROOT)/$PROGNAME-commands
-LOGDIR       = \$(BASEDIR)/\$(SCRIPT_ROOT)/logs
-TESTLOGDIR   = \$(BASEDIR)/\$(SCRIPT_ROOT)/test-logs
-
-crSRCSDIR    = /sources
-crCMDSDIR    = /\$(SCRIPT_ROOT)/$PROGNAME-commands
-crLOGDIR     = /\$(SCRIPT_ROOT)/logs
-crTESTLOGDIR = /\$(SCRIPT_ROOT)/test-logs
-
-SU_LUSER     = su - \$(LUSER) -c
-LUSER_HOME   = /home/\$(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"
-
-export PATH := \${PATH}:/usr/sbin
-
-include makefile-functions
-
-EOF
-) > $MKFILE
-
   # Add chroot commands
   CHROOT_LOC="`whereis -b chroot | cut -d " " -f2`"
   i=1

Modified: jhalfs/trunk/common/libs/func_wrt_Makefile
===================================================================
--- jhalfs/trunk/common/libs/func_wrt_Makefile	2006-11-11 19:06:46 UTC (rev 3219)
+++ jhalfs/trunk/common/libs/func_wrt_Makefile	2006-11-11 19:55:13 UTC (rev 3220)
@@ -4,11 +4,48 @@
 
 #=== MAKEFILE HEADER ===
 
-HEADER="# This file is automatically generated by jhalfs
+#----------------------------------#
+wrt_Makefile_header() {            #
+#----------------------------------#
+(
+    cat << EOF
+# This file is automatically generated by jhalfs
 # DO NOT EDIT THIS FILE MANUALLY
 #
-# Generated on `date \"+%F %X %Z\"`"
+# Generated on `date "+%F %X %Z"`
 
+
+SRC            = /sources
+MOUNT_PT       = $BUILDDIR
+PKG_LST        = $PKG_LST
+LUSER          = $LUSER
+LGROUP         = $LGROUP
+SCRIPT_ROOT    = $SCRIPT_ROOT
+ADD_BLFS_TOOLS = $BLFS_TOOL
+
+BASEDIR        = \$(MOUNT_PT)
+SRCSDIR        = \$(BASEDIR)/sources
+CMDSDIR        = \$(BASEDIR)/\$(SCRIPT_ROOT)/$PROGNAME-commands
+LOGDIR         = \$(BASEDIR)/\$(SCRIPT_ROOT)/logs
+TESTLOGDIR     = \$(BASEDIR)/\$(SCRIPT_ROOT)/test-logs
+
+crCMDSDIR      = /\$(SCRIPT_ROOT)/$PROGNAME-commands
+crLOGDIR       = /\$(SCRIPT_ROOT)/logs
+crTESTLOGDIR   = /\$(SCRIPT_ROOT)/test-logs
+
+SU_LUSER       = su - \$(LUSER) -c
+LUSER_HOME     = /home/\$(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"
+
+export PATH := \${PATH}:/usr/sbin
+
+include makefile-functions
+
+EOF
+) > $MKFILE
+}
+
 #=======================
 
 




More information about the alfs-log mailing list