view libinterp/build-env-features.sh @ 21264:dfce76507f4b

Fix dbstop to find subfuncs of old-style class methods (bug #34804). * symtab.cc (find_submethod): New function to find subfunc in old-style class method. * symtab.h (find_method): Call find_submethod if function exists but not found through find_method. * symtab.h (find_submethod): Prototype for new function.
author Lachlan <lachlanbis@gmail.com>
date Mon, 15 Feb 2016 14:03:23 -0800
parents a55b8ece1ecd
children 1bca6c72d2b1
line wrap: on
line source

#! /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_/ {
     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 | sort

cat << EOF

          initialized = true;
        }

      return m;
    }
  };
};
EOF