diff mbox

[kvm-unit-tests,2/2] arm/arm64 config: Fix arch_clean rule

Message ID 20150907143733.GF3014@hawk.localdomain
State New
Headers show

Commit Message

Andrew Jones Sept. 7, 2015, 2:37 p.m. UTC
On Mon, Sep 07, 2015 at 03:35:19PM +0200, Alexander Spyridakis wrote:
> On 4 September 2015 at 16:05, Andrew Jones <drjones@redhat.com> wrote:
> > This doesn't reproduce for me. I did the following, and it worked
> > fine.
> >
> > make distclean
> > ./configure --arch=arm --cross-prefix=arm-linux-gnu-
> > make
> > ./configure --arch=arm64 --cross-prefix=aarch64-linux-gnu-
> > make clean && make
> 
> Ok I think I found the issue:
> 
> config-arm-common.mak:
> >arm_clean: libfdt_clean asm_offsets_clean
> >    $(RM) $(TEST_DIR)/*.{o,flat,elf} $(libeabi) $(eabiobjs) \
> >          $(TEST_DIR)/.*.d lib/arm/.*.d
> 
> config-x86-common.mak:
> >arch_clean:
> >    $(RM) $(TEST_DIR)/*.o $(TEST_DIR)/*.flat $(TEST_DIR)/*.elf \
> >    $(TEST_DIR)/.*.d lib/x86/.*.d
> 
> I think the arm case tries to be too clever and on many systems it
> fails (tested on debian:jessie,sid and ubuntu:14.04,15.04). Basically
> the expression for the arm case fails to resolve, while using the
> simpler x86 way works as expected.
> 
> So is the following change acceptable in config-arm-common.mak?
> > arm_clean: libfdt_clean asm_offsets_clean
> >-       $(RM) $(TEST_DIR)/*.{o,flat,elf} $(libeabi) $(eabiobjs) \
> >-             $(TEST_DIR)/.*.d lib/arm/.*.d
> >+       $(RM) $(TEST_DIR)/*.o $(TEST_DIR)/*.flat $(TEST_DIR)/*.elf \
> >+               $(libeabi) $(eabiobjs) $(TEST_DIR)/.*.d lib/arm/.*.d

Ah, it's a dash vs. bash thing. Either we need to change all bashisms
in the makefiles, or, since kvm-unit-tests already depends on bash for
its scripts, then we might as well just tell make to use it too.  This
patch will fix it


I'll probably submit the patch in a second.

Thanks for hunting down the problem!

drew

Comments

Alexander Spyridakis Sept. 7, 2015, 2:59 p.m. UTC | #1
On 7 September 2015 at 16:37, Andrew Jones <drjones@redhat.com> wrote:
> +SHELL := /bin/bash

This indeed fixed the issue.

Thanks.
diff mbox

Patch

diff --git a/Makefile b/Makefile
index 0d5933474cd8c..3e60b4f8e4a57 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,6 @@ 
 
+SHELL := /bin/bash
+
 ifeq ($(wildcard config.mak),)
 $(error run ./configure first. See ./configure -h)
 endif