diff options
-rw-r--r-- | Makefile.in | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/Makefile.in b/Makefile.in index a63a589..f9f1fed 100644 --- a/Makefile.in +++ b/Makefile.in @@ -358,15 +358,23 @@ thisdir := $(abspath .) # The end result for each root will look something like: # mmo/version := conf-raw/int-VENDOR_POINT.h conf-raw/int-VERSION_DEVEL.h [...] # src/strings/zstring.tcc src/wire/fwd.hpp + +# Firstly, make the paths relative and simplified. $(foreach root,${PATTERN_ROOTS},$(eval \ ${root} := $(sort $(patsubst ${thisdir}/%,%, \ - $(abspath $(patsubst ${SRC_DIR}/%,%, \ - $(wildcard $(value ${root})) \ - $(filter conf-raw/%.h,$(value ${root}) \ - ))) \ + $(abspath $(patsubst ${SRC_DIR}/%,%, $(value ${root}))) \ )) \ )) +# Secondly, make sure that the files actually exist, or are files we expect to +# generate ourselves. Sort the result for readability. +$(foreach root,${PATTERN_ROOTS},$(eval \ + ${root} := $(sort \ + $(wildcard $(value ${root})) \ + $(filter conf-raw/%.h,$(value ${root})) \ + ) \ +)) + # have to redo what we undid to get it as a variable $(foreach root,${PATTERN_ROOTS},$(eval obj/${root}.ii obj/${root}.ll obj/${root}.bc obj/${root}.s obj/${root}.pdc.o obj/${root}.pic.o obj/${root}.d : $(value ${root})) ) #$(foreach root,${PATTERN_ROOTS},$(info post-root: ${root} := $(value ${root}))$(info )) |