]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
kbuild: always run gcc -E on *.dts, remove cmd_dtc_cpp
authorStephen Warren <swarren@nvidia.com>
Wed, 6 Mar 2013 17:58:37 +0000 (10:58 -0700)
committerStephen Warren <swarren@nvidia.com>
Fri, 5 Apr 2013 18:23:07 +0000 (12:23 -0600)
Replace cmd_dtc with cmd_dtc_cpp, and delete the latter.

Previously, a special file extension (.dtsp) was required to trigger
the C pre-processor to run on device tree files. This was ugly. Now that
previous changes have enhanced cmd_dtc_cpp to collect dependency
information from both gcc -E and dtc, we can transparently run the pre-
processor on all device tree files, irrespective of whether they
use /include/ or #include syntax to include *.dtsi.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Rob Herring <rob.herring@calxeda.com>
scripts/Makefile.lib

index 6104335234c6c1b64501c5aa86d60322f686b2e4..3e73dfd838cdcc546f0839f206d703d2d42c6ac2 100644 (file)
@@ -269,21 +269,17 @@ $(obj)/%.dtb.S: $(obj)/%.dtb
        $(call cmd,dt_S_dtb)
 
 quiet_cmd_dtc = DTC     $@
-cmd_dtc = $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 $(DTC_FLAGS) -d $(depfile) $<
+cmd_dtc = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
+       $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 \
+               -i $(srctree)/arch/$(SRCARCH)/boot/dts $(DTC_FLAGS) \
+               -d $(depfile).dtc $(dtc-tmp) ; \
+       cat $(depfile).pre $(depfile).dtc > $(depfile)
 
 $(obj)/%.dtb: $(src)/%.dts FORCE
        $(call if_changed_dep,dtc)
 
 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) -d $(depfile).dtc $(dtc-tmp) ; \
-       cat $(depfile).pre $(depfile).dtc > $(depfile)
-
-$(obj)/%.dtb: $(src)/%.dtsp FORCE
-       $(call if_changed_dep,dtc_cpp)
-
 # Bzip2
 # ---------------------------------------------------------------------------