]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2009-03-04 Robert Millan <rmh@aybabtu.com>
authorrobertmh <robertmh@localhost>
Wed, 4 Mar 2009 22:00:41 +0000 (22:00 +0000)
committerrobertmh <robertmh@localhost>
Wed, 4 Mar 2009 22:00:41 +0000 (22:00 +0000)
        Filter /etc/grub.d/10_* so that only add-ons for native kernels are
        installed.

        * Makefile.in (host_kernel): New variable.
        * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
        scripts instead of just the windows one.
        * configure.ac: Initialize and AC_SUBST `host_kernel'.

ChangeLog
Makefile.in
conf/common.mk
conf/common.rmk
configure
configure.ac

index 7c49752983422c3afa1f1756099d2037084ad576..9047b44f9f68359cc5246a205825a75152101070 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2009-03-04  Robert Millan  <rmh@aybabtu.com>
+
+       Filter /etc/grub.d/10_* so that only add-ons for native kernels are
+       installed.
+
+       * Makefile.in (host_kernel): New variable.
+       * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
+       scripts instead of just the windows one.
+       * configure.ac: Initialize and AC_SUBST `host_kernel'.
+
 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
 
        * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
index 44dc57795be9030679cc1f251c09c9f08de084eb..28aa3850628f5db071bfa7fd7abecb83b0f079a1 100644 (file)
@@ -48,6 +48,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 
 host_os = @host_os@
+host_kernel = @host_kernel@
 host_cpu = @host_cpu@
 
 target_cpu = @target_cpu@
index b07871f785e392bc5687a3bbe2256b5278a2091b..b16daf5203c516fca67d547c8452d08005e696f6 100644 (file)
@@ -578,9 +578,9 @@ CLEANFILES += update-grub_lib
 %: util/grub.d/%.in config.status
        ./config.status --file=$@:$<
        chmod +x $@
-grub-mkconfig_SCRIPTS = 00_header 10_linux 10_hurd 10_freebsd 30_os-prober 40_custom
-ifeq ($(host_os), cygwin)
-grub-mkconfig_SCRIPTS += 10_windows
+grub-mkconfig_SCRIPTS = 00_header 30_os-prober 40_custom
+ifneq (, $(host_kernel))
+grub-mkconfig_SCRIPTS += 10_$(host_kernel)
 endif
 
 CLEANFILES += $(grub-mkconfig_SCRIPTS)
index 9a62ac3c53faaf6cdf67b9961e52565e12c2b1b5..857d8b8691bb74dbcff8480d2c5395547e4be53d 100644 (file)
@@ -145,9 +145,9 @@ CLEANFILES += update-grub_lib
 %: util/grub.d/%.in config.status
        ./config.status --file=$@:$<
        chmod +x $@
-grub-mkconfig_SCRIPTS = 00_header 10_linux 10_hurd 10_freebsd 30_os-prober 40_custom
-ifeq ($(host_os), cygwin)
-grub-mkconfig_SCRIPTS += 10_windows
+grub-mkconfig_SCRIPTS = 00_header 30_os-prober 40_custom
+ifneq (, $(host_kernel))
+grub-mkconfig_SCRIPTS += 10_$(host_kernel)
 endif
 
 CLEANFILES += $(grub-mkconfig_SCRIPTS)
index b249580806647466f989df911af6cf5b991409da..89b564ae3f568bcc68030a56d5cbc509fd645594 100644 (file)
--- a/configure
+++ b/configure
@@ -664,6 +664,7 @@ target
 target_cpu
 target_vendor
 target_os
+host_kernel
 platform
 CMP
 YACC
@@ -2006,6 +2007,17 @@ case "$host_os" in
   mingw32) host_os=cygwin ;;
 esac
 
+# This normalizes the names, and creates a new variable ("host_kernel")
+# while at it, since the mapping is not always 1:1 (e.g. different OSes
+# using the same kernel type).
+case "$host_os" in
+  gnu*)                                host_kernel=hurd ;;
+  linux*)                      host_kernel=linux ;;
+  freebsd* | kfreebsd*-gnu)    host_kernel=freebsd ;;
+  cygwin)                      host_kernel=windows ;;
+esac
+
+
 
 
 
@@ -9528,6 +9540,7 @@ target!$target$ac_delim
 target_cpu!$target_cpu$ac_delim
 target_vendor!$target_vendor$ac_delim
 target_os!$target_os$ac_delim
+host_kernel!$host_kernel$ac_delim
 platform!$platform$ac_delim
 CMP!$CMP$ac_delim
 YACC!$YACC$ac_delim
@@ -9577,7 +9590,7 @@ LIBOBJS!$LIBOBJS$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 96; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
index 0220898c61dfd444918a8101ab9d4b7994ec20ae..134e0a33990ffa3e169c9de03fdf634c500252d2 100644 (file)
@@ -103,8 +103,19 @@ case "$host_os" in
   mingw32) host_os=cygwin ;;
 esac
 
+# This normalizes the names, and creates a new variable ("host_kernel")
+# while at it, since the mapping is not always 1:1 (e.g. different OSes
+# using the same kernel type).
+case "$host_os" in
+  gnu*)                                host_kernel=hurd ;;
+  linux*)                      host_kernel=linux ;;
+  freebsd* | kfreebsd*-gnu)    host_kernel=freebsd ;;
+  cygwin)                      host_kernel=windows ;;
+esac
+
 AC_SUBST(host_cpu)
 AC_SUBST(host_os)
+AC_SUBST(host_kernel)
 
 AC_SUBST(target_cpu)
 AC_SUBST(platform)