On Wed, Feb 04, 2009 at 12:02:54AM +0000, Stefan Sperling wrote:
> Would attached script do?
Here's the same thing as a patch for you to try, compiles fine here.
Stefan
Index: build/transform_sql.sh
===================================================================
--- build/transform_sql.sh (revision 0)
+++ build/transform_sql.sh (revision 0)
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+echo "/* This file is automatically generated from"
+echo " * $1"
+echo " * Do not edit it directly, but edit the source file "
+echo " * and rerun autogen.sh"
+echo " */"
+echo
+echo "#define REP_CACHE_DB_SQL \\"
+
+comment=false
+
+while read line; do
+ if [ "x$comment" = "xfalse" ] && echo "$line" | grep -q '/\*'; then
+ comment=true
+ fi
+
+ if [ "x$comment" = "xtrue" ] && echo "$line" | grep -q '\*/'; then
+ comment=false
+ continue
+ fi
+
+ if [ "x$comment" = "xtrue" ]; then
+ continue
+ fi
+
+ line="`echo -e "$line" | tr -d '\n' | sed -e 's/"/\\"/g'`"
+ if [ -n "$line" ]; then
+ echo -n ' "'
+ echo -n "$line"
+ echo '"\\'
+ fi
+done
+
+echo ' ""'
Property changes on: build/transform_sql.sh
___________________________________________________________________
Added: svn:executable
+ *
Index: autogen.sh
===================================================================
--- autogen.sh (revision 35662)
+++ autogen.sh (working copy)
@@ -114,7 +114,7 @@
# Transform sql files into header files
for file in subversion/libsvn_fs_fs/rep-cache-db.sql; do
if test $file -nt $file.h; then
- $PYTHON build/transform_sql.py $file
+ ./build/transform_sql.sh $file < $file > $file.h
fi
done
Received on 2009-02-04 01:17:00 CET