summaryrefslogtreecommitdiffstats
path: root/config/pkgs.mk
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-04-16 18:43:49 -0400
committerTavian Barnes <tavianator@tavianator.com>2024-04-16 18:58:51 -0400
commitc4c063e9844f2bd2271b2e3391f59f872c66f69a (patch)
treed09c0852ae24c78e723e425306ae006fae16e076 /config/pkgs.mk
parent98c539eeda8f9adfd22a3b2b6ece4fe1ca06b3b4 (diff)
downloadbfs-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/pkgs.mk')
-rw-r--r--config/pkgs.mk17
1 files changed, 10 insertions, 7 deletions
diff --git a/config/pkgs.mk b/config/pkgs.mk
index 54024b2..5ebbaec 100644
--- a/config/pkgs.mk
+++ b/config/pkgs.mk
@@ -3,12 +3,15 @@
# Makefile that generates gen/pkgs.mk
-.OBJDIR: .
-
-include config/vars.mk
+include config/prelude.mk
+include ${GEN}/vars.mk
+include ${GEN}/flags.mk
include ${GEN}/pkgs.mk
+include config/exports.mk
-default::
- config/pkgconf.sh --cflags ${PKGS} >>${TARGET} 2>>${TARGET}.log
- config/pkgconf.sh --ldflags ${PKGS} >>${TARGET} 2>>${TARGET}.log
- config/pkgconf.sh --ldlibs ${PKGS} >>${TARGET} 2>>${TARGET}.log
+${GEN}/pkgs.mk::
+ ${MSG} "[ GEN] $@"
+ config/pkgconf.sh --cflags ${PKGS} >>$@ 2>>$@.log
+ config/pkgconf.sh --ldflags ${PKGS} >>$@ 2>>$@.log
+ config/pkgconf.sh --ldlibs ${PKGS} >>$@ 2>>$@.log
+ ${VCAT} $@