comparison 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
comparison
equal deleted inserted replaced
21219:ddf0a5f3a967 21220:d78e45987d6a
1 #! /bin/sh
2
3 ## Attempt to get traditional sort behavior based on byte values.
4 LC_ALL="C"
5 export LC_ALL
6
7 set -e
8 AWK=${AWK:-awk}
9
10 conffile=$1
11
12 cat << EOF
13 // DO NOT EDIT! Generated automatically from $conffile by Make."
14
15 #ifdef HAVE_CONFIG_H
16 #include <config.h>
17 #endif
18
19 #include "build-env.h"
20 #include "ov.h"
21
22 namespace octave
23 {
24 namespace build_env
25 {
26 octave_scalar_map
27 features (void)
28 {
29 static bool initialized = false;
30
31 static octave_scalar_map m;
32
33 if (! initialized)
34 {
35 EOF
36
37 $AWK \
38 '/#define (HAVE|ENABLE)_/ {
39 sub (/HAVE_/, "", $2);
40 printf (" m.assign (\"%s\", octave_value (true));\n", $2);
41 }
42 /\/\* #undef (HAVE|ENABLE)_/ {
43 sub (/HAVE_/, "", $3);
44 printf (" m.assign (\"%s\", octave_value (false));\n", $3);
45 } {
46 }' $conffile | sort
47
48 cat << EOF
49
50 initialized = true;
51 }
52
53 return m;
54 }
55 };
56 };
57 EOF