Mercurial > hg > octave-nkf
diff src/mkbuiltins @ 9906:8d20fb66a0dc
more automake fixes
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 03 Dec 2009 15:39:20 -0500 |
parents | 0d4613a736e9 |
children | fd0a3ac60b0e |
line wrap: on
line diff
--- a/src/mkbuiltins +++ b/src/mkbuiltins @@ -19,20 +19,13 @@ # along with Octave; see the file COPYING. If not, see # <http://www.gnu.org/licenses/>. -if test $# -ne 1; then - echo "usage: mkbuiltins f1" 1>&2 +if test $# -eq 0; then + echo "usage: mkbuiltins f1 f2 ..." 1>&2 exit 1 fi SED=${SED:-'sed'} -DEF_FILES=`cat $1` - -if test -z "$DEF_FILES"; then - echo "mkbuiltins: DEF_FILES is empty!" 1>&2 - exit 1 -fi - cat << \EOF // DO NOT EDIT! Generated automatically by mkbuiltins. @@ -86,12 +79,13 @@ EOF -for file in $DEF_FILES; do - fcn=`echo $file | $SED 's,.*/,,; s/\.df//; s/-/_/g;'` +for arg +do + fcn=`echo "$arg" | $SED 's,.*/,,; s/\.df//; s/-/_/g;'` echo "static void" echo "install_${fcn}_fcns (void)" echo "{" - cat $file + cat "$arg" echo "}" echo "" done @@ -103,8 +97,9 @@ { EOF -for file in $DEF_FILES; do - fcn=`echo $file | $SED 's,.*/,,; s/\.df//; s/-/_/g;'` +for arg +do + fcn=`echo "$arg" | $SED 's,.*/,,; s/\.df//; s/-/_/g;'` echo " install_${fcn}_fcns ();" done