summaryrefslogtreecommitdiffstats
path: root/build/header.mk
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-06-21 12:11:08 -0400
committerTavian Barnes <tavianator@tavianator.com>2024-06-21 12:51:37 -0400
commit4bc79148e2ed23273afefaf439a03364d5161046 (patch)
tree4e996b7e46e56e28bb6d137db49b8fae139189eb /build/header.mk
parent4bc06bd999786da359a05801bf9106597fe57298 (diff)
downloadbfs-4bc79148e2ed23273afefaf439a03364d5161046.tar.xz
build: Save cc.sh build products to gen/
Diffstat (limited to 'build/header.mk')
-rw-r--r--build/header.mk6
1 files changed, 4 insertions, 2 deletions
diff --git a/build/header.mk b/build/header.mk
index 65e95cb..afd04d0 100644
--- a/build/header.mk
+++ b/build/header.mk
@@ -76,16 +76,18 @@ gen/config.h: ${PKG_HEADERS} ${HEADERS}
# The short name of the config test
SLUG = ${@:gen/%.h=%}
+# The hidden output file name
+OUT = ${SLUG:has/%=gen/has/.%.out}
${HEADERS}: cc
@${MKDIR} ${@D}
- @build/define-if.sh ${SLUG} build/cc.sh build/${SLUG}.c >$@ 2>$@.log; \
+ @build/define-if.sh ${SLUG} build/cc.sh build/${SLUG}.c -o ${OUT} >$@ 2>$@.log; \
build/msg-if.sh "[ CC ] ${SLUG}.c" test $$? -eq 0
.PHONY: ${HEADERS}
# Check that the C compiler works at all
cc::
- @build/cc.sh build/empty.c 2>gen/cc.log; \
+ @build/cc.sh build/empty.c -o gen/.cc.out 2>gen/cc.log; \
ret=$$?; \
build/msg-if.sh "[ CC ] build/empty.c" test $$ret -eq 0; \
exit $$ret