]> git.lyx.org Git - features.git/commitdiff
No need to assume that the fdfix files are in the same directory as
authorAngus Leeming <leeming@lyx.org>
Fri, 2 Jan 2004 21:58:08 +0000 (21:58 +0000)
committerAngus Leeming <leeming@lyx.org>
Fri, 2 Jan 2004 21:58:08 +0000 (21:58 +0000)
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
src/frontends/xforms/forms/fdfix.sh

index b43fb2f2b4e4ecca01d9684c30c1a4c711aca6c2..5484e682252e2ab2d35d2f2a584a0f05ea4bbbca 100644 (file)
@@ -1,3 +1,9 @@
+2004-01-02  Angus Leeming  <leeming@lyx.org>
+
+       * 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  <leeming@lyx.org>
 
        * combox.h: correct a couple of spelling mistakes in the comments.
index 063f8069c2e6f5966b9475fbda6f68cc92098d8d..4e56a4d2903fb798580b64196d7340b857779036 100644 (file)
@@ -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