From 8d188728171dfe764562b7d4e81fbfdc212897e4 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Wed, 7 Sep 2016 11:47:23 +0100 Subject: 39217: fix error name generation with GCC. Adapt the same trick as in zsh.mdd to ensure we don't get preprocessor lines in the output. --- Src/Modules/system.mdd | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Src') diff --git a/Src/Modules/system.mdd b/Src/Modules/system.mdd index eed0c1b9d..00a3e7896 100644 --- a/Src/Modules/system.mdd +++ b/Src/Modules/system.mdd @@ -15,7 +15,12 @@ errnames.c: errnames1.awk errnames2.awk $(dir_top)/config.h @ERRNO_H@ touch errtmp.out; \ else \ $(AWK) -f $(sdir)/errnames1.awk @ERRNO_H@ >errtmp.c; \ - $(CPP) errtmp.c >errtmp.out; \ + case "`$(CPP) --version &1`" in \ + *"Free Software Foundation"*) \ + $(CPP) -P errtmp.c >errtmp.out;; \ + *) \ + $(CPP) errtmp.c >errtmp.out;; \ + esac; \ fi $(AWK) -f $(sdir)/errnames2.awk errtmp.out > $@ rm -f errtmp.c errtmp.out -- cgit 1.4.1