threads / patch / 21844

patch, 2 partsMakefile: Add a target to generate C preprocessor output files

Subject: [PATCH 1/2] Makefile: Add a target to generate C preprocessor output files

## tl;dr

One message between Dec 3, 2009 and Dec 3, 2009. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Ramsay Jones· Dec 3, 2009, 18:11 UTC · lore
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---

Whilst fixing an msvc compiler warning (see patch #2), I needed to look at the output of the c-preprocessor; maybe other people will find it useful.

ATB, Ramsay Jones

 Makefile |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
Show changes to Makefile +3 −1
diff --git a/Makefile b/Makefile
index 1092589..6c9e8a8 100644
--- a/Makefile
+++ b/Makefile
@@ -1527,6 +1527,8 @@ git.o git.spec \
 	$(patsubst %.perl,%,$(SCRIPT_PERL)) \
 	: GIT-VERSION-FILE
 
+%.i: %.c .ALWAYS
+	$(QUIET_CC)$(CC) -E $(ALL_CFLAGS) $< >$*.i
 %.o: %.c GIT-CFLAGS
 	$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) $<
 %.s: %.c GIT-CFLAGS
@@ -1863,7 +1865,7 @@ endif
 .PHONY: all install clean strip
 .PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell
 .PHONY: .FORCE-GIT-VERSION-FILE TAGS tags cscope .FORCE-GIT-CFLAGS
-.PHONY: .FORCE-GIT-BUILD-OPTIONS
+.PHONY: .FORCE-GIT-BUILD-OPTIONS .ALWAYS
 
 ### Check documentation
 #
-- 
1.6.5

← back to recent threads