To check for the existence of certain files and include them if these
exist can be done by just simply prepending the include directive with
a '-'  sign, without if and wildcard checks.

Signed-off-by: Remy Bohmer <li...@bohmer.net>
---
 rules/other/Toplevel.make |   13 +++----------
 1 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/rules/other/Toplevel.make b/rules/other/Toplevel.make
index d270e71..1218229 100644
--- a/rules/other/Toplevel.make
+++ b/rules/other/Toplevel.make
@@ -22,9 +22,7 @@ include $(RULESDIR)/other/Definitions.make
 include $(PTXDIST_PTXCONFIG)
 
 # might be non existent
-ifneq ($(wildcard $(PTXDIST_PLATFORMCONFIG)),)
-include $(PTXDIST_PLATFORMCONFIG)
-endif
+-include $(PTXDIST_PLATFORMCONFIG)
 
 # might be non existent
 ifneq ($(wildcard $(PTXDIST_COLLECTIONCONFIG)),)
@@ -41,9 +39,8 @@ include $(PTX_MAP_ALL_MAKE)
 include $(RULESDIR)/other/Namespace.make
 include $(wildcard $(PRERULESDIR)/*.make)
 
-ifneq ($(wildcard $(PROJECTPRERULESDIR)/*.make),)
+# might be non existent
 include $(wildcard $(PROJECTPRERULESDIR)/*.make)
-endif
 
 include $(PTX_DGEN_DEPS_PRE)
 include $(PTX_DGEN_RULESFILES_MAKE)
@@ -86,13 +83,9 @@ PTX_PACKAGES_SELECTED        := \
        $(CROSS_PACKAGES) \
        $(HOST_PACKAGES)
 
-ifneq ($(wildcard $(POSTRULESDIR)/*.make),)
+# might be non existent
 include $(wildcard $(POSTRULESDIR)/*.make)
-endif
-
-ifneq ($(wildcard $(PROJECTPOSTRULESDIR)/*.make),)
 include $(wildcard $(PROJECTPOSTRULESDIR)/*.make)
-endif
 
 # ----------------------------------------------------------------------------
 # just the "print" target
-- 
1.7.0.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to