summaryrefslogtreecommitdiffstats
path: root/build/config.mk
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-06-21 11:57:18 -0400
committerTavian Barnes <tavianator@tavianator.com>2024-06-21 11:57:18 -0400
commit4bc06bd999786da359a05801bf9106597fe57298 (patch)
tree35f6df837663793f0dca34996c82c19552041f7a /build/config.mk
parentbc20905af9b61e78549705117fd3401329a972c0 (diff)
downloadbfs-4bc06bd999786da359a05801bf9106597fe57298.tar.xz
build: Generate config.mk after config.h
That way if ./configure fails, make will complain about it directly.
Diffstat (limited to 'build/config.mk')
-rw-r--r--build/config.mk8
1 files changed, 4 insertions, 4 deletions
diff --git a/build/config.mk b/build/config.mk
index 24873ec..80206c7 100644
--- a/build/config.mk
+++ b/build/config.mk
@@ -7,7 +7,7 @@ include build/prelude.mk
include build/exports.mk
# All configuration steps
-config: gen/config.mk gen/config.h
+config: gen/config.mk
.PHONY: config
# Makefile fragments generated by `./configure`
@@ -18,10 +18,10 @@ MKS := \
gen/pkgs.mk
# The main configuration file, which includes the others
-gen/config.mk: ${MKS}
+gen/config.mk: ${MKS} gen/config.h
${MSG} "[ GEN] $@"
@printf '# %s\n' "$@" >$@
- @printf 'include %s\n' ${.ALLSRC} >>$@
+ @printf 'include %s\n' ${MKS} >>$@
${VCAT} gen/config.mk
.PHONY: gen/config.mk
@@ -57,6 +57,6 @@ gen/pkgs.mk: gen/flags.mk
.PHONY: gen/pkgs.mk
# Compile-time feature detection
-gen/config.h: gen/config.mk
+gen/config.h: gen/pkgs.mk
@+XMAKEFLAGS="$$MAKEFLAGS" ${MAKE} -sf build/header.mk $@
.PHONY: gen/config.h