mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 13:31:49 +00:00
Fix bug 944:
src/frontends/xforms/forms/fdfix.sh uses fixed file names for temporary files, thus make dist on SMP fails. Fix is trivial -- all temporary files should have $$ (PID) appended to them. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6483 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
1ea1f923a8
commit
7fb50b8c66
@ -1,3 +1,9 @@
|
||||
2003-03-13 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* forms/fdfix.sh:
|
||||
* forms/fdfixh.sed: fix #944 by making the temporary filenames unique
|
||||
and so enable reentrant builds on SMP machines.
|
||||
|
||||
2003-03-12 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* Dialogs.C:
|
||||
|
@ -15,13 +15,17 @@
|
||||
|
||||
INTRO_MESSAGE ()
|
||||
{
|
||||
test $# -eq 1 || {
|
||||
echo "Expected a file name!"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Note that we can't create a variable containing this and then
|
||||
# echo it across because some machines require -e to recognize \n et al.
|
||||
# Other machines, of course output -e, it not being an option they
|
||||
# recognise ;-)
|
||||
|
||||
# Set ${OUTPUT_FILE} to ${HOUT} or ${COUT} as appropriate
|
||||
cat - > ${OUTPUT_FILE} <<EOF
|
||||
cat - > $1 <<EOF
|
||||
// File generated by fdesign from ${FDFILE}
|
||||
// and modified by fdfix.sh for use by LyX.
|
||||
|
||||
@ -69,23 +73,30 @@ HOUT=${BASENAME}.hpp
|
||||
# put the sorted, unique list in file ${EXTERN_FUNCS}
|
||||
# The contents of this file are used by ${FDFIXH} to replace the mess
|
||||
# output by fdesign
|
||||
EXTERN_FUNCS=extern.tmp
|
||||
# Note that we use unique file names for temp files to enable re-entrant
|
||||
# builds with SMP machines
|
||||
EXTERN_FUNCS=extern.$$
|
||||
sed -n 's/extern void \(.*\)/void \1/p' ${HIN} > ${EXTERN_FUNCS}
|
||||
|
||||
if [ -s ${EXTERN_FUNCS} ]; then
|
||||
sort -u ${EXTERN_FUNCS} > tmp
|
||||
TMP=tmp.$$
|
||||
sort -u ${EXTERN_FUNCS} > ${TMP}
|
||||
echo "extern \"C\" {" > ${EXTERN_FUNCS}
|
||||
cat tmp >> ${EXTERN_FUNCS}
|
||||
cat ${TMP} >> ${EXTERN_FUNCS}
|
||||
echo "}" >> ${EXTERN_FUNCS}
|
||||
rm -f tmp
|
||||
rm -f ${TMP}
|
||||
fi
|
||||
|
||||
FDFIXH=${DIRNAME}/fdfixh.sed
|
||||
# First ensure that the sed script knows where to find ${EXTERN_FUNCS}
|
||||
FDFIXH=fdfixh.$$
|
||||
sed "s/EXTERN_FUNCS/${EXTERN_FUNCS}/" ${DIRNAME}/fdfixh.sed > ${FDFIXH}
|
||||
|
||||
OUTPUT_FILE=${HOUT}; INTRO_MESSAGE
|
||||
INTRO_MESSAGE ${HOUT}
|
||||
|
||||
sed -f ${FDFIXH} < ${HIN} >> ${HOUT}
|
||||
rm -f ${EXTERN_FUNCS}
|
||||
|
||||
# Don't forget to clean up the temporary files.
|
||||
rm -f ${EXTERN_FUNCS} ${FDFIXH}
|
||||
|
||||
# Patch the .h file if a patch exists
|
||||
if [ -f "${HPATCH}" ] ; then
|
||||
@ -122,8 +133,9 @@ FINAL_COUT=${BASENAME}.C
|
||||
|
||||
# Pass 1. The bulk of the clean-up
|
||||
FDFIXC=${DIRNAME}/fdfixc.sed
|
||||
TMP=tmp
|
||||
OUTPUT_FILE=${TMP}; INTRO_MESSAGE
|
||||
|
||||
TMP=tmp.$$
|
||||
INTRO_MESSAGE ${TMP}
|
||||
|
||||
echo "#include <config.h>" >> ${TMP}
|
||||
echo "#include \"forms_gettext.h\"" >> ${TMP}
|
||||
|
@ -29,14 +29,15 @@ s/[ ]*$//
|
||||
|
||||
|
||||
# Immediately after line "#define FD_xxx_h_" that starts off the header file,
|
||||
# #include "fdesign_base.h" and append the contents of file "extern.tmp".
|
||||
# #include "fdesign_base.h" and append the contents of file EXTERN_FUNCS.
|
||||
# This latter is a sorted, unique list of any function declarations.
|
||||
# The actual name of the file is inserted by the parent shell script.
|
||||
/#define FD/{
|
||||
a\
|
||||
\
|
||||
#include "fdesign_base.h"\
|
||||
|
||||
r extern.tmp
|
||||
r EXTERN_FUNCS
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user