~gabriel1984sibiu/octave/octave

« back to all changes in this revision

Viewing changes to libinterp/mkdefs

  • Committer: Grevutiu Gabriel
  • Date: 2014-01-02 13:05:54 UTC
  • Revision ID: gabriel1984sibiu@gmail.com-20140102130554-3r7ivdjln1ni6kcg
New version (3.8.0) from upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
#
 
3
# Copyright (C) 1996-2013 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
SED=${SED:-'sed'}
 
22
 
 
23
if [ $# -ne 2 ]; then
 
24
  echo "usage: mkdefs srcdir file < preprocessed-file-contents" 1>&2
 
25
  exit 1
 
26
fi
 
27
 
 
28
srcdir="$1"
 
29
file="$2";
 
30
 
 
31
echo "// DO NOT EDIT!  Generated automatically by mkdefs."
 
32
case "$file" in
 
33
  $srcdir/*)
 
34
    xsrcdir=`echo "$file" | sed "s,^$srcdir,libinterp,"`
 
35
  ;;
 
36
  *)
 
37
    xsrcdir="libinterp/$file"
 
38
  ;;
 
39
esac
 
40
echo " XDEFUN_FILE_NAME (\"$xsrcdir\")"
 
41
egrep '^(///*|/\*) *PKG_ADD:' $file
 
42
 
 
43
$SED -n -e '/^ *BEGIN_INSTALL_BUILTIN/{
 
44
  : loop
 
45
  s/BEGIN_INSTALL_BUILTIN//
 
46
  s/^#[ \t][ \t]*[0-9][0-9]*.*$//
 
47
  /END_INSTALL_BUILTIN/b done
 
48
  p
 
49
  n
 
50
  b loop
 
51
  : done
 
52
  s/END_INSTALL_BUILTIN//
 
53
  p
 
54
}'