From c4c063e9844f2bd2271b2e3391f59f872c66f69a Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Tue, 16 Apr 2024 18:43:49 -0400 Subject: 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. --- config/pkg.mk | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'config/pkg.mk') diff --git a/config/pkg.mk b/config/pkg.mk index 9b32b42..2086555 100644 --- a/config/pkg.mk +++ b/config/pkg.mk @@ -3,9 +3,18 @@ # Makefile that generates gen/lib*.mk -.OBJDIR: . - -include config/vars.mk +include config/prelude.mk +include ${GEN}/vars.mk +include ${GEN}/flags.mk +include config/exports.mk default:: - config/pkg.sh ${TARGET:${GEN}/%.mk=%} >${TARGET} 2>${TARGET}.log + @printf '# %s\n' "${TARGET}" >${TARGET} + config/pkg.sh ${TARGET:${GEN}/%.mk=%} >>${TARGET} 2>${TARGET}.log + @if [ "${IS_V}" ]; then \ + cat ${TARGET}; \ + elif grep -q PKGS ${TARGET}; then \ + printf '[ GEN] %-18s [y]\n' ${TARGET}; \ + else \ + printf '[ GEN] %-18s [n]\n' ${TARGET}; \ + fi -- cgit v1.2.3