From: "Brian Norris" <computersforpeace@gmail.com>
To: "Artem Bityutskiy" <dedekind1@gmail.com>
Cc: Brian Norris <computersforpeace@gmail.com>,
linux-mtd@lists.infradead.org,
Mike Frysinger <vapier.adi@gmail.com>
Subject: [PATCH v2 1/3] Makefile: fix "version.h" build for cross-compiling
Date: Thu, 7 Jul 2011 15:16:17 -0700 [thread overview]
Message-ID: <1310076977-13593-1-git-send-email-computersforpeace@gmail.com> (raw)
In-Reply-To: <CAN8TOE_hS9BXyQZzh+MaUou3i_=nGK78Bx8FiiDWYg6Xe44=4A@mail.gmail.com>
When using "make CROSS=mipsel-linux-", I get the following errors:
/bin/sh: /home/norris/git/mtd-utils/mipsel-linux/include/version.h.tmp: No such file or directory
make: *** [/home/norris/git/mtd-utils/mipsel-linux/include/version.h.tmp] Error 1
Fix (suggested by Mike Frysinger): create the directory if it doesn't
exist. Also, $(CC) needs to be able to find the generated header in
$(BUILDDIR)/include.
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
---
Makefile | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index afbe201..1f3e270 100644
--- 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)
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)"' > $@
#
--
1.7.0.4
next prev parent reply other threads:[~2011-07-07 22:17 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-07 20:44 [PATCH 1/3] Makefile: fix "version.h" build for cross-compiling Brian Norris
2011-07-07 20:44 ` [PATCH 2/3] Makefile: fix "make clean" for cross-compile Brian Norris
2011-07-07 20:48 ` Mike Frysinger
2011-07-07 20:44 ` [PATCH 3/3] Makefile: show nice message when checking version.h Brian Norris
2011-07-07 20:48 ` Mike Frysinger
2011-07-07 20:48 ` [PATCH 1/3] Makefile: fix "version.h" build for cross-compiling Mike Frysinger
2011-07-07 21:09 ` Brian Norris
2011-07-07 21:12 ` Mike Frysinger
2011-07-07 21:36 ` Brian Norris
2011-07-07 21:49 ` Mike Frysinger
2011-07-07 21:53 ` Mike Frysinger
2011-07-07 22:14 ` Brian Norris
2011-07-07 22:16 ` Brian Norris [this message]
2011-07-07 22:22 ` [PATCH v2 " Mike Frysinger
2011-07-08 3:57 ` [PATCH " Artem Bityutskiy
2011-07-19 18:17 ` Brian Norris
2011-07-20 5:29 ` Artem Bityutskiy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1310076977-13593-1-git-send-email-computersforpeace@gmail.com \
--to=computersforpeace@gmail.com \
--cc=dedekind1@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=vapier.adi@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox