Why didn't you remove :<br><pre>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>
                --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>
                $(DISABLE_LARGEFILE) \<br>                $(DISABLE_IPV6) \<br>             $(QUIET) $(GRUB_CONF_OPT) \<br>   )<br>endef<br></pre>This might be handled by the autotool infrastructure.<br>Otherwise it looks good, thx !<br><br>--<br>Lionel Landwerlin<br>
<br><div class="gmail_quote">On Mon, Jan 4, 2010 at 2:01 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;">
Here is my attempt to use the autotools macros.<br>
I look forward to any discussion, suggestions for improvement etc.<br>
<br>
I attach the whole file since it is effectively a rewrite.  If it is<br>
acceptable I will submit as a git diff against head.<br>
<div><div></div><div class="h5"><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 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 $(GRUB_DIR)/grub grub<br>
>       mkdir -p $(dir $(STAGING_DIR)/$(GRUB_TARGET_BINARY))<br>
>       mv $(GRUB_DIR)/$(GRUB_BINARY) $(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 the grub binary statically.<br>
> Is the right way to do this to override the target 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>
> > <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 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 écrit :<br>
> > > I could give that a shot.  I thought as a start I would go with the<br>
> > > smallest change possible.  Any suggestions for an 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 wrote:<br>
> > > > Le samedi 02 janvier 2010 à 17:46 -0500, Clark Rawlins 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 <<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> 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: $(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 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>
</div></div></blockquote></div><br>