3
# Copyright (C) 1996-2013 John W. Eaton
5
# This file is part of Octave.
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.
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
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/>.
24
echo "usage: mkdefs srcdir file < preprocessed-file-contents" 1>&2
31
echo "// DO NOT EDIT! Generated automatically by mkdefs."
34
xsrcdir=`echo "$file" | sed "s,^$srcdir,libinterp,"`
37
xsrcdir="libinterp/$file"
40
echo " XDEFUN_FILE_NAME (\"$xsrcdir\")"
41
egrep '^(///*|/\*) *PKG_ADD:' $file
43
$SED -n -e '/^ *BEGIN_INSTALL_BUILTIN/{
45
s/BEGIN_INSTALL_BUILTIN//
46
s/^#[ \t][ \t]*[0-9][0-9]*.*$//
47
/END_INSTALL_BUILTIN/b done
52
s/END_INSTALL_BUILTIN//