r2379 - in jhalfs/branches/experimental: CLFS HLFS LFS common

georgeb at linuxfromscratch.org georgeb at linuxfromscratch.org
Tue Mar 21 05:25:20 PST 2006


Author: georgeb
Date: 2006-03-21 06:25:20 -0700 (Tue, 21 Mar 2006)
New Revision: 2379

Modified:
   jhalfs/branches/experimental/CLFS/master.sh
   jhalfs/branches/experimental/HLFS/master.sh
   jhalfs/branches/experimental/LFS/master.sh
   jhalfs/branches/experimental/common/common-functions
Log:
Standardized handling of the optional param CONFIG

Modified: jhalfs/branches/experimental/CLFS/master.sh
===================================================================
--- jhalfs/branches/experimental/CLFS/master.sh	2006-03-21 04:21:41 UTC (rev 2378)
+++ jhalfs/branches/experimental/CLFS/master.sh	2006-03-21 13:25:20 UTC (rev 2379)
@@ -216,12 +216,14 @@
       *grub*)     continue     ;;
       *whatnext*) continue     ;;
       *settingenvironment*) sed 's at PS1=@set +h\nPS1=@' -i $file  ;;
-      *kernel)   # if there is no kernel config file do not build the kernel
+      *kernel)    # if there is no kernel config file do not build the kernel
                 [[ -z $CONFIG ]] && continue
-                sed "s|make mrproper|make mrproper\ncp $CONFIG .config|" -i $file
-                # You cannot run menuconfig from within the makefile
+                  # Copy the config file to /sources with a standardized name
+                cp -v $CONFIG $BUILDDIR/sources/kernel-config
+                sed "s|make mrproper|make mrproper\ncp /sources/kernel-config .config|" -i $file
+                  # You cannot run menuconfig from within the makefile
                 sed 's|menuconfig|oldconfig|'     -i $file
-                #If defined include the keymap in the kernel
+                  #If defined include the keymap in the kernel
                 if [[ -n "$KEYMAP" ]]; then
                   sed "s|^loadkeys -m.*>|loadkeys -m $KEYMAP >|" -i $file
                 else
@@ -856,12 +858,14 @@
     case $this_script in
       *grub*)     continue ;;
       *kernel)
-               # if there is no kernel config file do not build the kernel
+                 # if there is no kernel config file do not build the kernel
                [[ -z $CONFIG ]] && continue
-               sed "s|make mrproper|make mrproper\ncp $CONFIG .config|" -i $file
-               # You cannot run menuconfig from within the makefile
+                 # Copy the config file to /sources with a standardized name
+               cp -v $CONFIG $BUILDDIR/sources/kernel-config
+               sed "s|make mrproper|make mrproper\ncp /sources/kernel-config .config|" -i $file
+                 # You cannot run menuconfig from within the makefile
                sed 's|menuconfig|oldconfig|'     -i $file
-               # If defined include the keymap in the kernel
+                 # If defined include the keymap in the kernel
                if [[ -n "$KEYMAP" ]]; then
                  sed "s|^loadkeys -m.*>|loadkeys -m $KEYMAP >|" -i $file
                else
@@ -937,13 +941,14 @@
     case $this_script in
       *grub*)     continue  ;;
       *kernel)
-               # if there is no kernel config file do not build the kernel
+                 # if there is no kernel config file do not build the kernel
                [[ -z $CONFIG ]] && continue
-               cfg_file="/sources/`basename $CONFIG`"
-               sed "s|make mrproper|make mrproper\ncp $cfg_file .config|" -i $file
-               # You cannot run menuconfig from within the makefile
+                 # Copy the named config file to /sources with a standardized name
+	       cp -v $CONFIG $BUILDDIR/sources/kernel-config
+               sed "s|make mrproper|make mrproper\ncp ../kernel-config .config|" -i $file
+                 # You cannot run menuconfig from within the makefile
                sed 's|menuconfig|oldconfig|'     -i $file
-               # If defined include the keymap in the kernel
+                 # If defined include the keymap in the kernel
                if [[ -n "$KEYMAP" ]]; then
                  sed "s|^loadkeys -m.*>|loadkeys -m $KEYMAP >|" -i $file
                else

Modified: jhalfs/branches/experimental/HLFS/master.sh
===================================================================
--- jhalfs/branches/experimental/HLFS/master.sh	2006-03-21 04:21:41 UTC (rev 2378)
+++ jhalfs/branches/experimental/HLFS/master.sh	2006-03-21 13:25:20 UTC (rev 2379)
@@ -455,11 +455,6 @@
 ) >> $MKFILE.tmp
     fi
 
-    if [[ `_IS_ $this_script kernel` ]] ; then
-      # not much really, script does everything..
-      echo -e "\t at cp -f $CONFIG \$(MOUNT_PT)/sources/kernel-config" >> $MKFILE.tmp
-    fi
-
     # Check if we have a real /etc/fstab file
     if [[ `_IS_ $this_script fstab` ]] && [[ -n "$FSTAB" ]] ; then
       wrt_copy_fstab "$this_script"

Modified: jhalfs/branches/experimental/LFS/master.sh
===================================================================
--- jhalfs/branches/experimental/LFS/master.sh	2006-03-21 04:21:41 UTC (rev 2378)
+++ jhalfs/branches/experimental/LFS/master.sh	2006-03-21 13:25:20 UTC (rev 2379)
@@ -222,14 +222,15 @@
     # The filesystems can't be unmounted via Makefile and the user
     # should enter the chroot environment to create the root
     # password, edit several files and setup Grub.
-    if [[ `_IS_ ${this_script} grub` ]] || [[ `_IS_ ${this_script} reboot` ]] ; then
-       continue
-    fi
-
+    #
     # If no .config file is supplied, the kernel build is skipped
-    if [ -z $CONFIG ] && [[ `_IS_ ${this_script} kernel` ]] ; then
-      continue
-    fi
+    #
+    case ${this_script} in
+      *grub)    continue ;;
+      *reboot)  continue ;;
+      *kernel)  [[ -z ${CONFIG} ]] && continue
+                cp ${CONFIG} $BUILDDIR/sources/kernel-config  ;;
+    esac
 
     # First append each name of the script files to a list (this will become
     # the names of the targets in the Makefile

Modified: jhalfs/branches/experimental/common/common-functions
===================================================================
--- jhalfs/branches/experimental/common/common-functions	2006-03-21 04:21:41 UTC (rev 2378)
+++ jhalfs/branches/experimental/common/common-functions	2006-03-21 13:25:20 UTC (rev 2379)
@@ -722,6 +722,7 @@
       grep "\-version" $BOOK/general.ent | sed -e 's@<!ENTITY @@' \
                                                -e 's@">@"@' \
                                                -e '/generic/d' >> packages
+      echo " ...OK"
       ;; 
   esac
 




More information about the alfs-log mailing list