Sorry, I didn't catch the --prefix=/<br><br><div class="gmail_quote">On Mon, Jan 4, 2010 at 2:22 PM, Clark Rawlins <span dir="ltr"><<a href="mailto:clark.rawlins@escient.com">clark.rawlins@escient.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">On Mon, 2010-01-04 at 14:09 +0100, Lionel Landwerlin wrote:<br>
> Why didn't you remove :<br>
> define GRUB_CONFIGURE_CMDS<br>
> (cd $(GRUB_SRCDIR) && rm -rf config.cache && \<br>
> $(TARGET_CONFIGURE_OPTS) \<br>
> $(TARGET_CONFIGURE_ARGS) \<br>
> $(GRUB_CONF_ENV) \<br>
> ./configure \<br>
><br>
> --target=$(GNU_TARGET_NAME) \<br>
> --host=$(GNU_TARGET_NAME) \<br>
> --build=$(GNU_HOST_NAME) \<br>
> --prefix=/ \<br>
> --mandir=/usr/man \<br>
> --infodir=/usr/info \<br>
> $(DISABLE_DOCUMENTATION) \<br>
> $(DISABLE_NLS) \<br>
><br>
> $(DISABLE_LARGEFILE) \<br>
> $(DISABLE_IPV6) \<br>
> $(QUIET) $(GRUB_CONF_OPT) \<br>
> )<br>
> endef<br>
> This might be handled by the autotool infrastructure.<br>
> Otherwise it looks good, thx !<br>
<br>
</div>I would have but I didn't see a way to override the --prefix argument to<br>
configure. Also the TARGET_CONFIGURE_ENV needed to be modified to<br>
include GRUB_CFLAGS defined earlier in the make fragment. Modifying the<br>
CFLAGS also caused the config.cache to not match the global<br>
configuration cache so I couldn't use that either.<br>
<br>
Of course if I missed a better way of handling these issues I am open to<br>
it.<br>
<div><div></div><div class="h5"><br>
><br>
> --<br>
> Lionel Landwerlin<br>
><br>
> On Mon, Jan 4, 2010 at 2:01 PM, Clark Rawlins<br>
> <<a href="mailto:clark.rawlins@escient.com">clark.rawlins@escient.com</a>> wrote:<br>
> Here is my attempt to use the autotools macros.<br>
> I look forward to any discussion, suggestions for improvement<br>
> etc.<br>
><br>
> I attach the whole file since it is effectively a rewrite. If<br>
> it is<br>
> acceptable I will submit as a git diff against head.<br>
><br>
><br>
> On Sun, 2010-01-03 at 08:43 -0500, Clark Rawlins wrote:<br>
> > Okay,<br>
> ><br>
> > I've started looking at this but it isn't clear to me how to<br>
> handle the<br>
> > following:<br>
> ><br>
> > $(GRUB_DIR)/$(GRUB_BINARY): $(GRUB_DIR)/.configured<br>
> > $(MAKE) CC=$(TARGET_CC) -C $(GRUB_DIR)<br>
> > rm -f $(GRUB_DIR)/$(GRUB_BINARY)<br>
> > $(MAKE) CC=$(TARGET_CC) CFLAGS+=-static -C<br>
> $(GRUB_DIR)/grub grub<br>
> > mkdir -p $(dir $(STAGING_DIR)/$(GRUB_TARGET_BINARY))<br>
> > mv $(GRUB_DIR)/$(GRUB_BINARY)<br>
> $(STAGING_DIR)/$(GRUB_TARGET_BINARY).static<br>
> > $(MAKE) CC=$(TARGET_CC) -C $(GRUB_DIR)/grub<br>
> ><br>
> > This builds everything dynamically linked first then builds<br>
> the grub binary statically.<br>
> > Is the right way to do this to override the target<br>
> after/before calling the autotools macro?<br>
> ><br>
> ><br>
> > On Sun, 2010-01-03 at 05:08 +0100, Lionel Landwerlin wrote:<br>
> > > Here is one example :<br>
> > ><br>
> > ><br>
> <a href="http://git.buildroot.org/buildroot/commit/?id=21bab8862f3c2906af347e5a993ce4cd36c1b063" target="_blank">http://git.buildroot.org/buildroot/commit/?id=21bab8862f3c2906af347e5a993ce4cd36c1b063</a><br>
> > ><br>
> > > You can find a lot like this in the recent git history.<br>
> > > I'm think to the new infrastructure because it provides<br>
> all the glue to<br>
> > > configure the package, especially the 2 lines you added.<br>
> > ><br>
> > > Regards,<br>
> > ><br>
> > ><br>
> > > Le samedi 02 janvier 2010 à 21:15 -0500, Clark Rawlins a<br>
> écrit :<br>
> > > > I could give that a shot. I thought as a start I would<br>
> go with the<br>
> > > > smallest change possible. Any suggestions for an<br>
> example to look at for<br>
> > > > switching grub to the autotools macros?<br>
> > > ><br>
> > > ><br>
> > > > On Sun, 2010-01-03 at 01:13 +0100, Lionel Landwerlin<br>
> wrote:<br>
> > > > > Le samedi 02 janvier 2010 à 17:46 -0500, Clark Rawlins<br>
> a écrit :<br>
> > > > > > Grub build failed at the link stage because it<br>
> > > > > > couldn't find libcurses. Adding these variable<br>
> > > > > > invocations to the configure line make it work.<br>
> > > > > ><br>
> > > > > > Signed-off-by: Clark Rawlins<br>
> <<a href="mailto:clark.rawlins@escient.com">clark.rawlins@escient.com</a>><br>
> > > > > > ---<br>
> > > > > > target/x86/grub/<a href="http://grub.mk" target="_blank">grub.mk</a> | 2 ++<br>
> > > > > > 1 files changed, 2 insertions(+), 0 deletions(-)<br>
> > > > > ><br>
> > > > > > diff --git a/target/x86/grub/<a href="http://grub.mk" target="_blank">grub.mk</a><br>
> b/target/x86/grub/<a href="http://grub.mk" target="_blank">grub.mk</a><br>
> > > > > > index af46244..21f089f 100644<br>
> > > > > > --- a/target/x86/grub/<a href="http://grub.mk" target="_blank">grub.mk</a><br>
> > > > > > +++ b/target/x86/grub/<a href="http://grub.mk" target="_blank">grub.mk</a><br>
> > > > > > @@ -81,6 +81,8 @@ $(GRUB_DIR)/.unpacked:<br>
> $(DL_DIR)/$(GRUB_SOURCE) $(DL_DIR)/$(GRUB_PATCH)<br>
> > > > > > $(GRUB_DIR)/.configured: $(GRUB_DIR)/.unpacked<br>
> > > > > > (cd $(GRUB_DIR); rm -rf config.cache; \<br>
> > > > > > $(TARGET_CONFIGURE_OPTS) \<br>
> > > > > > + $(TARGET_CONFIGURE_ARGS) \<br>
> > > > > > + $(TARGET_CONFIGURE_ENV) \<br>
> > > > > > CFLAGS="$(TARGET_CFLAGS)" \<br>
> > > > > > CPPFLAGS="$(GRUB_CFLAGS)" \<br>
> > > > > > ./configure $(QUIET) \<br>
> > > > ><br>
> > > > > Maybe you should consider switching grub to the<br>
> autotool infrastructure.<br>
> > > > ><br>
> > > > > --<br>
> > > > > Lionel Landwerlin<br>
> > > > ><br>
> > > > > _______________________________________________<br>
> > > > > buildroot mailing list<br>
> > > > > <a href="mailto:buildroot@busybox.net">buildroot@busybox.net</a><br>
> > > > > <a href="http://lists.busybox.net/mailman/listinfo/buildroot" target="_blank">http://lists.busybox.net/mailman/listinfo/buildroot</a><br>
> > > ><br>
> > ><br>
> ><br>
> > _______________________________________________<br>
> > buildroot mailing list<br>
> > <a href="mailto:buildroot@busybox.net">buildroot@busybox.net</a><br>
> > <a href="http://lists.busybox.net/mailman/listinfo/buildroot" target="_blank">http://lists.busybox.net/mailman/listinfo/buildroot</a><br>
><br>
><br>
><br>
<br>
</div></div></blockquote></div><br>