Mercurial > octave
diff libinterp/build-env-features.sh @ 23020:1dfbdd593c5b
also read oct-conf-post.h for build environment info
* build-env-features.sh: Handle multiple input files. Accept space
between '#' and 'define' when searching for feature macros.
* libinterp/module.mk (libinterp/build-env-features.cc): Also depend
on oct-conf-post.h and pass both config.h and oct-conf-post.h to the
build-env-features.sh script.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 07 Jan 2017 18:39:50 -0500 |
parents | 592fa741e0aa |
children | debe0c7dcefc |
line wrap: on
line diff
--- a/libinterp/build-env-features.sh Sat Jan 07 13:38:30 2017 -0800 +++ b/libinterp/build-env-features.sh Sat Jan 07 18:39:50 2017 -0500 @@ -26,8 +26,6 @@ AWK=${AWK:-awk} -conffile=$1 - cat << EOF // DO NOT EDIT! Generated automatically from $conffile by Make." @@ -56,16 +54,19 @@ EOF -$AWK \ - '/#define (OCTAVE_HAVE|HAVE)_/ { - sub (/(OCTAVE_HAVE|HAVE)_/, "", $2); - printf (" m.assign (\"%s\", ov_true);\n", $2); - } - /\/\* #undef (OCTAVE_HAVE|HAVE)_/ { - sub (/(OCTAVE_HAVE|HAVE)_/, "", $3); - printf (" m.assign (\"%s\", ov_false);\n", $3); - } { - }' $conffile | sort +for conffile in "$@"; do + $AWK \ + '/# *define *(OCTAVE_HAVE|HAVE)_/ { + sub (/# *define */, "", $0); + sub (/(OCTAVE_HAVE|HAVE)_/, "", $1) + printf (" m.assign (\"%s\", ov_true);\n", $1); + } + /\/\* #undef (OCTAVE_HAVE|HAVE)_/ { + sub (/(OCTAVE_HAVE|HAVE)_/, "", $3); + printf (" m.assign (\"%s\", ov_false);\n", $3); + } { + }' $conffile +done | sort cat << EOF