Standardized handling of the optional param CONFIG

This commit is contained in:
George Boudreau 2006-03-21 13:25:20 +00:00
parent b0976d2e85
commit 0271c0c10d
4 changed files with 27 additions and 25 deletions

View file

@ -216,12 +216,14 @@ boot_Makefiles() { #
*grub*) continue ;; *grub*) continue ;;
*whatnext*) continue ;; *whatnext*) continue ;;
*settingenvironment*) sed 's@PS1=@set +h\nPS1=@' -i $file ;; *settingenvironment*) sed 's@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 [[ -z $CONFIG ]] && continue
sed "s|make mrproper|make mrproper\ncp $CONFIG .config|" -i $file # Copy the config file to /sources with a standardized name
# You cannot run menuconfig from within the makefile 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 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 if [[ -n "$KEYMAP" ]]; then
sed "s|^loadkeys -m.*>|loadkeys -m $KEYMAP >|" -i $file sed "s|^loadkeys -m.*>|loadkeys -m $KEYMAP >|" -i $file
else else
@ -856,12 +858,14 @@ bootable_Makefiles() { #
case $this_script in case $this_script in
*grub*) continue ;; *grub*) continue ;;
*kernel) *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 [[ -z $CONFIG ]] && continue
sed "s|make mrproper|make mrproper\ncp $CONFIG .config|" -i $file # Copy the config file to /sources with a standardized name
# You cannot run menuconfig from within the makefile 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 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 if [[ -n "$KEYMAP" ]]; then
sed "s|^loadkeys -m.*>|loadkeys -m $KEYMAP >|" -i $file sed "s|^loadkeys -m.*>|loadkeys -m $KEYMAP >|" -i $file
else else
@ -937,13 +941,14 @@ bm_bootable_Makefiles() { #
case $this_script in case $this_script in
*grub*) continue ;; *grub*) continue ;;
*kernel) *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 [[ -z $CONFIG ]] && continue
cfg_file="/sources/`basename $CONFIG`" # Copy the named config file to /sources with a standardized name
sed "s|make mrproper|make mrproper\ncp $cfg_file .config|" -i $file cp -v $CONFIG $BUILDDIR/sources/kernel-config
# You cannot run menuconfig from within the makefile 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 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 if [[ -n "$KEYMAP" ]]; then
sed "s|^loadkeys -m.*>|loadkeys -m $KEYMAP >|" -i $file sed "s|^loadkeys -m.*>|loadkeys -m $KEYMAP >|" -i $file
else else

View file

@ -455,11 +455,6 @@ EOF
) >> $MKFILE.tmp ) >> $MKFILE.tmp
fi fi
if [[ `_IS_ $this_script kernel` ]] ; then
# not much really, script does everything..
echo -e "\t@cp -f $CONFIG \$(MOUNT_PT)/sources/kernel-config" >> $MKFILE.tmp
fi
# Check if we have a real /etc/fstab file # Check if we have a real /etc/fstab file
if [[ `_IS_ $this_script fstab` ]] && [[ -n "$FSTAB" ]] ; then if [[ `_IS_ $this_script fstab` ]] && [[ -n "$FSTAB" ]] ; then
wrt_copy_fstab "$this_script" wrt_copy_fstab "$this_script"

View file

@ -222,14 +222,15 @@ chapter789_Makefiles() {
# The filesystems can't be unmounted via Makefile and the user # The filesystems can't be unmounted via Makefile and the user
# should enter the chroot environment to create the root # should enter the chroot environment to create the root
# password, edit several files and setup Grub. # 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 no .config file is supplied, the kernel build is skipped
if [ -z $CONFIG ] && [[ `_IS_ ${this_script} kernel` ]] ; then #
continue case ${this_script} in
fi *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 # First append each name of the script files to a list (this will become
# the names of the targets in the Makefile # the names of the targets in the Makefile

View file

@ -722,6 +722,7 @@ extract_commands() { #
grep "\-version" $BOOK/general.ent | sed -e 's@<!ENTITY @@' \ grep "\-version" $BOOK/general.ent | sed -e 's@<!ENTITY @@' \
-e 's@">@"@' \ -e 's@">@"@' \
-e '/generic/d' >> packages -e '/generic/d' >> packages
echo " ...OK"
;; ;;
esac esac