Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] Use CC to determine if gcc is used



On Mon, 27 Apr 2015 09:47:42 +0100
Peter Stephenson <p.stephenson@xxxxxxxxxxx> wrote:
> That's probably OK, but rather than test CC when using CPP, it might be
> simpler just to test if $(CPP) contains "gnu" as an alternative to
> "gcc"?

... Or is this safer?

diff --git a/Src/zsh.mdd b/Src/zsh.mdd
index 71dd613..820fcab 100644
--- a/Src/zsh.mdd
+++ b/Src/zsh.mdd
@@ -28,8 +28,8 @@ hdrdeps="zshcurses.h zshterm.h"
 # on the option to remove them being the same.
 signames.c: signames1.awk signames2.awk ../config.h @SIGNAL_H@
 	$(AWK) -f $(sdir)/signames1.awk @SIGNAL_H@ >sigtmp.c
-	case "$(CPP)" in \
-	gcc*) \
+	case "`$(CPP) --version 2>&1`" in \
+	*GCC*) \
 	$(CPP) -P sigtmp.c >sigtmp.out;; \
 	*) \
 	$(CPP) sigtmp.c >sigtmp.out;; \

pws



Messages sorted by: Reverse Date, Date, Thread, Author