summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-04-17 12:09:11 -0400
committerTavian Barnes <tavianator@tavianator.com>2024-04-17 12:09:11 -0400
commit94f26cec62be7f0d766f80f7376ea5e0040948ae (patch)
tree9e94e128f8a0aa0c0bd90f175b9e0a4096a43bd2 /config
parentadf0ab47c2d18d807bb21345b92be9cc5525d539 (diff)
downloadbfs-94f26cec62be7f0d766f80f7376ea5e0040948ae.tar.xz
build: Dont include ${BUILDDIR} in short messages
Diffstat (limited to 'config')
-rw-r--r--config/config.mk6
-rw-r--r--config/deps.mk2
-rw-r--r--config/flags.mk2
-rw-r--r--config/pkg.mk7
-rw-r--r--config/pkgs.mk2
-rw-r--r--config/prelude.mk3
6 files changed, 14 insertions, 8 deletions
diff --git a/config/config.mk b/config/config.mk
index 164af76..9d64eec 100644
--- a/config/config.mk
+++ b/config/config.mk
@@ -16,7 +16,7 @@ MKS := \
# The main configuration file, which includes the others
${CONFIG}: ${MKS}
- ${MSG} "[ GEN] $@"
+ ${MSG} "[ GEN] ${TGT}"
@printf '# %s\n' "$@" >$@
@printf 'include $${GEN}/%s\n' ${.ALLSRC:${GEN}/%=%} >>$@
${VCAT} ${CONFIG}
@@ -25,7 +25,7 @@ ${CONFIG}: ${MKS}
# Saves the configurable variables
${GEN}/vars.mk::
@${MKDIR} ${@D}
- ${MSG} "[ GEN] $@"
+ ${MSG} "[ GEN] ${TGT}"
@printf '# %s\n' "$@" >$@
@printf 'PREFIX := %s\n' "$$XPREFIX" >>$@
@printf 'MANDIR := %s\n' "$$XMANDIR" >>$@
@@ -53,7 +53,7 @@ ${GEN}/deps.mk: ${GEN}/flags.mk
# Lists file.o: file.c dependencies
${GEN}/objs.mk::
@${MKDIR} ${@D}
- ${MSG} "[ GEN] $@"
+ ${MSG} "[ GEN] ${TGT}"
@printf '# %s\n' "$@" >$@
@for obj in ${OBJS:${OBJ}/%.o=%}; do printf '$${OBJ}/%s.o: %s.c\n' "$$obj" "$$obj"; done >>$@
diff --git a/config/deps.mk b/config/deps.mk
index 52ee0e1..ca178de 100644
--- a/config/deps.mk
+++ b/config/deps.mk
@@ -9,7 +9,7 @@ include ${GEN}/flags.mk
include config/exports.mk
${GEN}/deps.mk::
- ${MSG} "[ GEN] $@"
+ ${MSG} "[ GEN] ${TGT}"
printf '# %s\n' "$@" >$@
if config/cc.sh -MD -MP -MF /dev/null config/empty.c; then \
printf 'DEPFLAGS = -MD -MP -MF $${@:.o=.d}\n'; \
diff --git a/config/flags.mk b/config/flags.mk
index 2c91691..c9d7913 100644
--- a/config/flags.mk
+++ b/config/flags.mk
@@ -104,7 +104,7 @@ SETVAR = printf '%s := %s\n' >>$@
APPEND = append() { test -z "$$2" || printf '%s += %s\n' "$$1" "$$2" >>$@; }; append
${GEN}/flags.mk::
- ${MSG} "[ GEN] $@"
+ ${MSG} "[ GEN] ${TGT}"
printf '# %s\n' "$@" >$@
${SETVAR} CPPFLAGS "$$BFS_CPPFLAGS"
${APPEND} CPPFLAGS "$$TSAN_CPPFLAGS"
diff --git a/config/pkg.mk b/config/pkg.mk
index 2086555..482ca17 100644
--- a/config/pkg.mk
+++ b/config/pkg.mk
@@ -8,13 +8,16 @@ include ${GEN}/vars.mk
include ${GEN}/flags.mk
include config/exports.mk
+# Like ${TGT} but for ${TARGET}, not $@
+SHORT = ${TARGET:${BUILDDIR}/%=%}
+
default::
@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}; \
+ printf '[ GEN] %-18s [y]\n' ${SHORT}; \
else \
- printf '[ GEN] %-18s [n]\n' ${TARGET}; \
+ printf '[ GEN] %-18s [n]\n' ${SHORT}; \
fi
diff --git a/config/pkgs.mk b/config/pkgs.mk
index 5ebbaec..de9e16e 100644
--- a/config/pkgs.mk
+++ b/config/pkgs.mk
@@ -10,7 +10,7 @@ include ${GEN}/pkgs.mk
include config/exports.mk
${GEN}/pkgs.mk::
- ${MSG} "[ GEN] $@"
+ ${MSG} "[ GEN] ${TGT}"
config/pkgconf.sh --cflags ${PKGS} >>$@ 2>>$@.log
config/pkgconf.sh --ldflags ${PKGS} >>$@ 2>>$@.log
config/pkgconf.sh --ldlibs ${PKGS} >>$@ 2>>$@.log
diff --git a/config/prelude.mk b/config/prelude.mk
index 1d5fb83..2bcb208 100644
--- a/config/prelude.mk
+++ b/config/prelude.mk
@@ -95,6 +95,9 @@ IS_V := ${TRUTHY,${V}}
Q, := @
Q := ${Q,${IS_V}}
+# The current target, with ${BUILDDIR} stripped for shorter messages
+TGT = ${@:${BUILDDIR}/%=%}
+
# Show full commands with `make V=1`, otherwise short summaries
MSG = @msg() { \
MSG="$$1"; \