diff options
author | Alex Bennée <alex.bennee@linaro.org> | 2018-06-22 15:11:47 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2018-07-02 13:08:21 +0100 |
commit | 882464c9c919965ae2eb56430896406ab0448fcc (patch) | |
tree | 2810c2772aca6bb0e2fda32bb5ccc8b3b0f425cd | |
parent | 4041f6378d4c37eb91beb9872905bdfa3ccbebaa (diff) |
build-all-arches: do a distclean $(SRC) configured
This can cause much confusion when you have been building in your
source tree. I've added a distclean so we don't unexpectedly drop the
config for normal make clean invocations.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180622141205.16306-5-alex.bennee@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r-- | Makefile | 3 | ||||
-rwxr-xr-x | build-all-archs | 10 |
2 files changed, 13 insertions, 0 deletions
@@ -51,3 +51,6 @@ $(PROG): $(OBJS) clean: rm -f $(PROG) $(OBJS) $(BINS) + +distclean: clean + rm -f config.h Makefile.in diff --git a/build-all-archs b/build-all-archs index a2f5cff..a7cd7c2 100755 --- a/build-all-archs +++ b/build-all-archs @@ -54,6 +54,16 @@ while [[ "$1" = -* ]]; do esac done +# +# If you are developing your primary architecture directly out of the +# source tree you can confuse any out-of-tree builds thanks to random +# crap in your VPATH. Let's detect that and save some hair pulling. +# +if [ -e Makefile.in ]; then + echo "Cleaning in-src-tree build" + make distclean +fi + # Debian stretch and Ubuntu Xenial have cross compiler packages for # all of these: # gcc-arm-linux-gnueabihf gcc-aarch64-linux-gnu gcc-m68k-linux-gnu |