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

Re: svn commit: r35704 - trunk/build

From: Greg Stein <gstein_at_gmail.com>
Date: Fri, 6 Feb 2009 18:25:16 -0800

Also note that it is reasonable to limit the kinds of input to this
script. We have very strong style guidelines for function declarations
in our header files, which makes extracting prototypes real easy. You
could apply the same kinds of rules to .sql files.

Cheers,
-g

On Thu, Feb 5, 2009 at 13:28, Hyrum K. Wright <hyrum_at_hyrumwright.org> wrote:
> Author: hwright
> Date: Thu Feb 5 13:28:29 2009
> New Revision: 35704
>
> Log:
> Fix transform_sql.sh so that comments are allowed on the same line as
> column definitions (see lock.lock_date in wc-metadata.sql for an example).
> Also, trim empty lines from the output file.
>
> * build/transform_sql.sh:
> Strip C-style comments and empty lines from the output file. Ensure that
> each final line ends with a space.
>
> Modified:
> trunk/build/transform_sql.sh
>
> Modified: trunk/build/transform_sql.sh
> URL: http://svn.collab.net/viewvc/svn/trunk/build/transform_sql.sh?pathrev=35704&r1=35703&r2=35704
> ==============================================================================
> --- trunk/build/transform_sql.sh Thu Feb 5 13:22:18 2009 (r35703)
> +++ trunk/build/transform_sql.sh Thu Feb 5 13:28:29 2009 (r35704)
> @@ -4,8 +4,7 @@ varname=`basename $1 | tr "[:lower:]" "[
>
> 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 " * Do not edit it directly, but edit the source file and rerun 'make'"
> echo " */"
> echo
> echo "#define $varname \\"
> @@ -15,6 +14,12 @@ comment=false
> IFS="
> "
> while read line; do
> + line=`echo "$line" | sed -e 's/\/\*.*\*\///g' | sed -e 's/[ ]*$//g'`
> +
> + if [ -z "$line" ]; then
> + continue
> + fi
> +
> if [ "$comment" = "false" ] && echo "$line" | fgrep '/*' >/dev/null; then
> comment=true
> fi
> @@ -30,7 +35,7 @@ while read line; do
>
> line="`echo "$line" | sed -e 's/"/\\"/g'`"
> if [ -n "$line" ]; then
> - echo " \"$line\"\\"
> + echo " \"$line \"\\"
> fi
> done
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=495&dsMessageId=1109167
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1116184
Received on 2009-02-07 03:26:28 CET

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.