[svnbook commit] r1785 - in trunk/src/tools: . bin
maxb
svnbook-dev at red-bean.com
Tue Nov 1 09:15:22 CST 2005
Author: maxb
Date: Tue Nov 1 09:15:20 2005
New Revision: 1785
Modified:
trunk/src/tools/Makefile.base-rules
trunk/src/tools/bin/run-fop.sh
Log:
Teach run-fop.sh to find the desperation fop based on its own location, not
requiring an argument to tell it where it is.
* tools/bin/run-fop.sh: Locate the DESPERATION_FOP_DIR relative to run-fop.sh's
own location, and update not to take an argument of its own.
* tools/Makefile.base-rules: Don't pass an initial directory argument to
run-fop.sh.
Modified: trunk/src/tools/Makefile.base-rules
==============================================================================
--- trunk/src/tools/Makefile.base-rules (original)
+++ trunk/src/tools/Makefile.base-rules Tue Nov 1 09:15:20 2005
@@ -47,13 +47,11 @@
pdf: $(PDF_TARGET)
$(PDF_TARGET): $(FO_TARGET) $(IMAGES)
- $(TOOLS_DIR)/bin/run-fop.sh . -fo $(FO_TARGET) \
- -pdf $(PDF_TARGET)
+ $(TOOLS_DIR)/bin/run-fop.sh -fo $(FO_TARGET) -pdf $(PDF_TARGET)
ps: $(PS_TARGET)
$(PS_TARGET): $(FO_TARGET) $(IMAGES)
- $(TOOLS_DIR)/bin/run-fop.sh . -fo $(FO_TARGET) \
- -ps $(PS_TARGET)
+ $(TOOLS_DIR)/bin/run-fop.sh -fo $(FO_TARGET) -ps $(PS_TARGET)
# Install targets
$(INSTALL_SUBDIR):
Modified: trunk/src/tools/bin/run-fop.sh
==============================================================================
--- trunk/src/tools/bin/run-fop.sh (original)
+++ trunk/src/tools/bin/run-fop.sh Tue Nov 1 09:15:20 2005
@@ -2,20 +2,10 @@
# run-fop: Attempt to run fop (or fop.sh), fail articulately otherwise.
#
-# Usage: run-fop.sh BOOK_TOP [FOP_ARGS...]
+# Usage: run-fop.sh [FOP_ARGS...]
#
# This script is meant to be invoked by book translation Makefiles.
-# The first argument is the top of the book translation directory, and
-# the remaining arguments are passed along to `fop'.
-
-BOOK_TOP=${1}
-
-if [ "${BOOK_TOP}X" = X ]; then
- echo "usage: run-fop.sh BOOK_TOP [FOP_ARGS...]"
- exit 1
-fi
-
-shift
+# Arguments are passed along to `fop'.
# If the user has a .foprc, source it.
if [ -f ${HOME}/.foprc ]; then
@@ -23,7 +13,7 @@
fi
# The fop of last resort.
-DESPERATION_FOP_DIR=${BOOK_TOP}/../tools/fop
+DESPERATION_FOP_DIR="`dirname \"$0\"`/../fop"
DESPERATION_FOP_PGM=${DESPERATION_FOP_DIR}/fop.sh
if [ "${FOP_HOME}X" = X ]; then
More information about the svnbook-dev
mailing list