[2018] 2009-03-04 Robert Millan <[email protected]>

Robert Millan <[email protected]>
Newsgroups gmane.comp.boot-loaders.grub.cvs
Message-ID <[email protected]>
Revision: 2018
          http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=2018
Author:   robertmh
Date:     2009-03-04 22:00:41 +0000 (Wed, 04 Mar 2009)
Log Message:
-----------
2009-03-04  Robert Millan  <[email protected]>

        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'.

Modified Paths:
--------------
    trunk/grub2/ChangeLog
    trunk/grub2/Makefile.in
    trunk/grub2/conf/common.mk
    trunk/grub2/conf/common.rmk
    trunk/grub2/configure
    trunk/grub2/configure.ac

Modified: trunk/grub2/ChangeLog
===================================================================
--- trunk/grub2/ChangeLog	2009-03-04 14:49:44 UTC (rev 2017)
+++ trunk/grub2/ChangeLog	2009-03-04 22:00:41 UTC (rev 2018)
@@ -1,3 +1,13 @@
+2009-03-04  Robert Millan  <[email protected]>
+
+	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  <[email protected]>
 
 	* conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and

Modified: trunk/grub2/Makefile.in
===================================================================
--- trunk/grub2/Makefile.in	2009-03-04 14:49:44 UTC (rev 2017)
+++ trunk/grub2/Makefile.in	2009-03-04 22:00:41 UTC (rev 2018)
@@ -48,6 +48,7 @@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 
 host_os = @host_os@
+host_kernel = @host_kernel@
 host_cpu = @host_cpu@
 
 target_cpu = @target_cpu@

Modified: trunk/grub2/conf/common.mk
===================================================================
--- trunk/grub2/conf/common.mk	2009-03-04 14:49:44 UTC (rev 2017)
+++ trunk/grub2/conf/common.mk	2009-03-04 22:00:41 UTC (rev 2018)
@@ -578,9 +578,9 @@
 %: 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)

Modified: trunk/grub2/conf/common.rmk
===================================================================
--- trunk/grub2/conf/common.rmk	2009-03-04 14:49:44 UTC (rev 2017)
+++ trunk/grub2/conf/common.rmk	2009-03-04 22:00:41 UTC (rev 2018)
@@ -145,9 +145,9 @@
 %: 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)

Modified: trunk/grub2/configure
===================================================================
--- trunk/grub2/configure	2009-03-04 14:49:44 UTC (rev 2017)
+++ trunk/grub2/configure	2009-03-04 22:00:41 UTC (rev 2018)
@@ -664,6 +664,7 @@
 target_cpu
 target_vendor
 target_os
+host_kernel
 platform
 CMP
 YACC
@@ -2006,12 +2007,23 @@
   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
 
 
 
 
 
 
+
+
 #
 # Checks for build programs.
 #
@@ -9528,6 +9540,7 @@
 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 @@
 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

Modified: trunk/grub2/configure.ac
===================================================================
--- trunk/grub2/configure.ac	2009-03-04 14:49:44 UTC (rev 2017)
+++ trunk/grub2/configure.ac	2009-03-04 22:00:41 UTC (rev 2018)
@@ -103,8 +103,19 @@
   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)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.