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 2/3] Makefile: fix "make clean" for cross-compile
Date: Thu, 7 Jul 2011 13:44:26 -0700 [thread overview]
Message-ID: <1310071467-9017-2-git-send-email-computersforpeace@gmail.com> (raw)
In-Reply-To: <1310071467-9017-1-git-send-email-computersforpeace@gmail.com>
When cross-compiling (make CROSS=mipsel-linux-), I get this error:
rm -rf /home/norris/git/mtd-utils/mipsel-linux
find /home/norris/git/mtd-utils/mipsel-linux/ -xdev \
'(' -name '*.[ao]' -o -name '.*.c.dep' ')' \
-exec rm -f {} +
find: `/home/norris/git/mtd-utils/mipsel-linux/': No such file or directory
make: *** [clean] Error 1
Now, for cross-compiling, we've already deleted the $(BUILDDIR), so we
should check this before cleaning individual objects with "find."
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
---
Makefile | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index 7c20ea5..78f5f9f 100644
--- a/Makefile
+++ b/Makefile
@@ -50,9 +50,11 @@ ifneq ($(BUILDDIR),$(CURDIR))
endif
endif
endif
- find $(BUILDDIR)/ -xdev \
- '(' -name '*.[ao]' -o -name '.*.c.dep' ')' \
- -exec rm -f {} +
+ @if test -d "$(BUILDDIR)/"; then \
+ find $(BUILDDIR)/ -xdev \
+ '(' -name '*.[ao]' -o -name '.*.c.dep' ')' \
+ -exec rm -f {} + ; \
+ fi
rm -f include/version.h
$(MAKE) -C $(TESTS) clean
--
1.7.0.4
next prev parent reply other threads:[~2011-07-07 20:45 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 ` Brian Norris [this message]
2011-07-07 20:48 ` [PATCH 2/3] Makefile: fix "make clean" for cross-compile 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-2-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