public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: "Brian Norris" <computersforpeace@gmail.com>
To: "Artem Bityutskiy" <dedekind1@gmail.com>
Cc: Brian Norris <computersforpeace@gmail.com>,
	linux-mtd@lists.infradead.org
Subject: [PATCH 1/3] Makefile: fix "version.h" build for cross-compiling
Date: Thu, 7 Jul 2011 13:44:25 -0700	[thread overview]
Message-ID: <1310071467-9017-1-git-send-email-computersforpeace@gmail.com> (raw)

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

             reply	other threads:[~2011-07-07 20:44 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-07 20:44 Brian Norris [this message]
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

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=1310071467-9017-1-git-send-email-computersforpeace@gmail.com \
    --to=computersforpeace@gmail.com \
    --cc=dedekind1@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    /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