From bfbe6851afd2eb5b40b23dcb7ce6a9422b0f17fa Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 28 Aug 2024 16:10:48 -0400 Subject: build: Move the "compiler works at all" test earlier --- build/header.mk | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'build/header.mk') diff --git a/build/header.mk b/build/header.mk index b838f64..0bc4a3e 100644 --- a/build/header.mk +++ b/build/header.mk @@ -66,7 +66,7 @@ gen/config.h: ${PKG_HEADERS} ${HEADERS} @printf '#define BFS_CONFIG_H\n' >>$@ @cat ${.ALLSRC} >>$@ @printf '#endif // BFS_CONFIG_H\n' >>$@ - @cat gen/cc.log gen/flags.log ${.ALLSRC:%=%.log} >gen/config.log + @cat gen/flags.log ${.ALLSRC:%=%.log} >gen/config.log ${VCAT} $@ @printf '%s' "$$CONFFLAGS" | build/embed.sh >gen/confflags.i @printf '%s' "$$XCC" | build/embed.sh >gen/cc.i @@ -81,15 +81,7 @@ SLUG = ${@:gen/%.h=%} # The hidden output file name OUT = ${SLUG:has/%=gen/has/.%.out} -${HEADERS}: cc +${HEADERS}:: @${MKDIR} ${@D} @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 -o gen/.cc.out 2>gen/cc.log; \ - ret=$$?; \ - build/msg-if.sh "[ CC ] build/empty.c" test $$ret -eq 0; \ - exit $$ret -- cgit v1.2.3