You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2010/01/26 18:49:03 UTC
svn commit: r903340 - /subversion/trunk/tools/dist/dist.sh
Author: hwright
Date: Tue Jan 26 17:49:03 2010
New Revision: 903340
URL: http://svn.apache.org/viewvc?rev=903340&view=rev
Log:
When creating the various distribution tarballs, pre-transform the sql-derived
header files before rolling the tarballs. This removes a python dependency for
those using the distribution tarballs, and also eliminates a platform-
independent part of the build process.
(This was discussed in this thread on users@:
http://svn.haxx.se/users/archive-2010-01/0455.shtml
While the ultimate solution wasn't related to this change, it did point out
this fact.)
* tools/dist/dist.sh:
Add a search for python, and use that python to pre-transform the sql-derived
header files.
Modified:
subversion/trunk/tools/dist/dist.sh
Modified: subversion/trunk/tools/dist/dist.sh
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/dist/dist.sh?rev=903340&r1=903339&r2=903340&view=diff
==============================================================================
--- subversion/trunk/tools/dist/dist.sh (original)
+++ subversion/trunk/tools/dist/dist.sh Tue Jan 26 17:49:03 2010
@@ -184,6 +184,16 @@
exit 1
fi
+# Check for a recent enough Python
+PYTHON="`./build/find_python.sh`"
+if test -z "$PYTHON"; then
+ echo "Python 2.4 or later is required to run dist.sh"
+ echo "If you have a suitable Python installed, but not on the"
+ echo "PATH, set the environment variable PYTHON to the full path"
+ echo "to the Python executable, and re-run dist.sh"
+ exit 1
+fi
+
# Default to 'wget', but allow 'curl' to be used if available.
HTTP_FETCH=wget
HTTP_FETCH_OUTPUT="-O"
@@ -337,6 +347,12 @@
(cd "$DISTPATH" && ./autogen.sh --release) || exit 1
fi
+# Pre-translate the various sql-derived header files
+echo "Generating SQL-derived headers..."
+for f in `find "$DISTPATH/subversion" -name '*.sql'`; do
+ $PYTHON $DISTPATH/build/transform_sql.py $f `echo $f | sed 's/\.[^\.]*$//'`.h
+done
+
echo "Removing any autom4te.cache directories that might exist..."
find "$DISTPATH" -depth -type d -name 'autom4te*.cache' -exec rm -rf {} \;