diff mbox

[1/3] Makefile: fix "version.h" build for cross-compiling

Message ID CAMjpGUeZLiuqr4GAbqeveF4i5xB40JEuHuWZ8Qt-BTOLSQBVuw@mail.gmail.com
State New, archived
Headers show

Commit Message

Mike Frysinger July 7, 2011, 9:53 p.m. UTC
with my two proposed changes, it's working for me now ...

$ git clean -x -d
$ git diff
   CPPFLAGS += -DWITHOUT_XATTR
@@ -71,6 +71,7 @@ cscope:
 $(BUILDDIR)/include/version.h: $(BUILDDIR)/include/version.h.tmp
    $(Q)cmp -s $@ $@.tmp && rm -f $@.tmp || mv $@.tmp $@
 $(BUILDDIR)/include/version.h.tmp:
+   $(Q)mkdir -p $(dir $@)
    $(Q)echo '#define VERSION "$(VERSION)"' > $@

 #

$ make CROSS=x86_64-pc-linux-gnu- -j2
... success ...
-mike

Comments

Brian Norris July 7, 2011, 10:14 p.m. UTC | #1
On Thu, Jul 7, 2011 at 2:53 PM, Mike Frysinger <vapier.adi@gmail.com> wrote:
> with my two proposed changes, it's working for me now ...

Oops, never mind, I just goofed on my git-rebase! Looks good. I'll
send v2 in a moment.

Thanks,
Brian
diff mbox

Patch

--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@ 

 VERSION = 1.4.5

-CPPFLAGS += -I./include -I./ubi-utils/include $(ZLIBCPPFLAGS) $(LZOCPPFLAGS)
+CPPFLAGS += -I./include -I$(BUILDDIR)/include -I./ubi-utils/include
$(ZLIBCPPFLAGS) $(LZOCPPFLAGS)

 ifeq ($(WITHOUT_XATTR), 1)