@@ -8,12 +8,6 @@ ifndef TOP
88 INCLUDED = no
99endif
1010
11- # Uncomment the next two commands to allow debug this Makefile
12- # When enabled, GNU make will no longer execute commands directly.
13- # All build commands will be executed using the shell. This needs more time
14- # OLD_SHELL := $(SHELL)
15- # SHELL = $(info Building $* $(if $<, (from $<))$(if $?, ($? newer)))$(OLD_SHELL)
16-
1711ifeq ($(findstring $(MAKECMDGOALS ) ,clean distclean) ,)
1812 include $(TOP ) /config.mak
1913endif
@@ -244,7 +238,7 @@ endif
244238
245239# convert "include/tccdefs.h" to "tccdefs_.h"
246240% _.h : include/% .h conftest.c
247- $S $(CC ) -DC2STR $(filter % .c,$^ ) -o c2str$( EXESUF ) && ./c2str$( EXESUF ) $< $@
241+ $S $(CC ) -DC2STR $(filter % .c,$^ ) -o c2str.exe && ./c2str.exe $< $@
248242
249243# target specific object rule
250244$(X ) % .o : % .c $(LIBTCC_INC )
@@ -261,7 +255,7 @@ tcc$(EXESUF): tcc.o $(LIBTCC)
261255# Cross Tiny C Compilers
262256# (the TCCDEFS_H dependency is only necessary for parallel makes,
263257# ala 'make -j x86_64-tcc i386-tcc tcc', which would create multiple
264- # c2str and tccdefs_.h files in parallel, leading to access errors.
258+ # c2str.exe and tccdefs_.h files in parallel, leading to access errors.
265259# This forces it to be made only once. Make normally tracks multiple paths
266260# to the same goals and only remakes it once, but that doesn't work over
267261# sub-makes like in this target)
@@ -332,6 +326,8 @@ tcc.1 : tcc-doc.pod
332326% .pod : % .texi
333327 $(call run-if,perl,$(TOPSRC ) /texi2pod.pl $< $@ )
334328
329+ doc : $(TCCDOCS )
330+
335331# --------------------------------------------------------------------------
336332# install
337333
@@ -410,10 +406,6 @@ tags : ; ctags $(TAGFILES)
410406# cannot have both tags and TAGS on windows
411407ETAGS : ; etags $(TAGFILES )
412408
413- # documentation
414- doc : tcc-doc.html tcc-doc.info tcc.1
415-
416-
417409# create release tarball from *current* git branch (including tcc-doc.html
418410# and converting two files to CRLF)
419411TCC-VERSION = tcc-$(VERSION )
@@ -443,15 +435,16 @@ testspp.%:
443435 @$(MAKE ) -C tests/pp $@
444436
445437clean :
446- @rm -f tcc$(EXESUF ) tcc_p$(EXESUF ) * -tcc$(EXESUF ) tcc.pod tags ETAGS
438+ @rm -f tcc$(EXESUF ) tcc_p$(EXESUF ) * -tcc$(EXESUF ) tags ETAGS * .pod
447439 @rm -f * .o * .a * .so* * .out * .log lib* .def * .exe * .dll a.out * .dylib * _.h
448440 @$(MAKE ) -s -C lib $@
449441 @$(MAKE ) -s -C tests $@
450442
451443distclean : clean
452- @rm -fv config.h config.mak config.texi tcc.1 tcc-doc.info tcc-doc.html
444+ @rm -fv config.h config.mak config.texi
445+ @rm -fv $(TCCDOCS )
453446
454- .PHONY : all clean test tar tags ETAGS distclean install uninstall FORCE
447+ .PHONY : all clean test tar tags ETAGS doc distclean install uninstall FORCE
455448
456449help :
457450 @echo " make"
0 commit comments