octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

declarations for built-in DEFUN functions


From: John W. Eaton
Subject: declarations for built-in DEFUN functions
Date: Tue, 18 Sep 2012 15:41:47 -0400

After using several built-in DEFUN functions for handling callbacks in
the GUI, I thought it might be best to just provide declarations for
all of them.  Since the declarations are all uniform, it seemed best
to generate the declarations automatically.  My current attempt is
attached.  This change does the following:

  * For each source file foo.{cc,yy,ll} that includes a DEFUN,
    generate a corresponding foo-defun-decls.h file with a Makefile
    rule.

  * Include the foo-defun-decls.h file in the foo.{cc,yy,ll} file.

  * All declarations are of the form

      extern OCTINTERP_API octave_value_list
      Ffoo (const octave_value_list& args = octave_value (),
            int nargout = 0);

    so that arguments may be omitted in function calls.

One motivation for wanting to call built-in functions directly instead
of using feval is that we often want to call a particular built-in
function.  If you use feval, you will search the load-path and can end
up calling a a user-defined function instead of the built-in function
you intended to call.

Some questions:

  * Nearly all source files already have corresponding header files.
    Should we include the -defun-decls.h files there instead of in the
    .cc files?

  * Would it be useful to have a function that creates an
    octave_value_list from one or more individual values so that we
    could write things like

      octave_value_list values = Fsave (arg_list (arg1, arg2, arg3), nargout);

    instead of writing

      octave_value_list args;
      arg(2) = arg3;
      arg(1) = arg2;
      arg(0) = arg1;
      octave_value_list values = Fsave (args, nargout);

    ?  I'd say yes.  I think this could be made to work simply by
    defining a series of overloaded functions of the form

      octave_value_list
      arg_list (const octave_value& arg1);

      ...

      octave_value_list
      arg_list (const octave_value& arg1, ..., const octave_value& argN);

    for some reasonable number of arguments.  Or does someone know of
    a way to make this work for an arbitrary number of arguments using
    some template trick?

Any objection, or any thoughts about how this proposed change could be
improved?

jwe

# HG changeset patch
# User John W. Eaton <address@hidden>
# Date 1347994555 14400
# Node ID 314f539c3aefc46aea08f9f4f9f18a1a5d4e2ede
# Parent  3dcd96e1f65724476094378ec9fae79ac7a75f2c
provide decls for built-in DEFUN functions

* mk-defun-decls: New file.
* find-defun-files.sh: Don't transform .cc, .yy, and .ll to .df.
* libinterp/Makefile.am (SRC_DEF_FILES): Transform .cc, .yy, and .ll
* to .df here.
(EXTRA_DIST): Include mk-defun-decls in the list.
(DEFUN_DECL_FILES, %-defun-decls.h : %.cc): New variables and rule.
(BUILT_SOURCES): Include $(DEFUN_DECL_FILES) in the list.

* __contourc__.cc, __dispatch__.cc, __lin_interpn__.cc,
__pchip_deriv__.cc, __qp__.cc, balance.cc, besselj.cc, betainc.cc,
bitfcns.cc, bsxfun.cc, cellfun.cc, colloc.cc, conv2.cc, daspk.cc,
dasrt.cc, dassl.cc, det.cc, dlmread.cc, dot.cc, eig.cc, fft.cc,
fft2.cc, fftn.cc, filter.cc, find.cc, gammainc.cc, gcd.cc,
getgrent.cc, getpwent.cc, getrusage.cc, givens.cc, hess.cc,
hex2num.cc, inv.cc, kron.cc, lookup.cc, lsode.cc, lu.cc, luinc.cc,
mappers.cc, matrix_type.cc, max.cc, md5sum.cc, mgorth.cc, nproc.cc,
pinv.cc, quad.cc, quadcc.cc, qz.cc, rand.cc, rcond.cc, regexp.cc,
schur.cc, sparse.cc, spparms.cc, sqrtm.cc, str2double.cc, strfind.cc,
strfns.cc, sub2ind.cc, svd.cc, syl.cc, syscalls.cc, time.cc, tril.cc,
typecast.cc, defun-dld.h, defun-int.h, pt-jit.cc, data.cc, debug.cc,
defaults.cc, dirfns.cc, error.cc, file-io.cc, graphics.cc, help.cc,
input.cc, load-path.cc, load-save.cc, ls-oct-ascii.cc, oct-hist.cc,
pager.cc, pr-output.cc, profiler.cc, sighandlers.cc, symtab.cc,
sysdep.cc, toplev.cc, utils.cc, variables.cc, ov-base.cc,
ov-bool-mat.cc, ov-cell.cc, ov-class.cc, ov-fcn-handle.cc,
ov-fcn-inline.cc, ov-flt-re-mat.cc, ov-int16.cc, ov-int32.cc,
ov-int64.cc, ov-int8.cc, ov-null-mat.cc, ov-oncleanup.cc, ov-range.cc,
ov-re-mat.cc, ov-struct.cc, ov-typeinfo.cc, ov-uint16.cc,
ov-uint32.cc, ov-uint64.cc, ov-uint8.cc, ov-usr-fcn.cc, ov.cc,
octave.cc, lex.ll, oct-parse.yy, pt-arg-list.cc, pt-binop.cc,
pt-eval.cc, pt-mat.cc: Include corresponding -defun-decls.h file.

diff --git a/libinterp/Makefile.am b/libinterp/Makefile.am
--- a/libinterp/Makefile.am
+++ b/libinterp/Makefile.am
@@ -30,7 +30,7 @@
   -I$(top_builddir)/liboctave/operators -I$(top_srcdir)/liboctave/operators \
   -I$(top_srcdir)/liboctave/system \
   -I$(top_srcdir)/liboctave/util \
-  -I$(srcdir)/octave-value \
+  -Ioctave-value -I$(srcdir)/octave-value \
   -I$(srcdir)/operators \
   -Iparse-tree -I$(srcdir)/parse-tree \
   -Iinterp-core -I$(srcdir)/interp-core \
@@ -60,6 +60,7 @@
   oct-conf.h \
   version.h \
   $(BUILT_SOURCES_EXTRA) \
+  $(DEFUN_DECL_FILES) \
   builtins.cc
 
 BUILT_DISTFILES = \
@@ -87,6 +88,7 @@
   find-defun-files.sh \
   gendoc.pl \
   genprops.awk \
+  mk-defun-decls \
   mk-errno-list \
   mk-pkg-add \
   mkbuiltins \
@@ -192,7 +194,10 @@
 #fft.df fft.lo fft2.df fft2.lo fftn.df fftn.lo: CPPFLAGS += $(FFTW_XCPPFLAGS)
 
 ## Section for defining and creating DEF_FILES
-SRC_DEF_FILES := $(shell $(srcdir)/find-defun-files.sh "$(srcdir)" $(DIST_SRC))
+SRC_DEFUN_FILES := $(shell $(srcdir)/find-defun-files.sh "$(srcdir)" 
$(DIST_SRC))
+SRC_DEF_FILES2 := $(SRC_DEFUN_FILES:.cc=.df)
+SRC_DEF_FILES1 := $(SRC_DEF_FILES2:.yy=.df)
+SRC_DEF_FILES := $(SRC_DEF_FILES1:.ll=.df)
 
 DLDFCN_DEF_FILES = $(DLDFCN_SRC:.cc=.df)
 
@@ -220,6 +225,19 @@
          -DMAKE_BUILTINS $< | $(srcdir)/mkdefs $(srcdir) $< > address@hidden
        mv address@hidden $@
 
+DEFUN_DECL_FILES2 := $(SRC_DEFUN_FILES:.cc=-defun-decls.h)
+DEFUN_DECL_FILES1 := $(DEFUN_DECL_FILES2:.yy=-defun-decls.h)
+DEFUN_DECL_FILES := $(DEFUN_DECL_FILES1:.ll=-defun-decls.h)
+
+$(DEFUN_DECL_FILES): mk-defun-decls Makefile
+
+## Rule to build a DEF file from a .cc file
+%-defun-decls.h: %.cc
+       $(CXXCPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+         $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) \
+         -DMAKE_BUILTINS $< | $(srcdir)/mk-defun-decls $(srcdir) $< > 
address@hidden
+       mv address@hidden $@
+
 ## Override Automake's rule that forces a .hh extension on us even
 ## though we don't want it.  It would be super awesome if automake
 ## would allow users to choose the header file extension.
diff --git a/libinterp/corefcn/__contourc__.cc 
b/libinterp/corefcn/__contourc__.cc
--- a/libinterp/corefcn/__contourc__.cc
+++ b/libinterp/corefcn/__contourc__.cc
@@ -44,6 +44,10 @@
 #include "error.h"
 #include "oct-obj.h"
 
+#ifndef MAKE_BUILTINS
+#include "__contourc__-defun-decls.h"
+#endif
+
 static Matrix this_contour;
 static Matrix contourc;
 static int elem;
diff --git a/libinterp/corefcn/__dispatch__.cc 
b/libinterp/corefcn/__dispatch__.cc
--- a/libinterp/corefcn/__dispatch__.cc
+++ b/libinterp/corefcn/__dispatch__.cc
@@ -39,6 +39,10 @@
 #include "symtab.h"
 #include "variables.h"
 
+#ifndef MAKE_BUILTINS
+#include "__dispatch__-defun-decls.h"
+#endif
+
 DEFUN (__dispatch__, args, nargout,
   "Undocumented internal function")
 {
diff --git a/libinterp/corefcn/__lin_interpn__.cc 
b/libinterp/corefcn/__lin_interpn__.cc
--- a/libinterp/corefcn/__lin_interpn__.cc
+++ b/libinterp/corefcn/__lin_interpn__.cc
@@ -32,6 +32,10 @@
 #include "error.h"
 #include "oct-obj.h"
 
+#ifndef MAKE_BUILTINS
+#include "__lin_interpn__-defun-decls.h"
+#endif
+
 // equivalent to isvector.m
 
 template <class T>
diff --git a/libinterp/corefcn/__pchip_deriv__.cc 
b/libinterp/corefcn/__pchip_deriv__.cc
--- a/libinterp/corefcn/__pchip_deriv__.cc
+++ b/libinterp/corefcn/__pchip_deriv__.cc
@@ -32,6 +32,10 @@
 #include "utils.h"
 #include "f77-fcn.h"
 
+#ifndef MAKE_BUILTINS
+#include "__pchip_deriv__-defun-decls.h"
+#endif
+
 extern "C"
 {
   F77_RET_T
diff --git a/libinterp/corefcn/__qp__.cc b/libinterp/corefcn/__qp__.cc
--- a/libinterp/corefcn/__qp__.cc
+++ b/libinterp/corefcn/__qp__.cc
@@ -38,6 +38,10 @@
 #include "pr-output.h"
 #include "utils.h"
 
+#ifndef MAKE_BUILTINS
+#include "__qp__-defun-decls.h"
+#endif
+
 static Matrix
 null (const Matrix& A, octave_idx_type& rank)
 {
diff --git a/libinterp/corefcn/balance.cc b/libinterp/corefcn/balance.cc
--- a/libinterp/corefcn/balance.cc
+++ b/libinterp/corefcn/balance.cc
@@ -46,6 +46,10 @@
 #include "oct-obj.h"
 #include "utils.h"
 
+#ifndef MAKE_BUILTINS
+#include "balance-defun-decls.h"
+#endif
+
 DEFUN (balance, args, nargout,
   "-*- texinfo -*-\n\
 @deftypefn  {Built-in Function} address@hidden =} balance (@var{A})\n\
diff --git a/libinterp/corefcn/besselj.cc b/libinterp/corefcn/besselj.cc
--- a/libinterp/corefcn/besselj.cc
+++ b/libinterp/corefcn/besselj.cc
@@ -33,6 +33,10 @@
 #include "oct-obj.h"
 #include "utils.h"
 
+#ifndef MAKE_BUILTINS
+#include "besselj-defun-decls.h"
+#endif
+
 enum bessel_type
 {
   BESSEL_J,
diff --git a/libinterp/corefcn/betainc.cc b/libinterp/corefcn/betainc.cc
--- a/libinterp/corefcn/betainc.cc
+++ b/libinterp/corefcn/betainc.cc
@@ -32,6 +32,10 @@
 #include "oct-obj.h"
 #include "utils.h"
 
+#ifndef MAKE_BUILTINS
+#include "betainc-defun-decls.h"
+#endif
+
 // FIXME: These functions do not need to be dynamically loaded.  They should
 //        be placed elsewhere in the Octave code hierarchy.
 
diff --git a/libinterp/corefcn/bitfcns.cc b/libinterp/corefcn/bitfcns.cc
--- a/libinterp/corefcn/bitfcns.cc
+++ b/libinterp/corefcn/bitfcns.cc
@@ -44,6 +44,10 @@
 
 #include <functional>
 
+#ifndef MAKE_BUILTINS
+#include "bitfcns-defun-decls.h"
+#endif
+
 #if !defined (HAVE_CXX_BITWISE_OP_TEMPLATES)
 namespace std 
 {
diff --git a/libinterp/corefcn/bsxfun.cc b/libinterp/corefcn/bsxfun.cc
--- a/libinterp/corefcn/bsxfun.cc
+++ b/libinterp/corefcn/bsxfun.cc
@@ -39,6 +39,10 @@
 #include "unwind-prot.h"
 #include "ov-fcn-handle.h"
 
+#ifndef MAKE_BUILTINS
+#include "bsxfun-defun-decls.h"
+#endif
+
 // Optimized bsxfun operations
 enum bsxfun_builtin_op
 {
diff --git a/libinterp/corefcn/cellfun.cc b/libinterp/corefcn/cellfun.cc
--- a/libinterp/corefcn/cellfun.cc
+++ b/libinterp/corefcn/cellfun.cc
@@ -63,6 +63,10 @@
 
 #include "ov-fcn-handle.h"
 
+#ifndef MAKE_BUILTINS
+#include "cellfun-defun-decls.h"
+#endif
+
 static octave_value_list
 get_output_list (octave_idx_type count, octave_idx_type nargout,
                  const octave_value_list& inputlist,
diff --git a/libinterp/corefcn/colloc.cc b/libinterp/corefcn/colloc.cc
--- a/libinterp/corefcn/colloc.cc
+++ b/libinterp/corefcn/colloc.cc
@@ -34,6 +34,10 @@
 #include "oct-obj.h"
 #include "utils.h"
 
+#ifndef MAKE_BUILTINS
+#include "colloc-defun-decls.h"
+#endif
+
 DEFUN (colloc, args, ,
   "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} address@hidden, @var{amat}, @var{bmat}, 
@var{q}] =} colloc (@var{n}, \"left\", \"right\")\n\
diff --git a/libinterp/corefcn/conv2.cc b/libinterp/corefcn/conv2.cc
--- a/libinterp/corefcn/conv2.cc
+++ b/libinterp/corefcn/conv2.cc
@@ -32,6 +32,10 @@
 #include "oct-obj.h"
 #include "utils.h"
 
+#ifndef MAKE_BUILTINS
+#include "conv2-defun-decls.h"
+#endif
+
 enum Shape { SHAPE_FULL, SHAPE_SAME, SHAPE_VALID };
 
 DEFUN (conv2, args, ,
diff --git a/libinterp/corefcn/daspk.cc b/libinterp/corefcn/daspk.cc
--- a/libinterp/corefcn/daspk.cc
+++ b/libinterp/corefcn/daspk.cc
@@ -44,6 +44,10 @@
 
 #include "DASPK-opts.cc"
 
+#ifndef MAKE_BUILTINS
+#include "daspk-defun-decls.h"
+#endif
+
 // Global pointer for user defined function required by daspk.
 static octave_function *daspk_fcn;
 
diff --git a/libinterp/corefcn/dasrt.cc b/libinterp/corefcn/dasrt.cc
--- a/libinterp/corefcn/dasrt.cc
+++ b/libinterp/corefcn/dasrt.cc
@@ -44,6 +44,10 @@
 
 #include "DASRT-opts.cc"
 
+#ifndef MAKE_BUILTINS
+#include "dasrt-defun-decls.h"
+#endif
+
 // Global pointers for user defined function required by dasrt.
 static octave_function *dasrt_f;
 static octave_function *dasrt_j;
diff --git a/libinterp/corefcn/dassl.cc b/libinterp/corefcn/dassl.cc
--- a/libinterp/corefcn/dassl.cc
+++ b/libinterp/corefcn/dassl.cc
@@ -44,6 +44,10 @@
 
 #include "DASSL-opts.cc"
 
+#ifndef MAKE_BUILTINS
+#include "dassl-defun-decls.h"
+#endif
+
 // Global pointer for user defined function required by dassl.
 static octave_function *dassl_fcn;
 
diff --git a/libinterp/corefcn/det.cc b/libinterp/corefcn/det.cc
--- a/libinterp/corefcn/det.cc
+++ b/libinterp/corefcn/det.cc
@@ -43,6 +43,10 @@
 #include "ov-flt-cx-diag.h"
 #include "ov-perm.h"
 
+#ifndef MAKE_BUILTINS
+#include "det-defun-decls.h"
+#endif
+
 #define MAYBE_CAST(VAR, CLASS) \
   const CLASS *VAR = arg.type_id () == CLASS::static_type_id () ? \
    dynamic_cast<const CLASS *> (&arg.get_rep ()) : 0
diff --git a/libinterp/corefcn/dlmread.cc b/libinterp/corefcn/dlmread.cc
--- a/libinterp/corefcn/dlmread.cc
+++ b/libinterp/corefcn/dlmread.cc
@@ -41,6 +41,10 @@
 #include "oct-obj.h"
 #include "utils.h"
 
+#ifndef MAKE_BUILTINS
+#include "dlmread-defun-decls.h"
+#endif
+
 static const octave_idx_type idx_max =  
std::numeric_limits<octave_idx_type>::max ();
 
 static bool
diff --git a/libinterp/corefcn/dot.cc b/libinterp/corefcn/dot.cc
--- a/libinterp/corefcn/dot.cc
+++ b/libinterp/corefcn/dot.cc
@@ -30,6 +30,10 @@
 #include "defun.h"
 #include "parse.h"
 
+#ifndef MAKE_BUILTINS
+#include "dot-defun-decls.h"
+#endif
+
 extern "C"
 {
   F77_RET_T
diff --git a/libinterp/corefcn/eig.cc b/libinterp/corefcn/eig.cc
--- a/libinterp/corefcn/eig.cc
+++ b/libinterp/corefcn/eig.cc
@@ -33,6 +33,10 @@
 #include "oct-obj.h"
 #include "utils.h"
 
+#ifndef MAKE_BUILTINS
+#include "eig-defun-decls.h"
+#endif
+
 DEFUN (eig, args, nargout,
   "-*- texinfo -*-\n\
 @deftypefn  {Built-in Function} address@hidden =} eig (@var{A})\n\
diff --git a/libinterp/corefcn/fft.cc b/libinterp/corefcn/fft.cc
--- a/libinterp/corefcn/fft.cc
+++ b/libinterp/corefcn/fft.cc
@@ -33,6 +33,10 @@
 #include "oct-obj.h"
 #include "utils.h"
 
+#ifndef MAKE_BUILTINS
+#include "fft-defun-decls.h"
+#endif
+
 #if defined (HAVE_FFTW)
 #define FFTSRC "@sc{fftw}"
 #else
diff --git a/libinterp/corefcn/fft2.cc b/libinterp/corefcn/fft2.cc
--- a/libinterp/corefcn/fft2.cc
+++ b/libinterp/corefcn/fft2.cc
@@ -33,6 +33,10 @@
 #include "oct-obj.h"
 #include "utils.h"
 
+#ifndef MAKE_BUILTINS
+#include "fft2-defun-decls.h"
+#endif
+
 // This function should be merged with Fifft.
 
 #if defined (HAVE_FFTW)
diff --git a/libinterp/corefcn/fftn.cc b/libinterp/corefcn/fftn.cc
--- a/libinterp/corefcn/fftn.cc
+++ b/libinterp/corefcn/fftn.cc
@@ -32,6 +32,10 @@
 #include "oct-obj.h"
 #include "utils.h"
 
+#ifndef MAKE_BUILTINS
+#include "fftn-defun-decls.h"
+#endif
+
 // This function should be merged with Fifft.
 
 #if defined (HAVE_FFTW)
diff --git a/libinterp/corefcn/filter.cc b/libinterp/corefcn/filter.cc
--- a/libinterp/corefcn/filter.cc
+++ b/libinterp/corefcn/filter.cc
@@ -38,6 +38,10 @@
 #include "error.h"
 #include "oct-obj.h"
 
+#ifndef MAKE_BUILTINS
+#include "filter-defun-decls.h"
+#endif
+
 #if !defined (CXX_NEW_FRIEND_TEMPLATE_DECL)
 extern MArray<double>
 filter (MArray<double>&, MArray<double>&, MArray<double>&, int dim);
diff --git a/libinterp/corefcn/find.cc b/libinterp/corefcn/find.cc
--- a/libinterp/corefcn/find.cc
+++ b/libinterp/corefcn/find.cc
@@ -31,6 +31,10 @@
 #include "gripes.h"
 #include "oct-obj.h"
 
+#ifndef MAKE_BUILTINS
+#include "find-defun-decls.h"
+#endif
+
 // Find at most N_TO_FIND nonzero elements in NDA.  Search forward if
 // DIRECTION is 1, backward if it is -1.  NARGOUT is the number of
 // output arguments.  If N_TO_FIND is -1, find all nonzero elements.
diff --git a/libinterp/corefcn/gammainc.cc b/libinterp/corefcn/gammainc.cc
--- a/libinterp/corefcn/gammainc.cc
+++ b/libinterp/corefcn/gammainc.cc
@@ -32,6 +32,10 @@
 #include "oct-obj.h"
 #include "utils.h"
 
+#ifndef MAKE_BUILTINS
+#include "gammainc-defun-decls.h"
+#endif
+
 DEFUN (gammainc, args, ,
   "-*- texinfo -*-\n\
 @deftypefn  {Mapping Function} {} gammainc (@var{x}, @var{a})\n\
diff --git a/libinterp/corefcn/gcd.cc b/libinterp/corefcn/gcd.cc
--- a/libinterp/corefcn/gcd.cc
+++ b/libinterp/corefcn/gcd.cc
@@ -36,6 +36,10 @@
 #include "error.h"
 #include "oct-obj.h"
 
+#ifndef MAKE_BUILTINS
+#include "gcd-defun-decls.h"
+#endif
+
 static double
 simple_gcd (double a, double b)
 {
diff --git a/libinterp/corefcn/getgrent.cc b/libinterp/corefcn/getgrent.cc
--- a/libinterp/corefcn/getgrent.cc
+++ b/libinterp/corefcn/getgrent.cc
@@ -38,6 +38,10 @@
 #include "oct-obj.h"
 #include "utils.h"
 
+#ifndef MAKE_BUILTINS
+#include "getgrent-defun-decls.h"
+#endif
+
 // Group file functions.  (Why not?)
 
 static octave_value
diff --git a/libinterp/corefcn/getpwent.cc b/libinterp/corefcn/getpwent.cc
--- a/libinterp/corefcn/getpwent.cc
+++ b/libinterp/corefcn/getpwent.cc
@@ -38,6 +38,10 @@
 #include "oct-obj.h"
 #include "utils.h"
 
+#ifndef MAKE_BUILTINS
+#include "getpwent-defun-decls.h"
+#endif
+
 // Password file functions.  (Why not?)
 
 static octave_value
diff --git a/libinterp/corefcn/getrusage.cc b/libinterp/corefcn/getrusage.cc
--- a/libinterp/corefcn/getrusage.cc
+++ b/libinterp/corefcn/getrusage.cc
@@ -43,6 +43,10 @@
 #include "oct-obj.h"
 #include "utils.h"
 
+#ifndef MAKE_BUILTINS
+#include "getrusage-defun-decls.h"
+#endif
+
 #if !defined (HZ)
 #if defined (CLK_TCK)
 #define HZ CLK_TCK
diff --git a/libinterp/corefcn/givens.cc b/libinterp/corefcn/givens.cc
--- a/libinterp/corefcn/givens.cc
+++ b/libinterp/corefcn/givens.cc
@@ -30,6 +30,10 @@
 #include "error.h"
 #include "oct-obj.h"
 
+#ifndef MAKE_BUILTINS
+#include "givens-defun-decls.h"
+#endif
+
 DEFUN (givens, args, nargout,
   "-*- texinfo -*-\n\
 @deftypefn  {Built-in Function} address@hidden =} givens (@var{x}, @var{y})\n\
diff --git a/libinterp/corefcn/hess.cc b/libinterp/corefcn/hess.cc
--- a/libinterp/corefcn/hess.cc
+++ b/libinterp/corefcn/hess.cc
@@ -35,6 +35,10 @@
 #include "oct-obj.h"
 #include "utils.h"
 
+#ifndef MAKE_BUILTINS
+#include "hess-defun-decls.h"
+#endif
+
 DEFUN (hess, args, nargout,
   "-*- texinfo -*-\n\
 @deftypefn  {Built-in Function} address@hidden =} hess (@var{A})\n\
diff --git a/libinterp/corefcn/hex2num.cc b/libinterp/corefcn/hex2num.cc
--- a/libinterp/corefcn/hex2num.cc
+++ b/libinterp/corefcn/hex2num.cc
@@ -32,6 +32,10 @@
 #include "oct-obj.h"
 #include "utils.h"
 
+#ifndef MAKE_BUILTINS
+#include "hex2num-defun-decls.h"
+#endif
+
 DEFUN (hex2num, args, ,
   "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} address@hidden =} hex2num (@var{s})\n\
diff --git a/libinterp/corefcn/inv.cc b/libinterp/corefcn/inv.cc
--- a/libinterp/corefcn/inv.cc
+++ b/libinterp/corefcn/inv.cc
@@ -36,6 +36,10 @@
 #include "ov-perm.h"
 #include "utils.h"
 
+#ifndef MAKE_BUILTINS
+#include "inv-defun-decls.h"
+#endif
+
 DEFUN (inv, args, nargout,
   "-*- texinfo -*-\n\
 @deftypefn  {Built-in Function} address@hidden =} inv (@var{A})\n\
diff --git a/libinterp/corefcn/kron.cc b/libinterp/corefcn/kron.cc
--- a/libinterp/corefcn/kron.cc
+++ b/libinterp/corefcn/kron.cc
@@ -48,6 +48,10 @@
 #include "error.h"
 #include "oct-obj.h"
 
+#ifndef MAKE_BUILTINS
+#include "kron-defun-decls.h"
+#endif
+
 template <class R, class T>
 static MArray<T>
 kron (const MArray<R>& a, const MArray<T>& b)
diff --git a/libinterp/corefcn/lookup.cc b/libinterp/corefcn/lookup.cc
--- a/libinterp/corefcn/lookup.cc
+++ b/libinterp/corefcn/lookup.cc
@@ -40,6 +40,10 @@
 #include "oct-obj.h"
 #include "ov.h"
 
+#ifndef MAKE_BUILTINS
+#include "lookup-defun-decls.h"
+#endif
+
 static
 bool
 contains_char (const std::string& str, char c)
diff --git a/libinterp/corefcn/lsode.cc b/libinterp/corefcn/lsode.cc
--- a/libinterp/corefcn/lsode.cc
+++ b/libinterp/corefcn/lsode.cc
@@ -46,6 +46,10 @@
 
 #include "LSODE-opts.cc"
 
+#ifndef MAKE_BUILTINS
+#include "lsode-defun-decls.h"
+#endif
+
 // Global pointer for user defined function required by lsode.
 static octave_function *lsode_fcn;
 
diff --git a/libinterp/corefcn/lu.cc b/libinterp/corefcn/lu.cc
--- a/libinterp/corefcn/lu.cc
+++ b/libinterp/corefcn/lu.cc
@@ -39,6 +39,10 @@
 #include "ov-re-sparse.h"
 #include "ov-cx-sparse.h"
 
+#ifndef MAKE_BUILTINS
+#include "lu-defun-decls.h"
+#endif
+
 template <class MT>
 static octave_value
 get_lu_l (const base_lu<MT>& fact)
diff --git a/libinterp/corefcn/luinc.cc b/libinterp/corefcn/luinc.cc
--- a/libinterp/corefcn/luinc.cc
+++ b/libinterp/corefcn/luinc.cc
@@ -37,6 +37,10 @@
 #include "ov-re-sparse.h"
 #include "ov-cx-sparse.h"
 
+#ifndef MAKE_BUILTINS
+#include "luinc-defun-decls.h"
+#endif
+
 DEFUN (luinc, args, nargout,
   "-*- texinfo -*-\n\
 @deftypefn  {Built-in Function} address@hidden, @var{U}, @var{P}, @var{Q}] =} 
luinc (@var{A}, '0')\n\
diff --git a/libinterp/corefcn/mappers.cc b/libinterp/corefcn/mappers.cc
--- a/libinterp/corefcn/mappers.cc
+++ b/libinterp/corefcn/mappers.cc
@@ -36,6 +36,10 @@
 #include "error.h"
 #include "variables.h"
 
+#ifndef MAKE_BUILTINS
+#include "mappers-defun-decls.h"
+#endif
+
 DEFUN (abs, args, ,
     "-*- texinfo -*-\n\
 @deftypefn {Mapping Function} {} abs (@var{z})\n\
diff --git a/libinterp/corefcn/matrix_type.cc b/libinterp/corefcn/matrix_type.cc
--- a/libinterp/corefcn/matrix_type.cc
+++ b/libinterp/corefcn/matrix_type.cc
@@ -36,6 +36,10 @@
 #include "MatrixType.h"
 #include "oct-locbuf.h"
 
+#ifndef MAKE_BUILTINS
+#include "matrix_type-defun-decls.h"
+#endif
+
 DEFUN (matrix_type, args, ,
   "-*- texinfo -*-\n\
 @deftypefn  {Built-in Function} address@hidden =} matrix_type (@var{A})\n\
diff --git a/libinterp/corefcn/max.cc b/libinterp/corefcn/max.cc
--- a/libinterp/corefcn/max.cc
+++ b/libinterp/corefcn/max.cc
@@ -41,6 +41,10 @@
 #include "ov-re-sparse.h"
 #include "ov-cx-sparse.h"
 
+#ifndef MAKE_BUILTINS
+#include "max-defun-decls.h"
+#endif
+
 template <class ArrayType>
 static octave_value_list
 do_minmax_red_op (const octave_value& arg,
diff --git a/libinterp/corefcn/md5sum.cc b/libinterp/corefcn/md5sum.cc
--- a/libinterp/corefcn/md5sum.cc
+++ b/libinterp/corefcn/md5sum.cc
@@ -36,6 +36,10 @@
 #include "oct-env.h"
 #include "oct-md5.h"
 
+#ifndef MAKE_BUILTINS
+#include "md5sum-defun-decls.h"
+#endif
+
 DEFUN (md5sum, args, ,
    "-*- texinfo -*-\n\
 @deftypefn  {Built-in Function} {} md5sum (@var{file})\n\
diff --git a/libinterp/corefcn/mgorth.cc b/libinterp/corefcn/mgorth.cc
--- a/libinterp/corefcn/mgorth.cc
+++ b/libinterp/corefcn/mgorth.cc
@@ -30,6 +30,10 @@
 #include "error.h"
 #include "gripes.h"
 
+#ifndef MAKE_BUILTINS
+#include "mgorth-defun-decls.h"
+#endif
+
 template <class ColumnVector, class Matrix, class RowVector>
 static void
 do_mgorth (ColumnVector& x, const Matrix& V, RowVector& h)
diff --git a/libinterp/corefcn/nproc.cc b/libinterp/corefcn/nproc.cc
--- a/libinterp/corefcn/nproc.cc
+++ b/libinterp/corefcn/nproc.cc
@@ -27,6 +27,10 @@
 #include "defun.h"
 #include "nproc.h"
 
+#ifndef MAKE_BUILTINS
+#include "nproc-defun-decls.h"
+#endif
+
 DEFUN (nproc, args, nargout,
    "-*- texinfo -*-\n\
 @deftypefn  {Built-in Function} {} nproc ()\n\
diff --git a/libinterp/corefcn/pinv.cc b/libinterp/corefcn/pinv.cc
--- a/libinterp/corefcn/pinv.cc
+++ b/libinterp/corefcn/pinv.cc
@@ -36,6 +36,10 @@
 #include "ov-flt-cx-diag.h"
 #include "ov-perm.h"
 
+#ifndef MAKE_BUILTINS
+#include "pinv-defun-decls.h"
+#endif
+
 DEFUN (pinv, args, ,
   "-*- texinfo -*-\n\
 @deftypefn  {Built-in Function} {} pinv (@var{x})\n\
diff --git a/libinterp/corefcn/quad.cc b/libinterp/corefcn/quad.cc
--- a/libinterp/corefcn/quad.cc
+++ b/libinterp/corefcn/quad.cc
@@ -44,6 +44,10 @@
 
 #include "Quad-opts.cc"
 
+#ifndef MAKE_BUILTINS
+#include "quad-defun-decls.h"
+#endif
+
 #if defined (quad)
 #undef quad
 #endif
diff --git a/libinterp/corefcn/quadcc.cc b/libinterp/corefcn/quadcc.cc
--- a/libinterp/corefcn/quadcc.cc
+++ b/libinterp/corefcn/quadcc.cc
@@ -36,6 +36,10 @@
 //#include "oct.h"
 //#include "defun.h"
 
+#ifndef MAKE_BUILTINS
+#include "quadcc-defun-decls.h"
+#endif
+
 /* Define the size of the interval heap. */
 #define cquad_heapsize                  200
 
diff --git a/libinterp/corefcn/qz.cc b/libinterp/corefcn/qz.cc
--- a/libinterp/corefcn/qz.cc
+++ b/libinterp/corefcn/qz.cc
@@ -58,6 +58,10 @@
 #include "utils.h"
 #include "variables.h"
 
+#ifndef MAKE_BUILTINS
+#include "qz-defun-decls.h"
+#endif
+
 typedef octave_idx_type (*sort_function) (const octave_idx_type& LSIZE, const 
double& ALPHA,
                               const double& BETA, const double& S,
                               const double& P);
diff --git a/libinterp/corefcn/rand.cc b/libinterp/corefcn/rand.cc
--- a/libinterp/corefcn/rand.cc
+++ b/libinterp/corefcn/rand.cc
@@ -47,6 +47,10 @@
 #include "utils.h"
 #include "ov-re-mat.h"
 
+#ifndef MAKE_BUILTINS
+#include "rand-defun-decls.h"
+#endif
+
 /*
 %!shared __random_statistical_tests__
 %! # Flag whether the statistical tests should be run in "make check" or not
diff --git a/libinterp/corefcn/rcond.cc b/libinterp/corefcn/rcond.cc
--- a/libinterp/corefcn/rcond.cc
+++ b/libinterp/corefcn/rcond.cc
@@ -30,6 +30,10 @@
 #include "oct-obj.h"
 #include "utils.h"
 
+#ifndef MAKE_BUILTINS
+#include "rcond-defun-decls.h"
+#endif
+
 DEFUN (rcond, args, ,
   "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} address@hidden =} rcond (@var{A})\n\
diff --git a/libinterp/corefcn/regexp.cc b/libinterp/corefcn/regexp.cc
--- a/libinterp/corefcn/regexp.cc
+++ b/libinterp/corefcn/regexp.cc
@@ -44,6 +44,10 @@
 #include "oct-obj.h"
 #include "utils.h"
 
+#ifndef MAKE_BUILTINS
+#include "regexp-defun-decls.h"
+#endif
+
 // Replace backslash escapes in a string with the real values.  We need
 // this special function instead of the one in utils.cc because the set
 // of escape sequences used in regexps is different from those used in
diff --git a/libinterp/corefcn/schur.cc b/libinterp/corefcn/schur.cc
--- a/libinterp/corefcn/schur.cc
+++ b/libinterp/corefcn/schur.cc
@@ -37,6 +37,10 @@
 #include "oct-obj.h"
 #include "utils.h"
 
+#ifndef MAKE_BUILTINS
+#include "schur-defun-decls.h"
+#endif
+
 template <class Matrix>
 static octave_value
 mark_upper_triangular (const Matrix& a)
diff --git a/libinterp/corefcn/sparse.cc b/libinterp/corefcn/sparse.cc
--- a/libinterp/corefcn/sparse.cc
+++ b/libinterp/corefcn/sparse.cc
@@ -41,6 +41,10 @@
 #include "ov-cx-sparse.h"
 #include "ov-bool-sparse.h"
 
+#ifndef MAKE_BUILTINS
+#include "sparse-defun-decls.h"
+#endif
+
 DEFUN (issparse, args, ,
   "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} issparse (@var{x})\n\
diff --git a/libinterp/corefcn/spparms.cc b/libinterp/corefcn/spparms.cc
--- a/libinterp/corefcn/spparms.cc
+++ b/libinterp/corefcn/spparms.cc
@@ -33,6 +33,10 @@
 
 #include "oct-spparms.h"
 
+#ifndef MAKE_BUILTINS
+#include "spparms-defun-decls.h"
+#endif
+
 DEFUN (spparms, args, nargout,
   "-*- texinfo -*-\n\
 @deftypefn  {Built-in Function} { } spparms ()\n\
diff --git a/libinterp/corefcn/sqrtm.cc b/libinterp/corefcn/sqrtm.cc
--- a/libinterp/corefcn/sqrtm.cc
+++ b/libinterp/corefcn/sqrtm.cc
@@ -39,6 +39,10 @@
 #include "utils.h"
 #include "xnorm.h"
 
+#ifndef MAKE_BUILTINS
+#include "sqrtm-defun-decls.h"
+#endif
+
 template <class Matrix>
 static void
 sqrtm_utri_inplace (Matrix& T)
diff --git a/libinterp/corefcn/str2double.cc b/libinterp/corefcn/str2double.cc
--- a/libinterp/corefcn/str2double.cc
+++ b/libinterp/corefcn/str2double.cc
@@ -38,6 +38,10 @@
 #include "gripes.h"
 #include "utils.h"
 
+#ifndef MAKE_BUILTINS
+#include "str2double-defun-decls.h"
+#endif
+
 static inline bool
 is_imag_unit (int c)
 { return c == 'i' || c == 'j'; }
diff --git a/libinterp/corefcn/strfind.cc b/libinterp/corefcn/strfind.cc
--- a/libinterp/corefcn/strfind.cc
+++ b/libinterp/corefcn/strfind.cc
@@ -37,6 +37,10 @@
 #include "gripes.h"
 #include "utils.h"
 
+#ifndef MAKE_BUILTINS
+#include "strfind-defun-decls.h"
+#endif
+
 // This allows safe indexing with char. In C++, char may be (and often is) 
signed!
 #define ORD(ch) static_cast<unsigned char>(ch)
 #define TABSIZE (std::numeric_limits<unsigned char>::max () + 1)
diff --git a/libinterp/corefcn/strfns.cc b/libinterp/corefcn/strfns.cc
--- a/libinterp/corefcn/strfns.cc
+++ b/libinterp/corefcn/strfns.cc
@@ -40,6 +40,10 @@
 #include "unwind-prot.h"
 #include "utils.h"
 
+#ifndef MAKE_BUILTINS
+#include "strfns-defun-decls.h"
+#endif
+
 DEFUN (char, args, ,
   "-*- texinfo -*-\n\
 @deftypefn  {Built-in Function} {} char (@var{x})\n\
diff --git a/libinterp/corefcn/sub2ind.cc b/libinterp/corefcn/sub2ind.cc
--- a/libinterp/corefcn/sub2ind.cc
+++ b/libinterp/corefcn/sub2ind.cc
@@ -31,6 +31,10 @@
 #include "gripes.h"
 #include "oct-obj.h"
 
+#ifndef MAKE_BUILTINS
+#include "sub2ind-defun-decls.h"
+#endif
+
 
 static dim_vector
 get_dim_vector (const octave_value& val, const char *name)
diff --git a/libinterp/corefcn/svd.cc b/libinterp/corefcn/svd.cc
--- a/libinterp/corefcn/svd.cc
+++ b/libinterp/corefcn/svd.cc
@@ -37,6 +37,10 @@
 #include "utils.h"
 #include "variables.h"
 
+#ifndef MAKE_BUILTINS
+#include "svd-defun-decls.h"
+#endif
+
 static int Vsvd_driver = SVD::GESVD;
 
 DEFUN (svd, args, nargout,
diff --git a/libinterp/corefcn/syl.cc b/libinterp/corefcn/syl.cc
--- a/libinterp/corefcn/syl.cc
+++ b/libinterp/corefcn/syl.cc
@@ -32,6 +32,10 @@
 #include "oct-obj.h"
 #include "utils.h"
 
+#ifndef MAKE_BUILTINS
+#include "syl-defun-decls.h"
+#endif
+
 DEFUN (syl, args, nargout,
   "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} address@hidden =} syl (@var{A}, @var{B}, 
@var{C})\n\
diff --git a/libinterp/corefcn/syscalls.cc b/libinterp/corefcn/syscalls.cc
--- a/libinterp/corefcn/syscalls.cc
+++ b/libinterp/corefcn/syscalls.cc
@@ -57,6 +57,10 @@
 #include "variables.h"
 #include "input.h"
 
+#ifndef MAKE_BUILTINS
+#include "syscalls-defun-decls.h"
+#endif
+
 static octave_scalar_map
 mk_stat_map (const base_file_stat& fs)
 {
diff --git a/libinterp/corefcn/time.cc b/libinterp/corefcn/time.cc
--- a/libinterp/corefcn/time.cc
+++ b/libinterp/corefcn/time.cc
@@ -33,6 +33,10 @@
 #include "ov.h"
 #include "oct-obj.h"
 
+#ifndef MAKE_BUILTINS
+#include "time-defun-decls.h"
+#endif
+
 // Date and time functions.
 
 static octave_scalar_map
diff --git a/libinterp/corefcn/tril.cc b/libinterp/corefcn/tril.cc
--- a/libinterp/corefcn/tril.cc
+++ b/libinterp/corefcn/tril.cc
@@ -37,6 +37,10 @@
 #include "error.h"
 #include "oct-obj.h"
 
+#ifndef MAKE_BUILTINS
+#include "tril-defun-decls.h"
+#endif
+
 // The bulk of the work.
 template <class T>
 static Array<T>
diff --git a/libinterp/corefcn/typecast.cc b/libinterp/corefcn/typecast.cc
--- a/libinterp/corefcn/typecast.cc
+++ b/libinterp/corefcn/typecast.cc
@@ -35,6 +35,10 @@
 #include "oct-obj.h"
 #include "unwind-prot.h"
 
+#ifndef MAKE_BUILTINS
+#include "typecast-defun-decls.h"
+#endif
+
 static dim_vector
 get_vec_dims (const dim_vector& old_dims, octave_idx_type n)
 {
diff --git a/libinterp/find-defun-files.sh b/libinterp/find-defun-files.sh
--- a/libinterp/find-defun-files.sh
+++ b/libinterp/find-defun-files.sh
@@ -21,6 +21,6 @@
     file="$srcdir/$arg"
   fi
   if [ "`$EGREP -l "$DEFUN_PATTERN" $file`" ]; then
-    echo "$file" | $SED "s,\\$srcdir/,," | $SED 's/\.cc$/.df/; s/\.ll$/.df/; 
s/\.yy$/.df/';
+    echo "$file" | $SED "s,\\$srcdir/,,"
   fi
 done
diff --git a/libinterp/interp-core/defun-dld.h 
b/libinterp/interp-core/defun-dld.h
--- a/libinterp/interp-core/defun-dld.h
+++ b/libinterp/interp-core/defun-dld.h
@@ -57,14 +57,14 @@
 #else
 
 #define DEFUN_DLD(name, args_name, nargout_name, doc) \
-  DECLARE_FUN_NO_DEFAULTS (name, args_name, nargout_name); \
+  DECLARE_FUN (name, args_name, nargout_name); \
   DEFINE_FUN_INSTALLER_FUN (name, doc) \
-  DECLARE_FUN_NO_DEFAULTS (name, args_name, nargout_name)
+  DECLARE_FUN (name, args_name, nargout_name)
 
 #define DEFUNX_DLD(name, fname, gname, args_name, nargout_name, doc) \
-  DECLARE_FUNX_NO_DEFAULTS (fname, args_name, nargout_name); \
+  DECLARE_FUNX (fname, args_name, nargout_name); \
   DEFINE_FUNX_INSTALLER_FUN (name, fname, gname, doc) \
-  DECLARE_FUNX_NO_DEFAULTS (fname, args_name, nargout_name)
+  DECLARE_FUNX (fname, args_name, nargout_name)
 
 #endif
 
diff --git a/libinterp/interp-core/defun-int.h 
b/libinterp/interp-core/defun-int.h
--- a/libinterp/interp-core/defun-int.h
+++ b/libinterp/interp-core/defun-int.h
@@ -77,23 +77,13 @@
 extern OCTINTERP_API void
 defun_isargout (int, int, bool *);
 
-#define DECLARE_FUNXX(name, args_decl, nargout_decl) \
-  OCTAVE_EXPORT octave_value_list name (args_decl, nargout_decl)
-
 #define DECLARE_FUNX(name, args_name, nargout_name) \
-  DECLARE_FUNXX (name, \
-                 const octave_value_list& args_name = octave_value_list (), \
-                 int nargout_name = 0)
-
-#define DECLARE_FUNX_NO_DEFAULTS(name, args_name, nargout_name) \
-  DECLARE_FUNXX (name, const octave_value_list& args_name, int nargout_name)
+  OCTAVE_EXPORT octave_value_list \
+  name (const octave_value_list& args_name, int nargout_name)
 
 #define DECLARE_FUN(name, args_name, nargout_name) \
   DECLARE_FUNX (F ## name, args_name, nargout_name)
 
-#define DECLARE_FUN_NO_DEFAULTS(name, args_name, nargout_name) \
-  DECLARE_FUNX_NO_DEFAULTS (F ## name, args_name, nargout_name)
-
 // Define the code that will be used to insert the new function into
 // the symbol table.  We look for this name instead of the actual
 // function so that we can easily install the doc std::string too.
diff --git a/libinterp/interp-core/pt-jit.cc b/libinterp/interp-core/pt-jit.cc
--- a/libinterp/interp-core/pt-jit.cc
+++ b/libinterp/interp-core/pt-jit.cc
@@ -56,6 +56,10 @@
 #include <llvm/Transforms/IPO.h>
 #include <llvm/Transforms/Scalar.h>
 
+#ifndef MAKE_BUILTINS
+#include "pt-jit-defun-decls.h"
+#endif
+
 static llvm::IRBuilder<> builder (llvm::getGlobalContext ());
 
 static llvm::LLVMContext& context = llvm::getGlobalContext ();
diff --git a/libinterp/interpfcn/data.cc b/libinterp/interpfcn/data.cc
--- a/libinterp/interpfcn/data.cc
+++ b/libinterp/interpfcn/data.cc
@@ -69,6 +69,10 @@
 #include "pager.h"
 #include "xnorm.h"
 
+#ifndef MAKE_BUILTINS
+#include "data-defun-decls.h"
+#endif
+
 #if ! defined (CLOCKS_PER_SEC)
 #if defined (CLK_TCK)
 #define CLOCKS_PER_SEC CLK_TCK
diff --git a/libinterp/interpfcn/debug.cc b/libinterp/interpfcn/debug.cc
--- a/libinterp/interpfcn/debug.cc
+++ b/libinterp/interpfcn/debug.cc
@@ -58,6 +58,10 @@
 
 #include "debug.h"
 
+#ifndef MAKE_BUILTINS
+#include "debug-defun-decls.h"
+#endif
+
 // Initialize the singleton object
 bp_table *bp_table::instance = 0;
 
diff --git a/libinterp/interpfcn/defaults.cc b/libinterp/interpfcn/defaults.cc
--- a/libinterp/interpfcn/defaults.cc
+++ b/libinterp/interpfcn/defaults.cc
@@ -55,6 +55,10 @@
 #include "variables.h"
 #include <version.h>
 
+#ifndef MAKE_BUILTINS
+#include "defaults-defun-decls.h"
+#endif
+
 std::string Voctave_home;
 
 std::string Vbin_dir;
diff --git a/libinterp/interpfcn/dirfns.cc b/libinterp/interpfcn/dirfns.cc
--- a/libinterp/interpfcn/dirfns.cc
+++ b/libinterp/interpfcn/dirfns.cc
@@ -60,6 +60,10 @@
 #include "utils.h"
 #include "variables.h"
 
+#ifndef MAKE_BUILTINS
+#include "dirfns-defun-decls.h"
+#endif
+
 // TRUE means we ask for confirmation before recursively removing a
 // directory tree.
 static bool Vconfirm_recursive_rmdir = true;
diff --git a/libinterp/interpfcn/error.cc b/libinterp/interpfcn/error.cc
--- a/libinterp/interpfcn/error.cc
+++ b/libinterp/interpfcn/error.cc
@@ -46,6 +46,10 @@
 #include "unwind-prot.h"
 #include "variables.h"
 
+#ifndef MAKE_BUILTINS
+#include "error-defun-decls.h"
+#endif
+
 // TRUE means that Octave will try to beep obnoxiously before printing
 // error messages.
 static bool Vbeep_on_error = false;
diff --git a/libinterp/interpfcn/file-io.cc b/libinterp/interpfcn/file-io.cc
--- a/libinterp/interpfcn/file-io.cc
+++ b/libinterp/interpfcn/file-io.cc
@@ -78,6 +78,10 @@
 #include "utils.h"
 #include "variables.h"
 
+#ifndef MAKE_BUILTINS
+#include "file-io-defun-decls.h"
+#endif
+
 static octave_value stdin_file;
 static octave_value stdout_file;
 static octave_value stderr_file;
diff --git a/libinterp/interpfcn/graphics.cc b/libinterp/interpfcn/graphics.cc
--- a/libinterp/interpfcn/graphics.cc
+++ b/libinterp/interpfcn/graphics.cc
@@ -2909,6 +2909,10 @@
 
 #include "graphics-props.cc"
 
+#ifndef MAKE_BUILTINS
+#include "graphics-defun-decls.h"
+#endif
+
 // ---------------------------------------------------------------------
 
 void
diff --git a/libinterp/interpfcn/help.cc b/libinterp/interpfcn/help.cc
--- a/libinterp/interpfcn/help.cc
+++ b/libinterp/interpfcn/help.cc
@@ -93,6 +93,10 @@
 
 #include <map>
 
+#ifndef MAKE_BUILTINS
+#include "help-defun-decls.h"
+#endif
+
 typedef std::map<std::string, std::string> map_type;
 typedef map_type::value_type pair_type;
 typedef map_type::const_iterator map_iter;
diff --git a/libinterp/interpfcn/input.cc b/libinterp/interpfcn/input.cc
--- a/libinterp/interpfcn/input.cc
+++ b/libinterp/interpfcn/input.cc
@@ -70,6 +70,10 @@
 #include "utils.h"
 #include "variables.h"
 
+#ifndef MAKE_BUILTINS
+#include "input-defun-decls.h"
+#endif
+
 // Primary prompt string.
 static std::string VPS1 = "\\s:\\#> ";
 
diff --git a/libinterp/interpfcn/load-path.cc b/libinterp/interpfcn/load-path.cc
--- a/libinterp/interpfcn/load-path.cc
+++ b/libinterp/interpfcn/load-path.cc
@@ -44,6 +44,10 @@
 #include "unwind-prot.h"
 #include "utils.h"
 
+#ifndef MAKE_BUILTINS
+#include "load-path-defun-decls.h"
+#endif
+
 load_path *load_path::instance = 0;
 load_path::hook_fcn_ptr load_path::add_hook = execute_pkg_add;
 load_path::hook_fcn_ptr load_path::remove_hook = execute_pkg_del;
diff --git a/libinterp/interpfcn/load-save.cc b/libinterp/interpfcn/load-save.cc
--- a/libinterp/interpfcn/load-save.cc
+++ b/libinterp/interpfcn/load-save.cc
@@ -89,6 +89,10 @@
 
 #ifdef HAVE_ZLIB
 #include "zfstream.h"
+
+#ifndef MAKE_BUILTINS
+#include "load-save-defun-decls.h"
+#endif
 #endif
 
 // Write octave-workspace file if Octave crashes or is killed by a signal.
diff --git a/libinterp/interpfcn/ls-oct-ascii.cc 
b/libinterp/interpfcn/ls-oct-ascii.cc
--- a/libinterp/interpfcn/ls-oct-ascii.cc
+++ b/libinterp/interpfcn/ls-oct-ascii.cc
@@ -64,6 +64,10 @@
 #include "version.h"
 #include "dMatrix.h"
 
+#ifndef MAKE_BUILTINS
+#include "ls-oct-ascii-defun-decls.h"
+#endif
+
 // The number of decimal digits to use when writing ascii data.
 static int Vsave_precision = 16;
 
diff --git a/libinterp/interpfcn/oct-hist.cc b/libinterp/interpfcn/oct-hist.cc
--- a/libinterp/interpfcn/oct-hist.cc
+++ b/libinterp/interpfcn/oct-hist.cc
@@ -68,6 +68,10 @@
 #include "utils.h"
 #include "variables.h"
 
+#ifndef MAKE_BUILTINS
+#include "oct-hist-defun-decls.h"
+#endif
+
 // TRUE means input is coming from temporary history file.
 bool input_from_tmp_history_file = false;
 
diff --git a/libinterp/interpfcn/pager.cc b/libinterp/interpfcn/pager.cc
--- a/libinterp/interpfcn/pager.cc
+++ b/libinterp/interpfcn/pager.cc
@@ -45,6 +45,10 @@
 #include "utils.h"
 #include "variables.h"
 
+#ifndef MAKE_BUILTINS
+#include "pager-defun-decls.h"
+#endif
+
 // Our actual connection to the external pager.
 static oprocstream *external_pager = 0;
 
diff --git a/libinterp/interpfcn/pr-output.cc b/libinterp/interpfcn/pr-output.cc
--- a/libinterp/interpfcn/pr-output.cc
+++ b/libinterp/interpfcn/pr-output.cc
@@ -58,6 +58,10 @@
 #include "utils.h"
 #include "variables.h"
 
+#ifndef MAKE_BUILTINS
+#include "pr-output-defun-decls.h"
+#endif
+
 // TRUE means use a scaled fixed point format for `format long' and
 // `format short'.
 static bool Vfixed_point_format = false;
diff --git a/libinterp/interpfcn/profiler.cc b/libinterp/interpfcn/profiler.cc
--- a/libinterp/interpfcn/profiler.cc
+++ b/libinterp/interpfcn/profiler.cc
@@ -32,6 +32,10 @@
 #include "pager.h"
 #include "profiler.h"
 
+#ifndef MAKE_BUILTINS
+#include "profiler-defun-decls.h"
+#endif
+
 profile_data_accumulator::enter::enter (profile_data_accumulator& a,
                                         const std::string& f)
   : acc (a)
diff --git a/libinterp/interpfcn/sighandlers.cc 
b/libinterp/interpfcn/sighandlers.cc
--- a/libinterp/interpfcn/sighandlers.cc
+++ b/libinterp/interpfcn/sighandlers.cc
@@ -53,6 +53,10 @@
 #include "utils.h"
 #include "variables.h"
 
+#ifndef MAKE_BUILTINS
+#include "sighandlers-defun-decls.h"
+#endif
+
 // Nonzero means we have already printed a message for this series of
 // SIGPIPES.  We assume that the writer will eventually give up.
 int pipe_handler_error_count = 0;
diff --git a/libinterp/interpfcn/symtab.cc b/libinterp/interpfcn/symtab.cc
--- a/libinterp/interpfcn/symtab.cc
+++ b/libinterp/interpfcn/symtab.cc
@@ -45,6 +45,10 @@
 #include "unwind-prot.h"
 #include "utils.h"
 
+#ifndef MAKE_BUILTINS
+#include "symtab-defun-decls.h"
+#endif
+
 symbol_table *symbol_table::instance = 0;
 
 symbol_table::scope_id_cache *symbol_table::scope_id_cache::instance = 0;
diff --git a/libinterp/interpfcn/sysdep.cc b/libinterp/interpfcn/sysdep.cc
--- a/libinterp/interpfcn/sysdep.cc
+++ b/libinterp/interpfcn/sysdep.cc
@@ -105,6 +105,10 @@
 #define WIN32_LEAN_AND_MEAN
 #include <tlhelp32.h>
 
+#ifndef MAKE_BUILTINS
+#include "sysdep-defun-decls.h"
+#endif
+
 static void
 w32_set_octave_home (void)
 {
diff --git a/libinterp/interpfcn/toplev.cc b/libinterp/interpfcn/toplev.cc
--- a/libinterp/interpfcn/toplev.cc
+++ b/libinterp/interpfcn/toplev.cc
@@ -77,6 +77,10 @@
 #include "variables.h"
 #include "version.h"
 
+#ifndef MAKE_BUILTINS
+#include "toplev-defun-decls.h"
+#endif
+
 void (*octave_exit) (int) = ::exit;
 
 // TRUE means the quit() call is allowed.
diff --git a/libinterp/interpfcn/utils.cc b/libinterp/interpfcn/utils.cc
--- a/libinterp/interpfcn/utils.cc
+++ b/libinterp/interpfcn/utils.cc
@@ -71,6 +71,10 @@
 #include "utils.h"
 #include "variables.h"
 
+#ifndef MAKE_BUILTINS
+#include "utils-defun-decls.h"
+#endif
+
 // Return TRUE if S is a valid identifier.
 
 bool
diff --git a/libinterp/interpfcn/variables.cc b/libinterp/interpfcn/variables.cc
--- a/libinterp/interpfcn/variables.cc
+++ b/libinterp/interpfcn/variables.cc
@@ -62,6 +62,10 @@
 #include "utils.h"
 #include "variables.h"
 
+#ifndef MAKE_BUILTINS
+#include "variables-defun-decls.h"
+#endif
+
 // Defines layout for the whos/who -long command
 static std::string Vwhos_line_format
   = "  %a:4; %ln:6; %cs:16:6:1;  %rb:12;  %lc:-1;\n";
diff --git a/libinterp/mk-defun-decls b/libinterp/mk-defun-decls
new file mode 100755
--- /dev/null
+++ b/libinterp/mk-defun-decls
@@ -0,0 +1,68 @@
+#! /bin/sh
+#
+# Copyright (C) 1996-2012 John W. Eaton
+#
+# This file is part of Octave.
+# 
+# Octave is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 3 of the License, or (at
+# your option) any later version.
+# 
+# Octave is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with Octave; see the file COPYING.  If not, see
+# <http://www.gnu.org/licenses/>.
+
+SED=${SED:-'sed'}
+
+if [ $# -ne 2 ]; then
+  echo "usage: mkdefs srcdir file < preprocessed-file-contents" 1>&2
+  exit 1
+fi
+
+srcdir="$1"
+file="$2";
+
+cat << \EOF
+// DO NOT EDIT!  Generated automatically by mk-defun-decls.
+
+#define DEFUN_DECL(name) \
+  extern OCTINTERP_API octave_value_list \
+  name (const octave_value_list& = octave_value_list (), int = 0);
+
+EOF
+case "$file" in
+  $srcdir/*)
+    xsrcdir=`echo "$file" | sed "s,^$srcdir,libinterp,"`
+  ;;
+  *)
+    xsrcdir="libinterp/$file"
+  ;;
+esac
+
+$SED -n -e '/^ *BEGIN_INSTALL_BUILTIN/{
+  : loop
+  s/BEGIN_INSTALL_BUILTIN//
+  s/^#[ \t][ \t]*[0-9][0-9]*.*$//
+  s/^ *\(XDEFUN\|XDEFCONSTFUN\)_INTERNAL *( *\([_A-Za-z][_A-Za-z0-9]*\) 
*,.*$/DEFUN_DECL (F\2);END_INSTALL_BUILTIN/
+  s/^ *XDEFUNX_INTERNAL *( *"\([_A-Za-z][_A-Za-z0-9]*\)" *,.*$/DEFUN_DECL 
(F\1);END_INSTALL_BUILTIN/
+  s/^ *XDEFALIAS_INTERNAL *(.*$/END_INSTALL_BUILTIN/
+  /END_INSTALL_BUILTIN/b done
+  p
+  n
+  b loop
+  : done
+  s/END_INSTALL_BUILTIN//
+  p
+}'
+
+cat << \EOF
+
+#undef DEFUN_DECL
+
+EOF
\ No newline at end of file
diff --git a/libinterp/octave-value/ov-base.cc 
b/libinterp/octave-value/ov-base.cc
--- a/libinterp/octave-value/ov-base.cc
+++ b/libinterp/octave-value/ov-base.cc
@@ -54,6 +54,10 @@
 #include "utils.h"
 #include "variables.h"
 
+#ifndef MAKE_BUILTINS
+#include "ov-base-defun-decls.h"
+#endif
+
 builtin_type_t btyp_mixed_numeric (builtin_type_t x, builtin_type_t y)
 {
   builtin_type_t retval = btyp_unknown;
diff --git a/libinterp/octave-value/ov-bool-mat.cc 
b/libinterp/octave-value/ov-bool-mat.cc
--- a/libinterp/octave-value/ov-bool-mat.cc
+++ b/libinterp/octave-value/ov-bool-mat.cc
@@ -50,6 +50,10 @@
 #include "ls-hdf5.h"
 #include "ls-utils.h"
 
+#ifndef MAKE_BUILTINS
+#include "ov-bool-mat-defun-decls.h"
+#endif
+
 template class octave_base_matrix<boolNDArray>;
 
 DEFINE_OCTAVE_ALLOCATOR (octave_bool_matrix);
diff --git a/libinterp/octave-value/ov-cell.cc 
b/libinterp/octave-value/ov-cell.cc
--- a/libinterp/octave-value/ov-cell.cc
+++ b/libinterp/octave-value/ov-cell.cc
@@ -57,6 +57,10 @@
 #include "ls-hdf5.h"
 #include "ls-utils.h"
 
+#ifndef MAKE_BUILTINS
+#include "ov-cell-defun-decls.h"
+#endif
+
 // Cell is able to handle octave_value indexing by itself, so just forward
 // everything.
 
diff --git a/libinterp/octave-value/ov-class.cc 
b/libinterp/octave-value/ov-class.cc
--- a/libinterp/octave-value/ov-class.cc
+++ b/libinterp/octave-value/ov-class.cc
@@ -54,6 +54,10 @@
 #include "unwind-prot.h"
 #include "variables.h"
 
+#ifndef MAKE_BUILTINS
+#include "ov-class-defun-decls.h"
+#endif
+
 DEFINE_OCTAVE_ALLOCATOR(octave_class);
 
 int octave_class::t_id (-1);
diff --git a/libinterp/octave-value/ov-fcn-handle.cc 
b/libinterp/octave-value/ov-fcn-handle.cc
--- a/libinterp/octave-value/ov-fcn-handle.cc
+++ b/libinterp/octave-value/ov-fcn-handle.cc
@@ -64,6 +64,10 @@
 #include "ls-oct-binary.h"
 #include "ls-utils.h"
 
+#ifndef MAKE_BUILTINS
+#include "ov-fcn-handle-defun-decls.h"
+#endif
+
 DEFINE_OCTAVE_ALLOCATOR (octave_fcn_handle);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_fcn_handle,
diff --git a/libinterp/octave-value/ov-fcn-inline.cc 
b/libinterp/octave-value/ov-fcn-inline.cc
--- a/libinterp/octave-value/ov-fcn-inline.cc
+++ b/libinterp/octave-value/ov-fcn-inline.cc
@@ -53,6 +53,10 @@
 #include "ls-hdf5.h"
 #include "ls-utils.h"
 
+#ifndef MAKE_BUILTINS
+#include "ov-fcn-inline-defun-decls.h"
+#endif
+
 DEFINE_OCTAVE_ALLOCATOR (octave_fcn_inline);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_fcn_inline,
diff --git a/libinterp/octave-value/ov-flt-re-mat.cc 
b/libinterp/octave-value/ov-flt-re-mat.cc
--- a/libinterp/octave-value/ov-flt-re-mat.cc
+++ b/libinterp/octave-value/ov-flt-re-mat.cc
@@ -68,6 +68,10 @@
 #include "ls-utils.h"
 #include "ls-hdf5.h"
 
+#ifndef MAKE_BUILTINS
+#include "ov-flt-re-mat-defun-decls.h"
+#endif
+
 template class octave_base_matrix<FloatNDArray>;
 
 DEFINE_OCTAVE_ALLOCATOR (octave_float_matrix);
diff --git a/libinterp/octave-value/ov-int16.cc 
b/libinterp/octave-value/ov-int16.cc
--- a/libinterp/octave-value/ov-int16.cc
+++ b/libinterp/octave-value/ov-int16.cc
@@ -55,6 +55,10 @@
 #include "ls-utils.h"
 #include "ls-hdf5.h"
 
+#ifndef MAKE_BUILTINS
+#include "ov-int16-defun-decls.h"
+#endif
+
 template class octave_base_matrix<int16NDArray>;
 
 template class octave_base_int_matrix<int16NDArray>;
diff --git a/libinterp/octave-value/ov-int32.cc 
b/libinterp/octave-value/ov-int32.cc
--- a/libinterp/octave-value/ov-int32.cc
+++ b/libinterp/octave-value/ov-int32.cc
@@ -55,6 +55,10 @@
 #include "ls-utils.h"
 #include "ls-hdf5.h"
 
+#ifndef MAKE_BUILTINS
+#include "ov-int32-defun-decls.h"
+#endif
+
 template class octave_base_matrix<int32NDArray>;
 
 template class octave_base_int_matrix<int32NDArray>;
diff --git a/libinterp/octave-value/ov-int64.cc 
b/libinterp/octave-value/ov-int64.cc
--- a/libinterp/octave-value/ov-int64.cc
+++ b/libinterp/octave-value/ov-int64.cc
@@ -55,6 +55,10 @@
 #include "ls-utils.h"
 #include "ls-hdf5.h"
 
+#ifndef MAKE_BUILTINS
+#include "ov-int64-defun-decls.h"
+#endif
+
 template class octave_base_matrix<int64NDArray>;
 
 template class octave_base_int_matrix<int64NDArray>;
diff --git a/libinterp/octave-value/ov-int8.cc 
b/libinterp/octave-value/ov-int8.cc
--- a/libinterp/octave-value/ov-int8.cc
+++ b/libinterp/octave-value/ov-int8.cc
@@ -55,6 +55,10 @@
 #include "ls-utils.h"
 #include "ls-hdf5.h"
 
+#ifndef MAKE_BUILTINS
+#include "ov-int8-defun-decls.h"
+#endif
+
 template class octave_base_matrix<int8NDArray>;
 
 template class octave_base_int_matrix<int8NDArray>;
diff --git a/libinterp/octave-value/ov-null-mat.cc 
b/libinterp/octave-value/ov-null-mat.cc
--- a/libinterp/octave-value/ov-null-mat.cc
+++ b/libinterp/octave-value/ov-null-mat.cc
@@ -28,6 +28,10 @@
 #include "ops.h"
 #include "defun.h"
 
+#ifndef MAKE_BUILTINS
+#include "ov-null-mat-defun-decls.h"
+#endif
+
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_null_matrix, "null_matrix", 
"double");
 
 const octave_value octave_null_matrix::instance (new octave_null_matrix ());
diff --git a/libinterp/octave-value/ov-oncleanup.cc 
b/libinterp/octave-value/ov-oncleanup.cc
--- a/libinterp/octave-value/ov-oncleanup.cc
+++ b/libinterp/octave-value/ov-oncleanup.cc
@@ -31,6 +31,10 @@
 #include "pt-misc.h"
 #include "toplev.h"
 
+#ifndef MAKE_BUILTINS
+#include "ov-oncleanup-defun-decls.h"
+#endif
+
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_oncleanup, "onCleanup",
                                      "onCleanup");
 
diff --git a/libinterp/octave-value/ov-range.cc 
b/libinterp/octave-value/ov-range.cc
--- a/libinterp/octave-value/ov-range.cc
+++ b/libinterp/octave-value/ov-range.cc
@@ -45,6 +45,10 @@
 #include "ls-hdf5.h"
 #include "ls-utils.h"
 
+#ifndef MAKE_BUILTINS
+#include "ov-range-defun-decls.h"
+#endif
+
 // If TRUE, allow ranges with non-integer elements as array indices.
 bool Vallow_noninteger_range_as_index = false;
 
diff --git a/libinterp/octave-value/ov-re-mat.cc 
b/libinterp/octave-value/ov-re-mat.cc
--- a/libinterp/octave-value/ov-re-mat.cc
+++ b/libinterp/octave-value/ov-re-mat.cc
@@ -68,6 +68,10 @@
 #include "ls-utils.h"
 #include "ls-hdf5.h"
 
+#ifndef MAKE_BUILTINS
+#include "ov-re-mat-defun-decls.h"
+#endif
+
 template class octave_base_matrix<NDArray>;
 
 DEFINE_OCTAVE_ALLOCATOR (octave_matrix);
diff --git a/libinterp/octave-value/ov-struct.cc 
b/libinterp/octave-value/ov-struct.cc
--- a/libinterp/octave-value/ov-struct.cc
+++ b/libinterp/octave-value/ov-struct.cc
@@ -47,6 +47,10 @@
 #include "ls-utils.h"
 #include "pr-output.h"
 
+#ifndef MAKE_BUILTINS
+#include "ov-struct-defun-decls.h"
+#endif
+
 DEFINE_OCTAVE_ALLOCATOR(octave_struct);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA(octave_struct, "struct", "struct");
diff --git a/libinterp/octave-value/ov-typeinfo.cc 
b/libinterp/octave-value/ov-typeinfo.cc
--- a/libinterp/octave-value/ov-typeinfo.cc
+++ b/libinterp/octave-value/ov-typeinfo.cc
@@ -31,6 +31,10 @@
 #include "error.h"
 #include "ov-typeinfo.h"
 
+#ifndef MAKE_BUILTINS
+#include "ov-typeinfo-defun-decls.h"
+#endif
+
 const int
 octave_value_typeinfo::init_tab_sz (16);
 
diff --git a/libinterp/octave-value/ov-uint16.cc 
b/libinterp/octave-value/ov-uint16.cc
--- a/libinterp/octave-value/ov-uint16.cc
+++ b/libinterp/octave-value/ov-uint16.cc
@@ -55,6 +55,10 @@
 #include "ls-utils.h"
 #include "ls-hdf5.h"
 
+#ifndef MAKE_BUILTINS
+#include "ov-uint16-defun-decls.h"
+#endif
+
 template class octave_base_matrix<uint16NDArray>;
 
 template class octave_base_int_matrix<uint16NDArray>;
diff --git a/libinterp/octave-value/ov-uint32.cc 
b/libinterp/octave-value/ov-uint32.cc
--- a/libinterp/octave-value/ov-uint32.cc
+++ b/libinterp/octave-value/ov-uint32.cc
@@ -55,6 +55,10 @@
 #include "ls-utils.h"
 #include "ls-hdf5.h"
 
+#ifndef MAKE_BUILTINS
+#include "ov-uint32-defun-decls.h"
+#endif
+
 template class octave_base_matrix<uint32NDArray>;
 
 template class octave_base_int_matrix<uint32NDArray>;
diff --git a/libinterp/octave-value/ov-uint64.cc 
b/libinterp/octave-value/ov-uint64.cc
--- a/libinterp/octave-value/ov-uint64.cc
+++ b/libinterp/octave-value/ov-uint64.cc
@@ -55,6 +55,10 @@
 #include "ls-utils.h"
 #include "ls-hdf5.h"
 
+#ifndef MAKE_BUILTINS
+#include "ov-uint64-defun-decls.h"
+#endif
+
 template class octave_base_matrix<uint64NDArray>;
 
 template class octave_base_int_matrix<uint64NDArray>;
diff --git a/libinterp/octave-value/ov-uint8.cc 
b/libinterp/octave-value/ov-uint8.cc
--- a/libinterp/octave-value/ov-uint8.cc
+++ b/libinterp/octave-value/ov-uint8.cc
@@ -55,6 +55,10 @@
 #include "ls-utils.h"
 #include "ls-hdf5.h"
 
+#ifndef MAKE_BUILTINS
+#include "ov-uint8-defun-decls.h"
+#endif
+
 template class octave_base_matrix<uint8NDArray>;
 
 template class octave_base_int_matrix<uint8NDArray>;
diff --git a/libinterp/octave-value/ov-usr-fcn.cc 
b/libinterp/octave-value/ov-usr-fcn.cc
--- a/libinterp/octave-value/ov-usr-fcn.cc
+++ b/libinterp/octave-value/ov-usr-fcn.cc
@@ -54,6 +54,10 @@
 #include "variables.h"
 #include "ov-fcn-handle.h"
 
+#ifndef MAKE_BUILTINS
+#include "ov-usr-fcn-defun-decls.h"
+#endif
+
 // Whether to optimize subsasgn method calls.
 static bool Voptimize_subsasgn_calls = true;
 
diff --git a/libinterp/octave-value/ov.cc b/libinterp/octave-value/ov.cc
--- a/libinterp/octave-value/ov.cc
+++ b/libinterp/octave-value/ov.cc
@@ -87,6 +87,10 @@
 #include "utils.h"
 #include "variables.h"
 
+#ifndef MAKE_BUILTINS
+#include "ov-defun-decls.h"
+#endif
+
 // We are likely to have a lot of octave_value objects to allocate, so
 // make the grow_size large.
 DEFINE_OCTAVE_ALLOCATOR2(octave_value, 1024);
diff --git a/libinterp/octave.cc b/libinterp/octave.cc
--- a/libinterp/octave.cc
+++ b/libinterp/octave.cc
@@ -74,6 +74,10 @@
 #include "variables.h"
 #include <version.h>
 
+#ifndef MAKE_BUILTINS
+#include "octave-defun-decls.h"
+#endif
+
 // Kluge.
 extern "C" F77_RET_T
 F77_FUNC (xerbla, XERBLA) (F77_CONST_CHAR_ARG_DECL,
diff --git a/libinterp/parse-tree/lex.ll b/libinterp/parse-tree/lex.ll
--- a/libinterp/parse-tree/lex.ll
+++ b/libinterp/parse-tree/lex.ll
@@ -78,6 +78,10 @@
 #include <oct-parse.h>
 #include <oct-gperf.h>
 
+#ifndef MAKE_BUILTINS
+#include "lex-defun-decls.h"
+#endif
+
 #if defined (GNULIB_NAMESPACE)
 // Calls to the following functions appear in the generated output from
 // flex without the namespace tag.  Redefine them so we will use them
diff --git a/libinterp/parse-tree/oct-parse.yy 
b/libinterp/parse-tree/oct-parse.yy
--- a/libinterp/parse-tree/oct-parse.yy
+++ b/libinterp/parse-tree/oct-parse.yy
@@ -77,6 +77,10 @@
 #include "utils.h"
 #include "variables.h"
 
+#ifndef MAKE_BUILTINS
+#include "oct-parse-defun-decls.h"
+#endif
+
 #if defined (GNULIB_NAMESPACE)
 // Calls to the following functions appear in the generated output from
 // Bison without the namespace tag.  Redefine them so we will use them
diff --git a/libinterp/parse-tree/pt-arg-list.cc 
b/libinterp/parse-tree/pt-arg-list.cc
--- a/libinterp/parse-tree/pt-arg-list.cc
+++ b/libinterp/parse-tree/pt-arg-list.cc
@@ -44,6 +44,10 @@
 #include "toplev.h"
 #include "unwind-prot.h"
 
+#ifndef MAKE_BUILTINS
+#include "pt-arg-list-defun-decls.h"
+#endif
+
 // Argument lists.
 
 tree_argument_list::~tree_argument_list (void)
diff --git a/libinterp/parse-tree/pt-binop.cc b/libinterp/parse-tree/pt-binop.cc
--- a/libinterp/parse-tree/pt-binop.cc
+++ b/libinterp/parse-tree/pt-binop.cc
@@ -34,6 +34,10 @@
 #include "pt-walk.h"
 #include "variables.h"
 
+#ifndef MAKE_BUILTINS
+#include "pt-binop-defun-decls.h"
+#endif
+
 // TRUE means we mark | and & expressions for braindead short-circuit
 // behavior.
 static bool Vdo_braindead_shortcircuit_evaluation;
diff --git a/libinterp/parse-tree/pt-eval.cc b/libinterp/parse-tree/pt-eval.cc
--- a/libinterp/parse-tree/pt-eval.cc
+++ b/libinterp/parse-tree/pt-eval.cc
@@ -47,6 +47,10 @@
 //FIXME: This should be part of tree_evaluator
 #include "pt-jit.h"
 
+#ifndef MAKE_BUILTINS
+#include "pt-eval-defun-decls.h"
+#endif
+
 static tree_evaluator std_evaluator;
 
 tree_evaluator *current_evaluator = &std_evaluator;
diff --git a/libinterp/parse-tree/pt-mat.cc b/libinterp/parse-tree/pt-mat.cc
--- a/libinterp/parse-tree/pt-mat.cc
+++ b/libinterp/parse-tree/pt-mat.cc
@@ -46,6 +46,10 @@
 #include "ov-re-sparse.h"
 #include "ov-cx-sparse.h"
 
+#ifndef MAKE_BUILTINS
+#include "pt-mat-defun-decls.h"
+#endif
+
 // The character to fill with when creating string arrays.
 char Vstring_fill_char = ' ';
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]