Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762748Ab3DCXge (ORCPT ); Wed, 3 Apr 2013 19:36:34 -0400 Received: from avon.wwwdotorg.org ([70.85.31.133]:45220 "EHLO avon.wwwdotorg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762368Ab3DCXfJ (ORCPT ); Wed, 3 Apr 2013 19:35:09 -0400 From: Stephen Warren To: Michal Marek , Grant Likely , Rob Herring Cc: arm@kernel.org, Shawn Guo , Hiroshi Doyu , linux-kbuild@vger.kernel.org, devicetree-discuss@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Stephen Warren Subject: [PATCH V2 3/7] kbuild: cmd_dtc_cpp: extract deps from both gcc -E and dtc Date: Wed, 3 Apr 2013 17:34:54 -0600 Message-Id: <1365032098-22825-3-git-send-email-swarren@wwwdotorg.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1365032098-22825-1-git-send-email-swarren@wwwdotorg.org> References: <1365032098-22825-1-git-send-email-swarren@wwwdotorg.org> X-NVConfidentiality: public Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2101 Lines: 50 From: Stephen Warren Prior to this change, when compiling *.dts to *.dtb, the dependency output from dtc would be used, and when compiling *.dtsp to *.dtb, the dependency output from gcc -E alone would be used, despite dtc also being invoked (on a temporary file that was guaranteed to have no dependencies). With this change, when compiling *.dtsp to *.dtb, the dependency files from both gcc -E and dtc are used. This will allow cmd_dtc_cpp to replace cmd_dtc in a future change. In turn, that will allow the C pre- processor to be run transparently on *.dts, without the need to a separate rule or file extension to trigger it. Signed-off-by: Stephen Warren --- scripts/Makefile.lib | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index af35521..6104335 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -156,7 +156,7 @@ cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \ ld_flags = $(LDFLAGS) $(ldflags-y) -dtc_cpp_flags = -Wp,-MD,$(depfile) -nostdinc \ +dtc_cpp_flags = -Wp,-MD,$(depfile).pre -nostdinc \ -I$(srctree)/arch/$(SRCARCH)/boot/dts \ -I$(srctree)/arch/$(SRCARCH)/boot/dts/include \ -undef -D__DTS__ @@ -278,7 +278,8 @@ dtc-tmp = $(subst $(comma),_,$(dot-target).dts) quiet_cmd_dtc_cpp = DTC+CPP $@ cmd_dtc_cpp = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \ - $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 $(DTC_FLAGS) $(dtc-tmp) + $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 $(DTC_FLAGS) -d $(depfile).dtc $(dtc-tmp) ; \ + cat $(depfile).pre $(depfile).dtc > $(depfile) $(obj)/%.dtb: $(src)/%.dtsp FORCE $(call if_changed_dep,dtc_cpp) -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/