1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-26 04:30:27 +01:00

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.
This commit is contained in:
Peter Stephenson 2015-01-15 13:50:09 +00:00
parent 6a04f5b320
commit c7aa644390
2 changed files with 16 additions and 1 deletions

View file

@ -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