From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1K8qrq-00007J-8U for mharc-grub-devel@gnu.org; Wed, 18 Jun 2008 02:10:02 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K8qro-00006w-Rf for grub-devel@gnu.org; Wed, 18 Jun 2008 02:10:00 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K8qro-00006f-A9 for grub-devel@gnu.org; Wed, 18 Jun 2008 02:10:00 -0400 Received: from [199.232.76.173] (port=58118 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K8qro-00006c-6c for grub-devel@gnu.org; Wed, 18 Jun 2008 02:10:00 -0400 Received: from gateway16.websitewelcome.com ([69.56.206.4]:32998) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1K8qrn-0003kQ-Jm for grub-devel@gnu.org; Wed, 18 Jun 2008 02:09:59 -0400 Received: (qmail 22700 invoked from network); 18 Jun 2008 06:13:48 -0000 Received: from gator297.hostgator.com (74.53.228.114) by gateway16.websitewelcome.com with SMTP; 18 Jun 2008 06:13:48 -0000 Received: from c-67-185-142-228.hsd1.wa.comcast.net ([67.185.142.228]:47667 helo=localhost) by gator297.hostgator.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.68) (envelope-from ) id 1K8qrf-0007ED-2B for grub-devel@gnu.org; Wed, 18 Jun 2008 01:09:51 -0500 Date: Tue, 17 Jun 2008 23:09:24 -0700 From: Colin D Bennett To: grub-devel@gnu.org Message-ID: <20080617230924.2486e547@gibibit.com> In-Reply-To: <1213747469.18428.14.camel@dv> References: <20080617105123.6547c227@gibibit.com> <1213731972.31285.13.camel@dv> <20080617130404.1e225725@gibibit.com> <1213747469.18428.14.camel@dv> X-Mailer: Claws Mail 3.4.0 (GTK+ 2.12.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator297.hostgator.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - gibibit.com X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) 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 06:10:01 -0000 On Tue, 17 Jun 2008 20:04:29 -0400 Pavel Roskin wrote: > On Tue, 2008-06-17 at 13:04 -0700, Colin D Bennett wrote: >=20 > > I'm not sure. All I know is that I did=20 > > ./configure --prefix=3D/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. >=20 > I think I know what you actually did: >=20 > ./configure > make > ./configure --prefix=3D/home/cdb/bin/grub > make > make install >=20 > "/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. You are probably right... sorry to bother you with my error. > We don't want wrong path to be hardcoded in grub-mkimage. Working it > around in scripts would keep grub-mkimage incorrect. >=20 > I think the best solution would be to add Makefile to > the =EF=BB=BFgrub-mkimage.o dependencies. GRUB_LIBDIR is written to Make= file > and =EF=BB=BFgrub-mkimage.c uses it. Here's the patch (*.mk changes are = not > included): >=20 > 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 =3D grub-mkdevicemap > # For grub-mkimage. > grub_mkimage_SOURCES =3D util/i386/efi/grub-mkimage.c util/misc.c \ > util/resolve.c > +util/i386/efi/grub-mkimage.c_DEPENDENCIES =3D Makefile > =20 > # For grub-setup. > #grub_setup_SOURCES =3D 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 =3D util/elf/grub-mkimage.c util/misc.c \ > util/resolve.c > grub_mkimage_LDFLAGS =3D $(LIBLZO) > +util/elf/grub-mkimage.c_DEPENDENCIES =3D Makefile > =20 > # For grub-mkdevicemap. > grub_mkdevicemap_SOURCES =3D 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 =3D util/elf/grub-mkimage.c util/misc.c \ > util/resolve.c > grub_mkimage_LDFLAGS =3D $(LIBLZO) > +util/elf/grub-mkimage.c_DEPENDENCIES =3D Makefile > =20 > # For grub-mkdevicemap. > grub_mkdevicemap_SOURCES =3D 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 =3D util/i386/pc/grub-mkimage.c > util/misc.c \ util/resolve.c > grub_mkimage_CFLAGS =3D > -DGRUB_MEMORY_MACHINE_LINK_ADDR=3D$(GRUB_MEMORY_MACHINE_LINK_ADDR) > grub_mkimage_LDFLAGS =3D $(LIBLZO) > +util/i386/pc/grub-mkimage.c_DEPENDENCIES =3D Makefile=20 > # For grub-setup. > util/i386/pc/grub-setup.c_DEPENDENCIES =3D 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 =3D util/elf/grub-mkimage.c util/misc.c \ > util/resolve.c=20 > +util/elf/grub-mkimage.c_DEPENDENCIES =3D Makefile > =20 > # For grub-mkdevicemap. > grub_mkdevicemap_SOURCES =3D util/grub-mkdevicemap.c > util/misc.c \ Sounds good to me! Thanks, Colin