Mercurial > octave
diff libinterp/build-env-features.sh @ 21220:d78e45987d6a
rename octave::build_env namespace from octave::config
* build-env-features.sh: Rename from ocgt-conf-features.sh.
Update for new names.
* build-env.h: Rename from oct-conf.h. Also declare features function.
* build-env.in.cc: Rename from oct-conf.in.cc.
* oct-conf-features.h: Delete.
* libinterp/module.mk: Update.
* toplev.cc, __init_gnuplot__.cc, octave.cc: Update for new names.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sun, 07 Feb 2016 14:56:17 -0500 |
parents | libinterp/config-features.sh@82a44483dbff |
children | a55b8ece1ecd |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libinterp/build-env-features.sh Sun Feb 07 14:56:17 2016 -0500 @@ -0,0 +1,57 @@ +#! /bin/sh + +## Attempt to get traditional sort behavior based on byte values. +LC_ALL="C" +export LC_ALL + +set -e +AWK=${AWK:-awk} + +conffile=$1 + +cat << EOF +// DO NOT EDIT! Generated automatically from $conffile by Make." + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include "build-env.h" +#include "ov.h" + +namespace octave +{ + namespace build_env + { + octave_scalar_map + features (void) + { + static bool initialized = false; + + static octave_scalar_map m; + + if (! initialized) + { +EOF + +$AWK \ + '/#define (HAVE|ENABLE)_/ { + sub (/HAVE_/, "", $2); + printf (" m.assign (\"%s\", octave_value (true));\n", $2); + } + /\/\* #undef (HAVE|ENABLE)_/ { + sub (/HAVE_/, "", $3); + printf (" m.assign (\"%s\", octave_value (false));\n", $3); + } { + }' $conffile | sort + +cat << EOF + + initialized = true; + } + + return m; + } + }; +}; +EOF