From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KRZI2-0004aQ-KR for mharc-grub-devel@gnu.org; Fri, 08 Aug 2008 17:14:26 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KRZI0-0004Zq-BC for grub-devel@gnu.org; Fri, 08 Aug 2008 17:14:24 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KRZHq-0004Yp-OX for grub-devel@gnu.org; Fri, 08 Aug 2008 17:14:23 -0400 Received: from [199.232.76.173] (port=50225 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KRZHq-0004Ym-LR for grub-devel@gnu.org; Fri, 08 Aug 2008 17:14:14 -0400 Received: from mailout10.t-online.de ([194.25.134.21]:59659) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KRZHp-0003IH-4V for grub-devel@gnu.org; Fri, 08 Aug 2008 17:14:14 -0400 Received: from fwd29.aul.t-online.de by mailout10.sul.t-online.de with smtp id 1KRZHB-0003cP-00; Fri, 08 Aug 2008 23:13:33 +0200 Received: from [10.3.2.2] (XdDu5aZU8hhIJ2O23OkEucLTUvqyuIDJB3zsMUoBNDfjmx3y8ikbh8pq6XVebxMZuM@[217.235.201.166]) by fwd29.aul.t-online.de with esmtp id 1KRZH5-1k0e2a0; Fri, 8 Aug 2008 23:13:27 +0200 Message-ID: <489CB6F0.4090406@t-online.de> Date: Fri, 08 Aug 2008 23:13:20 +0200 From: Christian Franke User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080702 SeaMonkey/1.1.11 MIME-Version: 1.0 To: The development of GRUB 2 Content-Type: multipart/mixed; boundary="------------010201020503050200010502" X-ID: XdDu5aZU8hhIJ2O23OkEucLTUvqyuIDJB3zsMUoBNDfjmx3y8ikbh8pq6XVebxMZuM X-TOI-MSGID: 996de787-87fd-4e10-b0aa-98e18b7b0426 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Subject: [PATCH] Don't install Cygwin specific files elsewhere X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Aug 2008 21:14:24 -0000 This is a multi-part message in MIME format. --------------010201020503050200010502 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit This patch prevents the install of grub.d/10_windows on other OS. grub-pe2elf is only installed if requested by --enable-grub-pe2elf. Even on Cygwin, grub-pe2elf is only required during build. Christian 2008-08-08 Christian Franke * Makefile.in: Add `target_os' and `enable_grub_pe2elf'. * conf/common.rmk: Install `grub-pe2elf' only if requested. Install `grub.d/10_windows' only on Cygwin. * configure.ac: Add subst of `target_os'. Check `target_os' also before setting TARGET_OBJ2ELF. Add `--enable-grub-pe2elf'. --------------010201020503050200010502 Content-Type: text/x-diff; name="grub2-install-cygwin-only.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="grub2-install-cygwin-only.patch" diff --git a/Makefile.in b/Makefile.in index 2121431..6137974 100644 --- a/Makefile.in +++ b/Makefile.in @@ -48,6 +48,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ target_cpu = @target_cpu@ +target_os = @target_os@ platform = @platform@ INSTALL = @INSTALL@ @@ -92,6 +93,7 @@ UNIFONT_HEX = @UNIFONT_HEX@ # Options. enable_grub_emu = @enable_grub_emu@ enable_grub_fstest = @enable_grub_fstest@ +enable_grub_pe2elf = @enable_grub_pe2elf@ enable_lzo = @enable_lzo@ ### General variables. diff --git a/conf/common.rmk b/conf/common.rmk index 3d674a6..95859f7 100644 --- a/conf/common.rmk +++ b/conf/common.rmk @@ -100,7 +100,10 @@ grub_editenv_SOURCES = util/grub-editenv.c lib/envblk.c util/misc.c kern/misc.c CLEANFILES += grub-editenv # for grub-pe2elf +ifeq ($(enable_grub_pe2elf), yes) bin_UTILITIES += grub-pe2elf +endif + grub_pe2elf_SOURCES = util/grub-pe2elf.c util/misc.c CLEANFILES += grub-pe2elf @@ -120,7 +123,11 @@ CLEANFILES += update-grub_lib %: util/grub.d/%.in config.status ./config.status --file=$@:$< chmod +x $@ -update-grub_SCRIPTS = 00_header 10_linux 10_hurd 10_windows 30_os-prober 40_custom +update-grub_SCRIPTS = 00_header 10_linux 10_hurd 30_os-prober 40_custom +ifeq ($(target_os), cygwin) +update-grub_SCRIPTS += 10_windows +endif + CLEANFILES += $(update-grub_SCRIPTS) update-grub_DATA += util/grub.d/README diff --git a/configure.ac b/configure.ac index 7a5938a..f561b8b 100644 --- a/configure.ac +++ b/configure.ac @@ -100,6 +100,7 @@ case "$target_cpu" in esac AC_SUBST(target_cpu) +AC_SUBST(target_os) AC_SUBST(platform) # @@ -206,9 +207,10 @@ AC_MSG_RESULT([$TARGET_IMG_LDFLAGS_AC]) # For platforms where ELF is not the default link format. AC_MSG_CHECKING([for command to convert module to ELF format]) -if test "$host_os" = cygwin; then - TARGET_OBJ2ELF='grub-pe2elf.exe' -fi +case "${host_os}:${target_os}" in + cygwin:cygwin) TARGET_OBJ2ELF='grub-pe2elf' ;; + *) ;; +esac AC_SUBST(TARGET_OBJ2ELF) AC_MSG_RESULT([$TARGET_OBJ2ELF]) @@ -385,6 +387,11 @@ AC_ARG_ENABLE([grub-fstest], [build and install the `grub-fstest' debugging utility])]) AC_SUBST([enable_grub_fstest]) +AC_ARG_ENABLE([grub-pe2elf], + [AS_HELP_STRING([--enable-grub-pe2elf], + [build and install the `grub-pe2elf' conversion utility])]) +AC_SUBST([enable_grub_pe2elf]) + # Output files. AC_CONFIG_LINKS([include/grub/cpu:include/grub/$target_cpu include/grub/machine:include/grub/$target_cpu/$platform]) --------------010201020503050200010502--