1N/A#! /bin/sh
1N/A#
1N/A# Convert a source file to a TeXinfo file. Stolen from glibc.
1N/A#
1N/A# Usage: src2texi SRCDIR SRC TEXI
1N/A
1N/Adir=$1
1N/Asrc=`basename $2`
1N/Atexi=`basename $3`
1N/A
1N/Ased -e 's,[{}],@&,g' \
1N/A -e 's,/\*\(@.*\)\*/,\1,g' \
1N/A -e 's,/\* *,/* @r{,g' -e 's, *\*/,} */,' \
1N/A -e 's/\(@[a-z][a-z]*\)@{\([^}]*\)@}/\1{\2}/g' \
1N/A ${dir}/${src} | expand > ${texi}.new
1N/Amv -f ${texi}.new ${dir}/${texi}