From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1K8lAB-0000hh-Li for mharc-grub-devel@gnu.org; Tue, 17 Jun 2008 20:04:35 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K8lA9-0000hI-Nk for grub-devel@gnu.org; Tue, 17 Jun 2008 20:04:33 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K8lA8-0000h6-9S for grub-devel@gnu.org; Tue, 17 Jun 2008 20:04:33 -0400 Received: from [199.232.76.173] (port=44019 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K8lA8-0000h3-6D for grub-devel@gnu.org; Tue, 17 Jun 2008 20:04:32 -0400 Received: from c60.cesmail.net ([216.154.195.49]:60174) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1K8lA7-0000It-H4 for grub-devel@gnu.org; Tue, 17 Jun 2008 20:04:31 -0400 Received: from unknown (HELO relay.cesmail.net) ([192.168.1.81]) by c60.cesmail.net with ESMTP; 17 Jun 2008 20:04:30 -0400 Received: from [192.168.0.21] (static-72-92-88-10.phlapa.fios.verizon.net [72.92.88.10]) by relay.cesmail.net (Postfix) with ESMTP id 3E672619058 for ; Tue, 17 Jun 2008 20:04:30 -0400 (EDT) From: Pavel Roskin To: The development of GRUB 2 In-Reply-To: <20080617130404.1e225725@gibibit.com> References: <20080617105123.6547c227@gibibit.com> <1213731972.31285.13.camel@dv> <20080617130404.1e225725@gibibit.com> Content-Type: text/plain; charset=UTF-8 Date: Tue, 17 Jun 2008 20:04:29 -0400 Message-Id: <1213747469.18428.14.camel@dv> Mime-Version: 1.0 X-Mailer: Evolution 2.22.2 (2.22.2-2.fc9) Content-Transfer-Encoding: 8bit X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: [PATCH] Fix grub-install to use prefix for modules dir 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: Wed, 18 Jun 2008 00:04:34 -0000 On Tue, 2008-06-17 at 13:04 -0700, Colin D Bennett wrote: > I'm not sure. All I know is that I did > ./configure --prefix=/home/cdb/bin/grub && make && make install, > then I tried to do /home/cdb/bin/grub/bin/grub-install /media/sdc1 and > grub-mkimage was getting called with /usr/local/lib/something. Since I > specified --prefix to configure, I expect grub never ever to refer > to /usr/local. This patch fixed my problem. I think I know what you actually did: ./configure make ./configure --prefix=/home/cdb/bin/grub make make install "/usr/local" was hardcoded into grub-mkimage in the first run. In the second run, grub-mkimage wasn't rebuilt because it's not a script and because config.h didn't change. We don't want wrong path to be hardcoded in grub-mkimage. Working it around in scripts would keep grub-mkimage incorrect. I think the best solution would be to add Makefile to the grub-mkimage.o dependencies. GRUB_LIBDIR is written to Makefile and grub-mkimage.c uses it. Here's the patch (*.mk changes are not included): diff --git a/conf/i386-efi.rmk b/conf/i386-efi.rmk index 87626c2..311b6ab 100644 --- a/conf/i386-efi.rmk +++ b/conf/i386-efi.rmk @@ -17,6 +17,7 @@ sbin_UTILITIES = grub-mkdevicemap # For grub-mkimage. grub_mkimage_SOURCES = util/i386/efi/grub-mkimage.c util/misc.c \ util/resolve.c +util/i386/efi/grub-mkimage.c_DEPENDENCIES = Makefile # For grub-setup. #grub_setup_SOURCES = util/i386/pc/grub-setup.c util/biosdisk.c \ diff --git a/conf/i386-ieee1275.rmk b/conf/i386-ieee1275.rmk index ac2f45d..e4f2a66 100644 --- a/conf/i386-ieee1275.rmk +++ b/conf/i386-ieee1275.rmk @@ -50,6 +50,7 @@ endif grub_mkimage_SOURCES = util/elf/grub-mkimage.c util/misc.c \ util/resolve.c grub_mkimage_LDFLAGS = $(LIBLZO) +util/elf/grub-mkimage.c_DEPENDENCIES = Makefile # For grub-mkdevicemap. grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/misc.c \ diff --git a/conf/i386-linuxbios.rmk b/conf/i386-linuxbios.rmk index 31f03a9..d2546be 100644 --- a/conf/i386-linuxbios.rmk +++ b/conf/i386-linuxbios.rmk @@ -49,6 +49,7 @@ endif grub_mkimage_SOURCES = util/elf/grub-mkimage.c util/misc.c \ util/resolve.c grub_mkimage_LDFLAGS = $(LIBLZO) +util/elf/grub-mkimage.c_DEPENDENCIES = Makefile # For grub-mkdevicemap. grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/misc.c \ diff --git a/conf/i386-pc.rmk b/conf/i386-pc.rmk index a3f8467..7b7924f 100644 --- a/conf/i386-pc.rmk +++ b/conf/i386-pc.rmk @@ -76,6 +76,7 @@ grub_mkimage_SOURCES = util/i386/pc/grub-mkimage.c util/misc.c \ util/resolve.c grub_mkimage_CFLAGS = -DGRUB_MEMORY_MACHINE_LINK_ADDR=$(GRUB_MEMORY_MACHINE_LINK_ADDR) grub_mkimage_LDFLAGS = $(LIBLZO) +util/i386/pc/grub-mkimage.c_DEPENDENCIES = Makefile # For grub-setup. util/i386/pc/grub-setup.c_DEPENDENCIES = grub_setup_init.h diff --git a/conf/powerpc-ieee1275.rmk b/conf/powerpc-ieee1275.rmk index 2c16bc1..51442c6 100644 --- a/conf/powerpc-ieee1275.rmk +++ b/conf/powerpc-ieee1275.rmk @@ -37,6 +37,7 @@ endif # For grub-mkimage. grub_mkimage_SOURCES = util/elf/grub-mkimage.c util/misc.c \ util/resolve.c +util/elf/grub-mkimage.c_DEPENDENCIES = Makefile # For grub-mkdevicemap. grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/misc.c \ -- Regards, Pavel Roskin