From 7fdd6e23f126679b1f7445a0cb8a31f9565a5863 Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Fri, 2 Jan 2004 21:58:08 +0000 Subject: [PATCH] No need to assume that the fdfix files are in the same directory as the .fd files. Rather assume that all fdfix files are in the same directory as each other. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8295 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/xforms/ChangeLog | 6 ++++++ src/frontends/xforms/forms/fdfix.sh | 13 +++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index b43fb2f2b4..5484e68225 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,9 @@ +2004-01-02 Angus Leeming + + * forms/fdfix.sh: no need to assume that the fdfix files are in + the same directory as the .fd files. Rather assume that all fdfix + files are in the same directory as each other. + 2004-01-02 Angus Leeming * combox.h: correct a couple of spelling mistakes in the comments. diff --git a/src/frontends/xforms/forms/fdfix.sh b/src/frontends/xforms/forms/fdfix.sh index 063f8069c2..4e56a4d290 100644 --- a/src/frontends/xforms/forms/fdfix.sh +++ b/src/frontends/xforms/forms/fdfix.sh @@ -47,6 +47,10 @@ fi DIRNAME=`dirname $1` BASENAME=`basename $1 .fd` +FDFIXH_SED=`dirname $0`/fdfixh.sed +FDFIXC_SED=`dirname $0`/fdfixc.sed +TMP_STR_SED=`dirname $0`/tmp_str.sed + if [ $1 = ${BASENAME} ]; then echo "Input file is not a .fd file. Cannot continue" exit 1 @@ -89,7 +93,7 @@ fi # First ensure that the sed script knows where to find ${EXTERN_FUNCS} FDFIXH=fdfixh.$$ -sed "s/EXTERN_FUNCS/${EXTERN_FUNCS}/" ${DIRNAME}/fdfixh.sed > ${FDFIXH} +sed "s/EXTERN_FUNCS/${EXTERN_FUNCS}/" ${FDFIXH_SED} > ${FDFIXH} INTRO_MESSAGE ${HOUT} @@ -132,8 +136,6 @@ FINAL_COUT=${BASENAME}.C # keeping the sed clean also. # Pass 1. The bulk of the clean-up -FDFIXC=${DIRNAME}/fdfixc.sed - TMP=tmp.$$ INTRO_MESSAGE ${TMP} @@ -147,12 +149,11 @@ grep combox ${CIN} > /dev/null && echo "#include \"combox.h\"" >> ${TMP} echo "using std::string;" >> ${TMP} -sed -f ${FDFIXC} < ${CIN} >> ${TMP} +sed -f ${FDFIXC_SED} < ${CIN} >> ${TMP} # Pass 2. Ensure that any tmp_str variables inserted by fdfixc.sed # are declared at the top of the appropriate function. -FDFIXC=${DIRNAME}/tmp_str.sed -sed -f ${FDFIXC} < ${TMP} > ${COUT} +sed -f ${TMP_STR_SED} < ${TMP} > ${COUT} rm -f ${TMP} if [ -f "${CPATCH}" ] ; then -- 2.39.2