Mercurial > hg > octave-thorsten
comparison libinterp/mkbuiltins @ 15195:2fc554ffbc28
split libinterp from src
* libinterp: New directory. Move all files from src directory here
except Makefile.am, main.cc, main-cli.cc, mkoctfile.in.cc,
mkoctfilr.in.sh, octave-config.in.cc, octave-config.in.sh.
* libinterp/Makefile.am: New file, extracted from src/Makefile.am.
* src/Makefile.am: Delete everything except targets and definitions
needed to build and link main and utility programs.
* Makefile.am (SUBDIRS): Include libinterp in the list.
* autogen.sh: Run config-module.sh in libinterp/dldfcn directory, not
src/dldfcn directory.
* configure.ac (AC_CONFIG_SRCDIR): Use libinterp/octave.cc, not
src/octave.cc.
(DL_LDFLAGS, LIBOCTINTERP): Use libinterp, not src.
(AC_CONFIG_FILES): Include libinterp/Makefile in the list.
* find-docstring-files.sh: Look in libinterp, not src.
* gui/src/Makefile.am (liboctgui_la_CPPFLAGS): Find header files in
libinterp, not src.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 18 Aug 2012 16:23:39 -0400 |
parents | src/mkbuiltins@ea6997657614 |
children | 307912900544 |
comparison
equal
deleted
inserted
replaced
15194:0f0b795044c3 | 15195:2fc554ffbc28 |
---|---|
1 #! /bin/sh | |
2 # | |
3 # Copyright (C) 1996-2012 John W. Eaton | |
4 # | |
5 # This file is part of Octave. | |
6 # | |
7 # Octave is free software; you can redistribute it and/or modify it | |
8 # under the terms of the GNU General Public License as published by the | |
9 # Free Software Foundation; either version 3 of the License, or (at | |
10 # your option) any later version. | |
11 # | |
12 # Octave is distributed in the hope that it will be useful, but WITHOUT | |
13 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
14 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
15 # for more details. | |
16 # | |
17 # You should have received a copy of the GNU General Public License | |
18 # along with Octave; see the file COPYING. If not, see | |
19 # <http://www.gnu.org/licenses/>. | |
20 | |
21 if test $# -eq 0; then | |
22 echo "usage: mkbuiltins f1 f2 ..." 1>&2 | |
23 exit 1 | |
24 fi | |
25 | |
26 SED=${SED:-'sed'} | |
27 | |
28 cat << \EOF | |
29 // DO NOT EDIT! Generated automatically by mkbuiltins. | |
30 | |
31 #ifdef HAVE_CONFIG_H | |
32 #include "config.h" | |
33 #endif | |
34 | |
35 #include "defun.h" | |
36 #include "oct-obj.h" | |
37 #include "variables.h" | |
38 #include "builtins.h" | |
39 | |
40 #if defined (quad) | |
41 #undef quad | |
42 #endif | |
43 | |
44 #if defined (ENABLE_DYNAMIC_LINKING) | |
45 | |
46 #define XDEFUN_DLD_INTERNAL(name, args_name, nargout_name, doc) | |
47 | |
48 #define XDEFUNX_DLD_INTERNAL(name, fname, args_name, nargout_name, doc) | |
49 | |
50 #else | |
51 | |
52 #define XDEFUN_DLD_INTERNAL(name, args_name, nargout_name, doc) \ | |
53 XDEFUN_INTERNAL(name, args_name, nargout_name, doc) | |
54 | |
55 #define XDEFUNX_DLD_INTERNAL(name, fname, args_name, nargout_name, doc) \ | |
56 XDEFUNX_INTERNAL(name, fname, args_name, nargout_name, doc) | |
57 | |
58 #endif | |
59 | |
60 #define XDEFUN_FILE_NAME(name) \ | |
61 std::string file = name; | |
62 | |
63 #define XDEFUN_INTERNAL(name, args_name, nargout_name, doc) \ | |
64 extern DECLARE_FUN (name, args_name, nargout_name); \ | |
65 install_builtin_function (F ## name, #name, file, doc); \ | |
66 | |
67 #define XDEFCONSTFUN_INTERNAL(name, args_name, nargout_name, doc) \ | |
68 extern DECLARE_FUN (name, args_name, nargout_name); \ | |
69 install_builtin_function (F ## name, #name, file, doc, false); \ | |
70 | |
71 #define XDEFUNX_INTERNAL(name, fname, args_name, nargout_name, doc) \ | |
72 extern DECLARE_FUNX (fname, args_name, nargout_name); \ | |
73 install_builtin_function (fname, name, file, doc); \ | |
74 | |
75 #define XDEFALIAS_INTERNAL(alias, name) \ | |
76 alias_builtin (#alias, #name); | |
77 | |
78 #define XDEFCONST_INTERNAL(name, defn, doc) | |
79 | |
80 EOF | |
81 | |
82 for arg | |
83 do | |
84 fcn=`echo "$arg" | $SED 's,.*/,,; s/\.df//; s/-/_/g;'` | |
85 echo "static void" | |
86 echo "install_${fcn}_fcns (void)" | |
87 echo "{" | |
88 cat "$arg" | |
89 echo "}" | |
90 echo "" | |
91 done | |
92 | |
93 cat << \EOF | |
94 | |
95 void | |
96 install_builtins (void) | |
97 { | |
98 EOF | |
99 | |
100 for arg | |
101 do | |
102 fcn=`echo "$arg" | $SED 's,.*/,,; s/\.df//; s/-/_/g;'` | |
103 echo " install_${fcn}_fcns ();" | |
104 done | |
105 | |
106 cat << \EOF | |
107 } | |
108 | |
109 EOF | |
110 | |
111 exit 0 |