Any *.mdc cause "md2c" to be run to create a "*.mk" file which is
included and used.
Signed-off-by: NeilBrown <neilb@suse.de>
-ifneq "$(wildcard *.mk)" ""
-include *.mk
+mkfiles = $(wildcard *.mk)
+mdfiles = $(wildcard *.mdc)
+mdkfiles = $(mdfiles:.mdc=.mk)
+missingmk = $(filter-out $(mkfiles),$(mdkfiles))
+ifneq "$(mkfiles)" ""
+include $(mkfiles)
endif
bootstrap:
cp boot-strap/md2c .
./md2c mdcode.mdc
+md2c = $(wildcard md2c)
+ifeq "$(md2c)" "md2c"
+ifneq "$(missingmk)" ""
+-include $(missingmk)
+endif
+endif
+
+%.mk : %.mdc md2c
+ ./md2c $*.mdc
+