diff options
Diffstat (limited to 'build/config.mk')
-rw-r--r-- | build/config.mk | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/build/config.mk b/build/config.mk index 24873ec..663926c 100644 --- a/build/config.mk +++ b/build/config.mk @@ -10,19 +10,12 @@ include build/exports.mk config: gen/config.mk gen/config.h .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: gen/vars.mk gen/flags.mk gen/pkgs.mk ${MSG} "[ GEN] $@" @printf '# %s\n' "$@" >$@ - @printf 'include %s\n' ${.ALLSRC} >>$@ - ${VCAT} gen/config.mk + @printf 'include %s\n' $^ >>$@ + ${VCAT} $@ .PHONY: gen/config.mk # Saves the configurable variables @@ -38,6 +31,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 +40,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 |