diff options
author | H. Peter Anvin <hpa@zytor.com> | 2019-10-03 21:32:08 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2019-10-03 21:34:42 -0700 |
commit | 97ea4adcf0d862472857a4d2e2211edabf8a69df (patch) | |
tree | 44d91ff366d46a8c3e3747d5b6b36d1b68d96489 /autogen.sh | |
parent | fae1dd3d947a9b112c273ea669091fbdf9ccd4d6 (diff) | |
download | nasm-97ea4adcf0d862472857a4d2e2211edabf8a69df.tar.gz |
config/unconfig.h: eliminate #undef directives
config/config.h as generated by autoconf has #undef directives
commented out, but the autoheader-generated template contains them,
and config/unconfig.h should not contain them. Re-introduce
config/config.h.in, and postprocess it to generate config/unconfig.h
by commenting out all the #undef directives, just as configure does.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'autogen.sh')
-rwxr-xr-x | autogen.sh | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -43,6 +43,15 @@ if test ! -f autoconf/aclocal.m4; then fi rm -rf autoconf/*m4.old "$AUTOHEADER" -B autoconf +if [ config/config.h.in -nt config/unconfig.h ]; then + # Create a file corresponding to a completely empty configure + # instance, commenting out the #undef directives from the template + # just like configure would do. + perl -np < config/config.h.in > config/unconfig.h \ + -e 's:^(\#\s*undef\s.*)$:/* $1 */:;' \ + -e 's:config/config.h.in:config/unconfig.h:;' \ + -e 's:autoheader:autogen.sh:;' +fi "$AUTOCONF" -B autoconf rm -rf autom4te.cache config.log config.status config/config.h Makefile |