public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 1/3] Makefile: fix "version.h" build for cross-compiling
@ 2011-07-07 20:44 Brian Norris
  2011-07-07 20:44 ` [PATCH 2/3] Makefile: fix "make clean" for cross-compile Brian Norris
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Brian Norris @ 2011-07-07 20:44 UTC (permalink / raw)
  To: Artem Bityutskiy; +Cc: Brian Norris, linux-mtd

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

So instead of "building" our version.h within $(BUILDIR), we should
just build it in the main source directory, as it isn't architecture-
specific or anything. Hopefully that doesn't "break the rules" of our
cross-compilation setup...

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
---
 Makefile |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index afbe201..7c20ea5 100644
--- a/Makefile
+++ b/Makefile
@@ -38,7 +38,7 @@ TARGETS = $(BINS)
 TARGETS += lib/libmtd.a
 TARGETS += ubi-utils/libubi.a
 
-OBJDEPS = $(BUILDDIR)/include/version.h
+OBJDEPS = include/version.h
 
 include common.mk
 
@@ -53,7 +53,7 @@ endif
 	find $(BUILDDIR)/ -xdev \
 		'(' -name '*.[ao]' -o -name '.*.c.dep' ')' \
 		-exec rm -f {} +
-	rm -f $(BUILDDIR)/include/version.h
+	rm -f include/version.h
 	$(MAKE) -C $(TESTS) clean
 
 install:: ${BINS} ${SCRIPTS}
@@ -68,9 +68,9 @@ tests::
 cscope:
 	cscope -bR
 
-$(BUILDDIR)/include/version.h: $(BUILDDIR)/include/version.h.tmp
+include/version.h: include/version.h.tmp
 	$(Q)cmp -s $@ $@.tmp && rm -f $@.tmp || mv $@.tmp $@
-$(BUILDDIR)/include/version.h.tmp:
+include/version.h.tmp:
 	$(Q)echo '#define VERSION "$(VERSION)"' > $@
 
 #
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2011-07-20  5:28 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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               ` [PATCH v2 " Brian Norris
2011-07-07 22:22                 ` Mike Frysinger
2011-07-08  3:57       ` [PATCH " Artem Bityutskiy
2011-07-19 18:17         ` Brian Norris
2011-07-20  5:29           ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox