diff options
author | Freeyorp <TheFreeYorp+git@gmail.com> | 2024-06-05 18:32:09 +0000 |
---|---|---|
committer | Freeyorp <TheFreeYorp+git@gmail.com> | 2024-06-05 19:09:16 +0000 |
commit | 487db287f8bbc97c794e63a3aea54ba4f25b633a (patch) | |
tree | 34990140a32baf780c71417ecee20f73b1530d8f | |
parent | b46a317de18e0b3f2cc7f7e5669fe4273dbe6571 (diff) | |
download | tmwa-487db287f8bbc97c794e63a3aea54ba4f25b633a.tar.gz tmwa-487db287f8bbc97c794e63a3aea54ba4f25b633a.tar.bz2 tmwa-487db287f8bbc97c794e63a3aea54ba4f25b633a.tar.xz tmwa-487db287f8bbc97c794e63a3aea54ba4f25b633a.zip |
real.make: Split dependency sanitization step
If we want to be able to filter specific other entries, such as for the sake
of more generated files, we'll want to be doing this over a list that has
already been made relative and simplified.
-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 )) |