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

Re: svn commit: r35748 - in trunk: . build/generator subversion/libsvn_fs_fs

From: Hyrum K. Wright <hyrum_wright_at_mail.utexas.edu>
Date: Sun, 08 Feb 2009 21:26:45 -0600

Arfrever Frehtes Taifersar Arahesis wrote:
> 2009-02-09 03:38:18 Hyrum K. Wright napisaƂ(a):
>> Arfrever Frehtes Taifersar Arahesis wrote:
>>> Author: arfrever
>>> Date: Sun Feb 8 18:36:08 2009
>>> New Revision: 35748
>>>
>>> Log:
>>> Use '.sql_h' filename extension for headers generated from '.sql' files.
>> Yes, but Why?
>
> This filename extension (or .sql.h) allows to easier distinguish headers generated from .sql files.

Does the text "This file is automatically generated from foo.sql" not accomplish
the same goal? Why not encode this redundancy in the source file, or even the
source file name (e.g., rep-cache-db.sql) instead of in *two* different
locations in the build system? It seems a bit redundant and cryptic.

Btw, I had this conversation with somebody in IRC (and maybe should have
recorded it here) when the change was made from .sql.h to .h. I originally felt
that we should munge the output filename somehow, but further consideration has
led me to be against such.

>>> * Makefile.in
>>> (fast-clean, .SUFFIXES): Update.
>>> (.sql.h): Rename to ...
>>> (.sql.sql_h): ... this.
>>>
>>> * build.conf
>>> (private-built-includes): Update.
>>>
>>> * build/generator/gen_win.py
>>> (WinGeneratorBase._create_sqlite_headers): Update.
>>>
>>> * subversion/libsvn_fs_fs/rep-cache.c: Include "rep-cache-db.sql_h" instead of
>>> "rep-cache-db.h".
>>>
>>> Modified:
>>> trunk/Makefile.in
>>> trunk/build.conf
>>> trunk/build/generator/gen_win.py
>>> trunk/subversion/libsvn_fs_fs/rep-cache.c
>>>
>>> Modified: trunk/Makefile.in
>>> URL: http://svn.collab.net/viewvc/svn/trunk/Makefile.in?pathrev=35748&r1=35747&r2=35748
>>> ==============================================================================
>>> --- trunk/Makefile.in Sun Feb 8 16:37:38 2009 (r35747)
>>> +++ trunk/Makefile.in Sun Feb 8 18:36:08 2009 (r35748)
>>> @@ -327,10 +327,10 @@ locale-gnu-po-update:
>>> fast-clean: doc-clean
>>> @list='$(BUILD_DIRS)'; for i in $$list; do \
>>> echo "Cleaning $$i ..." ; \
>>> - (cd $$i && rm -f *.o *.lo *.la *.la-a *.spo *.mo && \
>>> + (cd $$i && rm -f *.sql_h *.o *.lo *.la *.la-a *.spo *.mo && \
>>> rm -rf .libs) ; \
>>> done
>>> - rm -f $(CLEAN_FILES) $(abs_srcdir)/subversion/libsvn_fs_fs/rep-cache-db.h
>>> + rm -f $(CLEAN_FILES)
>>> find $(abs_srcdir) -name "*.pyc" -exec rm {} ';'
>>>
>>> # clean all but bulky test output, returning to before './configure' was run.
>>> @@ -593,10 +593,10 @@ schema-clean:
>>> # Implicit rules for creating outputs from input files
>>> #
>>> .SUFFIXES:
>>> -.SUFFIXES: .c .cpp .lo .o .la-a .la \
>>> - .po .spo .mo .rnc .rng .dtd .xsd .sql .h
>>> +.SUFFIXES: .sql .sql_h .c .cpp .lo .o .la-a .la \
>>> + .po .spo .mo .rnc .rng .dtd .xsd
>>>
>>> -.sql.h:
>>> +.sql.sql_h:
>>> $(top_srcdir)/build/transform_sql.sh $< < $< > $(top_srcdir)/$@
>>>
>>> .c.o:
>>>
>>> Modified: trunk/build.conf
>>> URL: http://svn.collab.net/viewvc/svn/trunk/build.conf?pathrev=35748&r1=35747&r2=35748
>>> ==============================================================================
>>> --- trunk/build.conf Sun Feb 8 16:37:38 2009 (r35747)
>>> +++ trunk/build.conf Sun Feb 8 18:36:08 2009 (r35748)
>>> @@ -3,7 +3,7 @@
>>> #
>>> ######################################################################
>>> #
>>> -# Copyright (c) 2000-2008 CollabNet. All rights reserved.
>>> +# Copyright (c) 2000-2009 CollabNet. All rights reserved.
>>> #
>>> # This software is licensed as described in the file COPYING, which
>>> # you should have received as part of this distribution. The terms
>>> @@ -33,7 +33,7 @@ private-includes =
>>> subversion/libsvn_delta/compose_delta.c
>>> private-built-includes =
>>> subversion/svn_private_config.h
>>> - subversion/libsvn_fs_fs/rep-cache-db.h
>>> + subversion/libsvn_fs_fs/rep-cache-db.sql_h
>>> subversion/bindings/swig/proxy/swig_python_external_runtime.swg
>>> subversion/bindings/swig/proxy/swig_perl_external_runtime.swg
>>> subversion/bindings/swig/proxy/swig_ruby_external_runtime.swg
>>>
>>> Modified: trunk/build/generator/gen_win.py
>>> URL: http://svn.collab.net/viewvc/svn/trunk/build/generator/gen_win.py?pathrev=35748&r1=35747&r2=35748
>>> ==============================================================================
>>> --- trunk/build/generator/gen_win.py Sun Feb 8 16:37:38 2009 (r35747)
>>> +++ trunk/build/generator/gen_win.py Sun Feb 8 18:36:08 2009 (r35748)
>>> @@ -1387,7 +1387,7 @@ class WinGeneratorBase(GeneratorBase):
>>> os.path.join('subversion', 'libsvn_fs_fs', 'rep-cache-db'),
>>> ]
>>> for sql in sql_sources:
>>> - transform_sql.main(sql + '.sql', sql + '.h')
>>> + transform_sql.main(sql + '.sql', sql + '.sql_h')
>>>
>>> class ProjectItem:
>>> "A generic item class for holding sources info, config info, etc for a project"
>>>
>>> Modified: trunk/subversion/libsvn_fs_fs/rep-cache.c
>>> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_fs_fs/rep-cache.c?pathrev=35748&r1=35747&r2=35748
>>> ==============================================================================
>>> --- trunk/subversion/libsvn_fs_fs/rep-cache.c Sun Feb 8 16:37:38 2009 (r35747)
>>> +++ trunk/subversion/libsvn_fs_fs/rep-cache.c Sun Feb 8 18:36:08 2009 (r35748)
>>> @@ -25,7 +25,7 @@
>>>
>>> #include "private/svn_sqlite.h"
>>>
>>> -#include "rep-cache-db.h"
>>> +#include "rep-cache-db.sql_h"
>>>
>>> /* A few magic values */
>>> #define REP_CACHE_SCHEMA_FORMAT 1
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1127194
Received on 2009-02-09 04:27:11 CET

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