view libinterp/config-features.sh @ 21129:228b65504557

maint: Eliminate useless statements after err_XXX. * Cell.cc, data.cc, eig.cc, hess.cc, oct-hist.cc, oct-stream.cc, rand.cc, audioread.cc, ov-base.cc, ov-class.cc, ov.cc, op-int.h, ops.h, CColVector.cc, CDiagMatrix.cc, CMatrix.cc, CRowVector.cc, DiagArray2.cc, MDiagArray2.cc, PermMatrix.cc, dMatrix.cc, fCColVector.cc, fCDiagMatrix.cc, fCMatrix.cc, fCRowVector.cc, fMatrix.cc, idx-vector.cc, CmplxGEPBAL.cc, dbleGEPBAL.cc, fCmplxGEPBAL.cc, floatGEPBAL.cc, Sparse-diag-op-defs.h, Sparse-op-defs.h, Sparse-perm-op-defs.h, mx-inlines.cc, mx-op-defs.h: maint: Eliminate useless statements after err_XXX.
author Rik <rik@octave.org>
date Thu, 21 Jan 2016 12:54:17 -0800
parents 2a4f83826024
children a65b906e25bc
line wrap: on
line source

#! /bin/sh

set -e
AWK=${AWK:-awk}

conffile=$1

cat << EOF
// DO NOT EDIT!  Generated automatically from $conffile by Make."

#include "oct-map.h"
#include "ov.h"

octave_scalar_map
octave_config_features (void)
{
  octave_scalar_map m;

EOF

$AWK \
  '/#define HAVE_/ {
     sub (/HAVE_/, "", $2);
     printf ("  m.assign (\"%s\", octave_value (true));\n", $2);
   }
   /\/\* #undef HAVE_/ {
     sub (/HAVE_/, "", $3);
     printf ("  m.assign (\"%s\", octave_value (false));\n", $3);
   } {
   }' $conffile

cat << EOF

  return m;
}
EOF