1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-01-01 05:16:05 +01:00
zsh/Src/Modules/system.mdd
Peter Stephenson 8d18872817 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.
2016-09-07 11:50:00 +01:00

35 lines
821 B
Text

name=zsh/system
link=dynamic
load=no
autofeatures="b:sysread b:syswrite b:sysopen b:sysseek b:syserror p:errnos f:systell"
objects="system.o errnames.o"
headers="errcount.h"
:<<\Make
# careful: ERRNO_H may contain a list
errnames.c: errnames1.awk errnames2.awk $(dir_top)/config.h @ERRNO_H@
if [ x"@ERRNO_H@" = x ]; then \
touch errtmp.out; \
else \
$(AWK) -f $(sdir)/errnames1.awk @ERRNO_H@ >errtmp.c; \
case "`$(CPP) --version </dev/null 2>&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
errcount.h: errnames.c
grep 'define.*ERRCOUNT' errnames.c > $@
clean-here: clean.system
clean.system:
rm -f errcount.h errnames.c
Make