summaryrefslogtreecommitdiffstats
path: root/build/header.mk
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-04-30 15:07:06 -0400
committerTavian Barnes <tavianator@tavianator.com>2024-04-30 15:07:06 -0400
commit1f06941a7cc586c78152ca67dec0551106977b08 (patch)
tree4ebedfe5ed59fafae32e337eff73758828ff82f7 /build/header.mk
parent37caa3d71fd8bb4d0d9204e4a2f5cac234fa25fd (diff)
downloadbfs-1f06941a7cc586c78152ca67dec0551106977b08.tar.xz
build: Listen to make -s
Diffstat (limited to 'build/header.mk')
-rw-r--r--build/header.mk21
1 files changed, 9 insertions, 12 deletions
diff --git a/build/header.mk b/build/header.mk
index 3f77ca5..951f09b 100644
--- a/build/header.mk
+++ b/build/header.mk
@@ -48,12 +48,12 @@ PKG_HEADERS := ${ALL_PKGS:%=gen/use/%.h}
gen/config.h: ${PKG_HEADERS} ${HEADERS}
${MSG} "[ GEN] $@"
- printf '// %s\n' "$@" >$@
- printf '#ifndef BFS_CONFIG_H\n' >>$@
- printf '#define BFS_CONFIG_H\n' >>$@
- cat ${.ALLSRC} >>$@
- printf '#endif // BFS_CONFIG_H\n' >>$@
- cat ${.ALLSRC:%=%.log} >$@.log
+ @printf '// %s\n' "$@" >$@
+ @printf '#ifndef BFS_CONFIG_H\n' >>$@
+ @printf '#define BFS_CONFIG_H\n' >>$@
+ @cat ${.ALLSRC} >>$@
+ @printf '#endif // BFS_CONFIG_H\n' >>$@
+ @cat ${.ALLSRC:%=%.log} >$@.log
${VCAT} $@
.PHONY: gen/config.h
@@ -61,9 +61,6 @@ gen/config.h: ${PKG_HEADERS} ${HEADERS}
SLUG = ${@:gen/%.h=%}
${HEADERS}::
- ${MKDIR} ${@D}
- if build/define-if.sh ${SLUG} build/cc.sh build/${SLUG}.c >$@ 2>$@.log; then \
- test "${IS_V}" || printf '[ CC ] %-${MSG_WIDTH}s ✔\n' ${SLUG}.c; \
- else \
- test "${IS_V}" || printf '[ CC ] %-${MSG_WIDTH}s ✘\n' ${SLUG}.c; \
- fi
+ @${MKDIR} ${@D}
+ @build/define-if.sh ${SLUG} build/cc.sh build/${SLUG}.c >$@ 2>$@.log; \
+ build/msg-if.sh "[ CC ] ${SLUG}.c" test $$? -eq 0