aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2013-03-06 12:58:37 -0500
committerStephen Warren <swarren@nvidia.com>2013-04-05 14:23:07 -0400
commitb40b25fff8205dd18124d8fc87b2c9c57f269b5f (patch)
tree0539246db5bd1597fbbbc5630dfd4ac566e81fee /scripts
parent85f02be8e5fd48a9bf8c719a4f12b4209b1e55b5 (diff)
kbuild: always run gcc -E on *.dts, remove cmd_dtc_cpp
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>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.lib14
1 files changed, 5 insertions, 9 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 6104335234c6..3e73dfd838cd 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -269,21 +269,17 @@ $(obj)/%.dtb.S: $(obj)/%.dtb
269 $(call cmd,dt_S_dtb) 269 $(call cmd,dt_S_dtb)
270 270
271quiet_cmd_dtc = DTC $@ 271quiet_cmd_dtc = DTC $@
272cmd_dtc = $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 $(DTC_FLAGS) -d $(depfile) $< 272cmd_dtc = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
273 $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 \
274 -i $(srctree)/arch/$(SRCARCH)/boot/dts $(DTC_FLAGS) \
275 -d $(depfile).dtc $(dtc-tmp) ; \
276 cat $(depfile).pre $(depfile).dtc > $(depfile)
273 277
274$(obj)/%.dtb: $(src)/%.dts FORCE 278$(obj)/%.dtb: $(src)/%.dts FORCE
275 $(call if_changed_dep,dtc) 279 $(call if_changed_dep,dtc)
276 280
277dtc-tmp = $(subst $(comma),_,$(dot-target).dts) 281dtc-tmp = $(subst $(comma),_,$(dot-target).dts)
278 282
279quiet_cmd_dtc_cpp = DTC+CPP $@
280cmd_dtc_cpp = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
281 $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 $(DTC_FLAGS) -d $(depfile).dtc $(dtc-tmp) ; \
282 cat $(depfile).pre $(depfile).dtc > $(depfile)
283
284$(obj)/%.dtb: $(src)/%.dtsp FORCE
285 $(call if_changed_dep,dtc_cpp)
286
287# Bzip2 283# Bzip2
288# --------------------------------------------------------------------------- 284# ---------------------------------------------------------------------------
289 285