diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2024-04-16 18:43:49 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2024-04-16 18:58:51 -0400 |
commit | c4c063e9844f2bd2271b2e3391f59f872c66f69a (patch) | |
tree | d09c0852ae24c78e723e425306ae006fae16e076 /config/deps.mk | |
parent | 98c539eeda8f9adfd22a3b2b6ece4fe1ca06b3b4 (diff) | |
download | bfs-c4c063e9844f2bd2271b2e3391f59f872c66f69a.tar.xz |
build: Refactor configuration
We now use a recursive make invocation to do the work of `make config`.
The new implementation is also compatible with GNU make 3.81 found on
macOS.
Diffstat (limited to 'config/deps.mk')
-rw-r--r-- | config/deps.mk | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/config/deps.mk b/config/deps.mk index 7d991ab..52ee0e1 100644 --- a/config/deps.mk +++ b/config/deps.mk @@ -3,11 +3,16 @@ # Makefile that generates gen/deps.mk -.OBJDIR: . +include config/prelude.mk +include ${GEN}/vars.mk +include ${GEN}/flags.mk +include config/exports.mk -include config/vars.mk - -default:: +${GEN}/deps.mk:: + ${MSG} "[ GEN] $@" + printf '# %s\n' "$@" >$@ if config/cc.sh -MD -MP -MF /dev/null config/empty.c; then \ printf 'DEPFLAGS = -MD -MP -MF $${@:.o=.d}\n'; \ - fi >${TARGET} 2>${TARGET}.log + fi >>$@ 2>$@.log + ${VCAT} $@ + @printf -- '-include %s\n' ${OBJS:.o=.d} >>$@ |