1997-04-26 17:21:57 +04:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
#
|
|
|
|
|
2006-10-22 08:14:26 +04:00
|
|
|
datarootdir=@datarootdir@
|
ChangeLog, Makefile.in:
Remove libext2fs.info*, not just libext2fs.info*.gz. Add an
uninstall-doc-libs target.
ChangeLog, Makefile.in, compile_et.1, compile_et.sh.in:
Makefile.in: Fix bug where my_dir was set incorrectly. Install the
et_c.awk and et_h.awk files in $(datadir)/et (i.e., /usr/share/et)
directory. Change to use new installation directory variables
convention. Fix uninstall rules to take $(DESTDIR) into account.
compile_et.1: Change man page to reflect the fact that compile_et is
now a awk/sed script, not a yacc script.
compile_et.sh.in: Look in $(datadir)/et for et_c.awk and et_h.awk; if
not found, look in the build directory. Add error checking for
non-existent input file.
ChangeLog, Makefile.in, mk_cmds.sh.in:
Makefile.in: Install the ct_c.awk and ct_c.sed files in $(datadir)/ss
(i.e., /usr/share/ss) directory. Change to use new installation
directory variables convention. Fix uninstall rules to take
$(DESTDIR) into account.
mk_cmds.sh.in: Look in $(datadir)/ss for ct_c.awk and ct_c.sed; if not
found, look in the build directory. Add error checking for
non-existent input file.
ChangeLog, Makefile.in:
Makefile.in: Change to use new installation directory variables
convention. Fix uninstall rules to take $(DESTDIR) into account.
1998-04-01 06:18:45 +04:00
|
|
|
DIR="${DIR-@datadir@/ss}"
|
2001-09-17 07:29:17 +04:00
|
|
|
SS_DIR="@SS_DIR@"
|
1997-04-26 17:21:57 +04:00
|
|
|
AWK=@AWK@
|
|
|
|
SED=@SED@
|
|
|
|
|
2006-11-12 18:43:31 +03:00
|
|
|
for as_var in \
|
|
|
|
LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
|
|
|
|
LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
|
|
|
|
LC_TELEPHONE LC_TIME
|
|
|
|
do
|
|
|
|
if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
|
|
|
|
eval $as_var=C; export $as_var
|
|
|
|
else
|
|
|
|
$as_unset $as_var
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
ChangeLog, Makefile.in:
Remove libext2fs.info*, not just libext2fs.info*.gz. Add an
uninstall-doc-libs target.
ChangeLog, Makefile.in, compile_et.1, compile_et.sh.in:
Makefile.in: Fix bug where my_dir was set incorrectly. Install the
et_c.awk and et_h.awk files in $(datadir)/et (i.e., /usr/share/et)
directory. Change to use new installation directory variables
convention. Fix uninstall rules to take $(DESTDIR) into account.
compile_et.1: Change man page to reflect the fact that compile_et is
now a awk/sed script, not a yacc script.
compile_et.sh.in: Look in $(datadir)/et for et_c.awk and et_h.awk; if
not found, look in the build directory. Add error checking for
non-existent input file.
ChangeLog, Makefile.in, mk_cmds.sh.in:
Makefile.in: Install the ct_c.awk and ct_c.sed files in $(datadir)/ss
(i.e., /usr/share/ss) directory. Change to use new installation
directory variables convention. Fix uninstall rules to take
$(DESTDIR) into account.
mk_cmds.sh.in: Look in $(datadir)/ss for ct_c.awk and ct_c.sed; if not
found, look in the build directory. Add error checking for
non-existent input file.
ChangeLog, Makefile.in:
Makefile.in: Change to use new installation directory variables
convention. Fix uninstall rules to take $(DESTDIR) into account.
1998-04-01 06:18:45 +04:00
|
|
|
if test "x$1" = x ; then
|
|
|
|
echo "Usage: mk_cmds file"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2000-07-04 16:34:34 +04:00
|
|
|
if test -n "$_SS_DIR_OVERRIDE" ; then
|
2001-09-17 07:29:17 +04:00
|
|
|
DIR="$_SS_DIR_OVERRIDE";
|
2000-07-04 16:34:34 +04:00
|
|
|
fi
|
|
|
|
|
2004-09-18 03:54:22 +04:00
|
|
|
if test ! -f $DIR/ct_c.sed || test ! -f $DIR/ct_c.awk ; then
|
2001-09-17 07:29:17 +04:00
|
|
|
DIR="$SS_DIR"
|
ChangeLog, Makefile.in:
Remove libext2fs.info*, not just libext2fs.info*.gz. Add an
uninstall-doc-libs target.
ChangeLog, Makefile.in, compile_et.1, compile_et.sh.in:
Makefile.in: Fix bug where my_dir was set incorrectly. Install the
et_c.awk and et_h.awk files in $(datadir)/et (i.e., /usr/share/et)
directory. Change to use new installation directory variables
convention. Fix uninstall rules to take $(DESTDIR) into account.
compile_et.1: Change man page to reflect the fact that compile_et is
now a awk/sed script, not a yacc script.
compile_et.sh.in: Look in $(datadir)/et for et_c.awk and et_h.awk; if
not found, look in the build directory. Add error checking for
non-existent input file.
ChangeLog, Makefile.in, mk_cmds.sh.in:
Makefile.in: Install the ct_c.awk and ct_c.sed files in $(datadir)/ss
(i.e., /usr/share/ss) directory. Change to use new installation
directory variables convention. Fix uninstall rules to take
$(DESTDIR) into account.
mk_cmds.sh.in: Look in $(datadir)/ss for ct_c.awk and ct_c.sed; if not
found, look in the build directory. Add error checking for
non-existent input file.
ChangeLog, Makefile.in:
Makefile.in: Change to use new installation directory variables
convention. Fix uninstall rules to take $(DESTDIR) into account.
1998-04-01 06:18:45 +04:00
|
|
|
# echo "Falling back to $DIR..."
|
2004-09-18 03:54:22 +04:00
|
|
|
if test ! -f "$DIR/ct_c.sed" || test ! -f "$DIR/ct_c.awk" ; then
|
1998-08-01 08:33:31 +04:00
|
|
|
echo "mk_cmds: Couldn't find mk_cmds's template files."
|
ChangeLog, Makefile.in:
Remove libext2fs.info*, not just libext2fs.info*.gz. Add an
uninstall-doc-libs target.
ChangeLog, Makefile.in, compile_et.1, compile_et.sh.in:
Makefile.in: Fix bug where my_dir was set incorrectly. Install the
et_c.awk and et_h.awk files in $(datadir)/et (i.e., /usr/share/et)
directory. Change to use new installation directory variables
convention. Fix uninstall rules to take $(DESTDIR) into account.
compile_et.1: Change man page to reflect the fact that compile_et is
now a awk/sed script, not a yacc script.
compile_et.sh.in: Look in $(datadir)/et for et_c.awk and et_h.awk; if
not found, look in the build directory. Add error checking for
non-existent input file.
ChangeLog, Makefile.in, mk_cmds.sh.in:
Makefile.in: Install the ct_c.awk and ct_c.sed files in $(datadir)/ss
(i.e., /usr/share/ss) directory. Change to use new installation
directory variables convention. Fix uninstall rules to take
$(DESTDIR) into account.
mk_cmds.sh.in: Look in $(datadir)/ss for ct_c.awk and ct_c.sed; if not
found, look in the build directory. Add error checking for
non-existent input file.
ChangeLog, Makefile.in:
Makefile.in: Change to use new installation directory variables
convention. Fix uninstall rules to take $(DESTDIR) into account.
1998-04-01 06:18:45 +04:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2001-09-17 07:29:17 +04:00
|
|
|
FILE="$1"
|
1997-04-26 17:21:57 +04:00
|
|
|
ROOT=`echo $1 | sed -e s/.ct$//`
|
2001-09-17 07:29:17 +04:00
|
|
|
BASE=`basename "$ROOT"`
|
|
|
|
TMP="ct$$.c"
|
1997-04-26 17:21:57 +04:00
|
|
|
|
2001-09-17 07:29:17 +04:00
|
|
|
if test ! -f "$FILE" ; then
|
2007-07-01 04:05:41 +04:00
|
|
|
echo "mk_cmds: $FILE: File not found"
|
ChangeLog, Makefile.in:
Remove libext2fs.info*, not just libext2fs.info*.gz. Add an
uninstall-doc-libs target.
ChangeLog, Makefile.in, compile_et.1, compile_et.sh.in:
Makefile.in: Fix bug where my_dir was set incorrectly. Install the
et_c.awk and et_h.awk files in $(datadir)/et (i.e., /usr/share/et)
directory. Change to use new installation directory variables
convention. Fix uninstall rules to take $(DESTDIR) into account.
compile_et.1: Change man page to reflect the fact that compile_et is
now a awk/sed script, not a yacc script.
compile_et.sh.in: Look in $(datadir)/et for et_c.awk and et_h.awk; if
not found, look in the build directory. Add error checking for
non-existent input file.
ChangeLog, Makefile.in, mk_cmds.sh.in:
Makefile.in: Install the ct_c.awk and ct_c.sed files in $(datadir)/ss
(i.e., /usr/share/ss) directory. Change to use new installation
directory variables convention. Fix uninstall rules to take
$(DESTDIR) into account.
mk_cmds.sh.in: Look in $(datadir)/ss for ct_c.awk and ct_c.sed; if not
found, look in the build directory. Add error checking for
non-existent input file.
ChangeLog, Makefile.in:
Makefile.in: Change to use new installation directory variables
convention. Fix uninstall rules to take $(DESTDIR) into account.
1998-04-01 06:18:45 +04:00
|
|
|
exit 1;
|
|
|
|
fi
|
|
|
|
|
2001-09-17 07:29:17 +04:00
|
|
|
${SED} -f "${DIR}/ct_c.sed" "${FILE}" \
|
|
|
|
| ${AWK} -f "${DIR}/ct_c.awk" "rootname=${ROOT}" "outfile=${TMP}" -
|
1997-04-26 17:21:57 +04:00
|
|
|
|
2001-09-17 07:29:17 +04:00
|
|
|
if grep "^#__ERROR_IN_FILE" "${TMP}" > /dev/null; then
|
|
|
|
rm "${TMP}"
|
1997-04-26 17:21:57 +04:00
|
|
|
exit 1
|
|
|
|
else
|
2001-09-17 07:29:17 +04:00
|
|
|
rm -f "${BASE}.c"
|
2006-08-05 22:41:00 +04:00
|
|
|
mv -f "${TMP}" "${BASE}.c"
|
2015-01-23 20:05:17 +03:00
|
|
|
chmod a-w "${BASE}.c"
|
1997-04-26 17:21:57 +04:00
|
|
|
exit 0
|
|
|
|
fi
|