diff options
Diffstat (limited to 'build/config.mk')
-rw-r--r-- | build/config.mk | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/build/config.mk b/build/config.mk index 24873ec..6296168 100644 --- a/build/config.mk +++ b/build/config.mk @@ -7,21 +7,20 @@ 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` MKS := \ gen/vars.mk \ gen/flags.mk \ - gen/deps.mk \ 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 @@ -38,6 +37,7 @@ gen/vars.mk:: @printf 'MKDIR := %s\n' "$$XMKDIR" >>$@ @printf 'PKG_CONFIG := %s\n' "$$XPKG_CONFIG" >>$@ @printf 'RM := %s\n' "$$XRM" >>$@ + @test -z "$$VERSION" || printf 'export VERSION=%s\n' "$$VERSION" >>$@ ${VCAT} $@ # Sets the build flags. This depends on vars.mk and uses a recursive make so @@ -46,17 +46,12 @@ gen/flags.mk: gen/vars.mk @+XMAKEFLAGS="$$MAKEFLAGS" ${MAKE} -sf build/flags.mk $@ .PHONY: gen/flags.mk -# Check for dependency generation support -gen/deps.mk: gen/flags.mk - @+XMAKEFLAGS="$$MAKEFLAGS" ${MAKE} -sf build/deps.mk $@ -.PHONY: gen/deps.mk - # Auto-detect dependencies and their build flags gen/pkgs.mk: gen/flags.mk @+XMAKEFLAGS="$$MAKEFLAGS" ${MAKE} -sf build/pkgs.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 |