From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [kvm-unit-tests PATCH v2 1/2] arm/arm64: Makefile cleanup Date: Tue, 10 May 2016 19:03:47 +0200 Message-ID: <57321473.2090802@redhat.com> References: <1462899344-7703-1-git-send-email-drjones@redhat.com> <1462899344-7703-2-git-send-email-drjones@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: lvivier@redhat.com, thuth@redhat.com, richard.weiyang@gmail.com To: Andrew Jones , kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:50388 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751047AbcEJRDw (ORCPT ); Tue, 10 May 2016 13:03:52 -0400 In-Reply-To: <1462899344-7703-2-git-send-email-drjones@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 10/05/2016 18:55, Andrew Jones wrote: > This does the same cleanup as 'x86: Makefile refine'. .PRECIOUS > is used (as opposed to .SECONDARY), because .SECONDARY doesn't > accept target patterns. Actually it should and, worst case, we could use .SECONDARY without prerequisites. I'll change this to "doesn't seem to work reliably". Paolo > Signed-off-by: Andrew Jones > --- > arm/Makefile.common | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/arm/Makefile.common b/arm/Makefile.common > index 9a2d61fc88a27..a786fcf94154f 100644 > --- a/arm/Makefile.common > +++ b/arm/Makefile.common > @@ -24,6 +24,9 @@ CFLAGS += -Wextra > CFLAGS += -O2 > CFLAGS += -I lib -I lib/libfdt > > +# We want to keep intermediate files > +.PRECIOUS: %.elf %.o > + > asm-offsets = lib/$(ARCH)/asm-offsets.h > include scripts/asm-offsets.mak > > @@ -48,7 +51,7 @@ start_addr := $(shell printf "%x\n" $$(( $(phys_base) + $(kernel_offset) ))) > > FLATLIBS = $(libcflat) $(LIBFDT_archive) $(libgcc) $(libeabi) > %.elf: LDFLAGS = $(CFLAGS) -nostdlib > -%.elf: %.o $(FLATLIBS) arm/flat.lds > +%.elf: %.o $(FLATLIBS) arm/flat.lds $(cstart.o) > $(CC) $(LDFLAGS) -o $@ \ > -Wl,-T,arm/flat.lds,--build-id=none,-Ttext=$(start_addr) \ > $(filter %.o, $^) $(FLATLIBS) > @@ -69,7 +72,4 @@ generated_files = $(asm-offsets) > > test_cases: $(generated_files) $(tests-common) $(tests) > > -$(TEST_DIR)/selftest.elf: $(cstart.o) $(TEST_DIR)/selftest.o > -$(TEST_DIR)/spinlock-test.elf: $(cstart.o) $(TEST_DIR)/spinlock-test.o > - > $(TEST_DIR)/selftest.o $(cstart.o): $(asm-offsets) >