summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2015-01-15 13:50:09 +0000
committerPeter Stephenson <pws@zsh.org>2015-01-15 13:52:40 +0000
commitc7aa6443907ddd97b6b1e8729ce9c897de0d244c (patch)
treec3a8e6033f0e429b8c0b1939200c454612eefd6b
parent6a04f5b3207fc4d1ab090e1fd7b6ff72ede39230 (diff)
downloadzsh-c7aa6443907ddd97b6b1e8729ce9c897de0d244c.tar.gz
zsh-c7aa6443907ddd97b6b1e8729ce9c897de0d244c.zip
34287: preprocessor for signal name generation.
Some gcc header files are difficult for the signames2.awk script to process, so if the preprocessor is gcc give the option -P to strip out the unwanted additions.
-rw-r--r--ChangeLog6
-rw-r--r--Src/zsh.mdd11
2 files changed, 16 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index a1046f27b..ce150381b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2015-01-15 Peter Stephenson <p.stephenson@samsung.com>
+
+ * 34287 (see 34286 from Markus Trippelsdorf): Src/zsh.mdd:
+ use -E argument for generating signal names if gcc is
+ preprocessor.
+
2015-01-14 Peter Stephenson <p.stephenson@samsung.com>
* 34283: Test/X02zlevi.ztst: also needs zpty.
diff --git a/Src/zsh.mdd b/Src/zsh.mdd
index f0379d2d1..71dd61374 100644
--- a/Src/zsh.mdd
+++ b/Src/zsh.mdd
@@ -22,9 +22,18 @@ hdrdeps="zshcurses.h zshterm.h"
:<<\Make
@CONFIG_MK@
+# If we're using gcc as the preprocessor, get rid of the additional
+# lines generated by the preprocessor as they can confuse the script.
+# We don't need these in other cases either, but can't necessarily rely
+# 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
- $(CPP) sigtmp.c >sigtmp.out
+ case "$(CPP)" in \
+ gcc*) \
+ $(CPP) -P sigtmp.c >sigtmp.out;; \
+ *) \
+ $(CPP) sigtmp.c >sigtmp.out;; \
+ esac
$(AWK) -f $(sdir)/signames2.awk sigtmp.out > $@
rm -f sigtmp.c sigtmp.out