]> rtime.felk.cvut.cz Git - omk.git/blobdiff - snippets/base
Fixed error on inclusion of config.omk if it is broken symlink
[omk.git] / snippets / base
index b20f19d217178525225ea6da3fe971205c2d7520..cc843da8c6ed69f941323b7d7e6ef509a99da0b5 100644 (file)
@@ -59,6 +59,9 @@ endif
 #=========================
 # Include the config file
 
+# FIXME: I think CONFIG_FILE_OK variable is useless. We have three
+# config files and it is not clearly defined to which file is this
+# variable related.
 ifneq ($(CONFIG_FILE_OK),y)
 ifndef CONFIG_FILE
 CONFIG_FILE      := $(MAKERULES_DIR)/config.omk
@@ -74,13 +77,17 @@ endif
 -include $(MAKERULES_DIR)/config.target
 
 ifneq ($(wildcard $(CONFIG_FILE)),)
-include $(CONFIG_FILE)
+-include $(CONFIG_FILE)
 CONFIG_FILE_OK = y
 endif
 endif #$(CONFIG_FILE_OK)
 
+
+CONFIG_FILES ?= $(wildcard $(CONFIG_FILE)-default) $(wildcard $(MAKERULES_DIR)/config.target) $(wildcard $(CONFIG_FILE))
+
+
 export SOURCES_DIR MAKERULES_DIR RELATIVE_DIR
-export CONFIG_FILE OMK_SERIALIZE_INCLUDED OMK_VERBOSE OMK_SILENT
+export CONFIG_FILE CONFIG_FILES OMK_SERIALIZE_INCLUDED OMK_VERBOSE OMK_SILENT
 # OMK_SERIALIZE_INCLUDED has to be exported to submakes because passes
 # must to be serialized only in the toplevel make.