Sorry, I didn&#39;t catch the --prefix=/<br><br><div class="gmail_quote">On Mon, Jan 4, 2010 at 2:22 PM, Clark Rawlins <span dir="ltr">&lt;<a href="mailto:clark.rawlins@escient.com">clark.rawlins@escient.com</a>&gt;</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>
&gt; Why didn&#39;t you remove :<br>
&gt; define GRUB_CONFIGURE_CMDS<br>
&gt;       (cd $(GRUB_SRCDIR) &amp;&amp; rm -rf config.cache &amp;&amp; \<br>
&gt;       $(TARGET_CONFIGURE_OPTS) \<br>
&gt;       $(TARGET_CONFIGURE_ARGS) \<br>
&gt;       $(GRUB_CONF_ENV) \<br>
&gt;       ./configure \<br>
&gt;<br>
&gt;               --target=$(GNU_TARGET_NAME) \<br>
&gt;               --host=$(GNU_TARGET_NAME) \<br>
&gt;               --build=$(GNU_HOST_NAME) \<br>
&gt;               --prefix=/ \<br>
&gt;               --mandir=/usr/man \<br>
&gt;               --infodir=/usr/info \<br>
&gt;               $(DISABLE_DOCUMENTATION) \<br>
&gt;               $(DISABLE_NLS) \<br>
&gt;<br>
&gt;               $(DISABLE_LARGEFILE) \<br>
&gt;               $(DISABLE_IPV6) \<br>
&gt;               $(QUIET) $(GRUB_CONF_OPT) \<br>
&gt;       )<br>
&gt; endef<br>
&gt; This might be handled by the autotool infrastructure.<br>
&gt; Otherwise it looks good, thx !<br>
<br>
</div>I would have but I didn&#39;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&#39;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>
&gt;<br>
&gt; --<br>
&gt; Lionel Landwerlin<br>
&gt;<br>
&gt; On Mon, Jan 4, 2010 at 2:01 PM, Clark Rawlins<br>
&gt; &lt;<a href="mailto:clark.rawlins@escient.com">clark.rawlins@escient.com</a>&gt; wrote:<br>
&gt;         Here is my attempt to use the autotools macros.<br>
&gt;         I look forward to any discussion, suggestions for improvement<br>
&gt;         etc.<br>
&gt;<br>
&gt;         I attach the whole file since it is effectively a rewrite.  If<br>
&gt;         it is<br>
&gt;         acceptable I will submit as a git diff against head.<br>
&gt;<br>
&gt;<br>
&gt;         On Sun, 2010-01-03 at 08:43 -0500, Clark Rawlins wrote:<br>
&gt;         &gt; Okay,<br>
&gt;         &gt;<br>
&gt;         &gt; I&#39;ve started looking at this but it isn&#39;t clear to me how to<br>
&gt;         handle the<br>
&gt;         &gt; following:<br>
&gt;         &gt;<br>
&gt;         &gt; $(GRUB_DIR)/$(GRUB_BINARY): $(GRUB_DIR)/.configured<br>
&gt;         &gt;       $(MAKE) CC=$(TARGET_CC) -C $(GRUB_DIR)<br>
&gt;         &gt;       rm -f $(GRUB_DIR)/$(GRUB_BINARY)<br>
&gt;         &gt;       $(MAKE) CC=$(TARGET_CC) CFLAGS+=-static -C<br>
&gt;         $(GRUB_DIR)/grub grub<br>
&gt;         &gt;       mkdir -p $(dir $(STAGING_DIR)/$(GRUB_TARGET_BINARY))<br>
&gt;         &gt;       mv $(GRUB_DIR)/$(GRUB_BINARY)<br>
&gt;         $(STAGING_DIR)/$(GRUB_TARGET_BINARY).static<br>
&gt;         &gt;       $(MAKE) CC=$(TARGET_CC) -C $(GRUB_DIR)/grub<br>
&gt;         &gt;<br>
&gt;         &gt; This builds everything dynamically linked first then builds<br>
&gt;         the grub binary statically.<br>
&gt;         &gt; Is the right way to do this to override the target<br>
&gt;         after/before calling the autotools macro?<br>
&gt;         &gt;<br>
&gt;         &gt;<br>
&gt;         &gt; On Sun, 2010-01-03 at 05:08 +0100, Lionel Landwerlin wrote:<br>
&gt;         &gt; &gt; Here is one example :<br>
&gt;         &gt; &gt;<br>
&gt;         &gt; &gt;<br>
&gt;         <a href="http://git.buildroot.org/buildroot/commit/?id=21bab8862f3c2906af347e5a993ce4cd36c1b063" target="_blank">http://git.buildroot.org/buildroot/commit/?id=21bab8862f3c2906af347e5a993ce4cd36c1b063</a><br>

&gt;         &gt; &gt;<br>
&gt;         &gt; &gt; You can find a lot like this in the recent git history.<br>
&gt;         &gt; &gt; I&#39;m think to the new infrastructure because it provides<br>
&gt;         all the glue to<br>
&gt;         &gt; &gt; configure the package, especially the 2 lines you added.<br>
&gt;         &gt; &gt;<br>
&gt;         &gt; &gt; Regards,<br>
&gt;         &gt; &gt;<br>
&gt;         &gt; &gt;<br>
&gt;         &gt; &gt; Le samedi 02 janvier 2010 à 21:15 -0500, Clark Rawlins a<br>
&gt;         écrit :<br>
&gt;         &gt; &gt; &gt; I could give that a shot.  I thought as a start I would<br>
&gt;         go with the<br>
&gt;         &gt; &gt; &gt; smallest change possible.  Any suggestions for an<br>
&gt;         example to look at for<br>
&gt;         &gt; &gt; &gt; switching grub to the autotools macros?<br>
&gt;         &gt; &gt; &gt;<br>
&gt;         &gt; &gt; &gt;<br>
&gt;         &gt; &gt; &gt; On Sun, 2010-01-03 at 01:13 +0100, Lionel Landwerlin<br>
&gt;         wrote:<br>
&gt;         &gt; &gt; &gt; &gt; Le samedi 02 janvier 2010 à 17:46 -0500, Clark Rawlins<br>
&gt;         a écrit :<br>
&gt;         &gt; &gt; &gt; &gt; &gt; Grub build failed at the link stage because it<br>
&gt;         &gt; &gt; &gt; &gt; &gt; couldn&#39;t find libcurses. Adding these variable<br>
&gt;         &gt; &gt; &gt; &gt; &gt; invocations to the configure line make it work.<br>
&gt;         &gt; &gt; &gt; &gt; &gt;<br>
&gt;         &gt; &gt; &gt; &gt; &gt; Signed-off-by: Clark Rawlins<br>
&gt;         &lt;<a href="mailto:clark.rawlins@escient.com">clark.rawlins@escient.com</a>&gt;<br>
&gt;         &gt; &gt; &gt; &gt; &gt; ---<br>
&gt;         &gt; &gt; &gt; &gt; &gt;  target/x86/grub/<a href="http://grub.mk" target="_blank">grub.mk</a> |    2 ++<br>
&gt;         &gt; &gt; &gt; &gt; &gt;  1 files changed, 2 insertions(+), 0 deletions(-)<br>
&gt;         &gt; &gt; &gt; &gt; &gt;<br>
&gt;         &gt; &gt; &gt; &gt; &gt; diff --git a/target/x86/grub/<a href="http://grub.mk" target="_blank">grub.mk</a><br>
&gt;         b/target/x86/grub/<a href="http://grub.mk" target="_blank">grub.mk</a><br>
&gt;         &gt; &gt; &gt; &gt; &gt; index af46244..21f089f 100644<br>
&gt;         &gt; &gt; &gt; &gt; &gt; --- a/target/x86/grub/<a href="http://grub.mk" target="_blank">grub.mk</a><br>
&gt;         &gt; &gt; &gt; &gt; &gt; +++ b/target/x86/grub/<a href="http://grub.mk" target="_blank">grub.mk</a><br>
&gt;         &gt; &gt; &gt; &gt; &gt; @@ -81,6 +81,8 @@ $(GRUB_DIR)/.unpacked:<br>
&gt;         $(DL_DIR)/$(GRUB_SOURCE) $(DL_DIR)/$(GRUB_PATCH)<br>
&gt;         &gt; &gt; &gt; &gt; &gt;  $(GRUB_DIR)/.configured: $(GRUB_DIR)/.unpacked<br>
&gt;         &gt; &gt; &gt; &gt; &gt;       (cd $(GRUB_DIR); rm -rf config.cache; \<br>
&gt;         &gt; &gt; &gt; &gt; &gt;               $(TARGET_CONFIGURE_OPTS) \<br>
&gt;         &gt; &gt; &gt; &gt; &gt; +             $(TARGET_CONFIGURE_ARGS) \<br>
&gt;         &gt; &gt; &gt; &gt; &gt; +             $(TARGET_CONFIGURE_ENV) \<br>
&gt;         &gt; &gt; &gt; &gt; &gt;               CFLAGS=&quot;$(TARGET_CFLAGS)&quot; \<br>
&gt;         &gt; &gt; &gt; &gt; &gt;               CPPFLAGS=&quot;$(GRUB_CFLAGS)&quot; \<br>
&gt;         &gt; &gt; &gt; &gt; &gt;               ./configure $(QUIET) \<br>
&gt;         &gt; &gt; &gt; &gt;<br>
&gt;         &gt; &gt; &gt; &gt; Maybe you should consider switching grub to the<br>
&gt;         autotool infrastructure.<br>
&gt;         &gt; &gt; &gt; &gt;<br>
&gt;         &gt; &gt; &gt; &gt; --<br>
&gt;         &gt; &gt; &gt; &gt; Lionel Landwerlin<br>
&gt;         &gt; &gt; &gt; &gt;<br>
&gt;         &gt; &gt; &gt; &gt; _______________________________________________<br>
&gt;         &gt; &gt; &gt; &gt; buildroot mailing list<br>
&gt;         &gt; &gt; &gt; &gt; <a href="mailto:buildroot@busybox.net">buildroot@busybox.net</a><br>
&gt;         &gt; &gt; &gt; &gt; <a href="http://lists.busybox.net/mailman/listinfo/buildroot" target="_blank">http://lists.busybox.net/mailman/listinfo/buildroot</a><br>
&gt;         &gt; &gt; &gt;<br>
&gt;         &gt; &gt;<br>
&gt;         &gt;<br>
&gt;         &gt; _______________________________________________<br>
&gt;         &gt; buildroot mailing list<br>
&gt;         &gt; <a href="mailto:buildroot@busybox.net">buildroot@busybox.net</a><br>
&gt;         &gt; <a href="http://lists.busybox.net/mailman/listinfo/buildroot" target="_blank">http://lists.busybox.net/mailman/listinfo/buildroot</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
<br>
</div></div></blockquote></div><br>