[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Fwd: Possible bug in build-system

From: Stefan Sperling <stsp_at_elego.de>
Date: Wed, 4 Feb 2009 17:44:55 +0000

On Wed, Feb 04, 2009 at 05:31:44PM +0000, Stefan Sperling wrote:
> On Wed, Feb 04, 2009 at 12:16:14AM +0000, Stefan Sperling wrote:
> > 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.
>
> Updated patch, contains improvements suggested by Martin Furter
> and Arfrever:

That patch was broken, sorry.

Here's one that does not break the build:

Index: build/transform_sql.sh
===================================================================
--- build/transform_sql.sh (revision 0)
+++ build/transform_sql.sh (revision 0)
@@ -0,0 +1,33 @@
+#!/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 -F -q '/*'; then
+ comment=true
+ fi
+
+ if [ "x$comment" = "xtrue" ] && echo "$line" | grep -F -q '*/'; then
+ comment=false
+ continue
+ fi
+
+ if [ "x$comment" = "xtrue" ]; then
+ continue
+ fi
+
+ line="`echo -e "$line" | sed -e 's/"/\\"/g'`"
+ if [ -n "$line" ]; then
+ echo " \"$line\" \\"
+ fi
+done
+
+echo ' ""'

Property changes on: build/transform_sql.sh
___________________________________________________________________
Added: svn:executable
   + *

Index: autogen.sh
===================================================================
--- autogen.sh (revision 35671)
+++ 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 18:46:37 CET

This is an archived mail posted to the Subversion Dev mailing list.