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

Proposed Build System Patch.

From: Kevin Pilch-Bisson <kevin_at_pilch-bisson.net>
Date: 2001-09-03 20:11:55 CEST

Since I got such an overwhelming reponse the last time I posted this patch
for consideration, I thought I would repost it.

It fixes 'make install' and 'make check' on platforms that don't have
berkeley db, and cleans up the "build db in tree" part of the build.

Any problems with checking it in sometime tomorrow?

Index: ./Makefile.in
===================================================================
--- ./SVN/text-base/Makefile.in Fri Aug 31 09:50:56 2001
+++ ./Makefile.in Fri Aug 31 13:54:51 2001
@@ -21,8 +21,11 @@
 prefix = @prefix@
 exec_prefix = @exec_prefix@
 libdir = @libdir@
+fs_libdir= @libdir@
 sbindir = @sbindir@
+fs_sbindir=@sbindir@
 bindir = @bindir@
+fs_bindir=@bindir@
 includedir = @includedir@
 
 ### should search for these...
@@ -50,6 +53,11 @@
 APACHE_TARGET = @APACHE_TARGET@
 INSTALL_APACHE_RULE = @INSTALL_APACHE_RULE@
 
+INSTALL_RULES = @INSTALL_RULES@
+
+TEST_DEPS = $(NON_FS_TEST_DEPS) @FS_TEST_DEPS@
+TEST_PROGRAMS = $(NON_FS_TEST_PROGRAMS) @FS_TEST_PROGRAMS@
+
 MKDIR = @MKDIR@
 
 CFLAGS = @CFLAGS@
@@ -65,8 +73,11 @@
 
 INSTALL = @INSTALL@
 INSTALL_LIB = $(LIBTOOL) --mode=install $(INSTALL)
+INSTALL_FS_LIB = $(INSTALL_LIB)
 INSTALL_BIN = $(LIBTOOL) --mode=install $(INSTALL)
+INSTALL_FS_BIN = $(INSTALL_BIN)
 INSTALL_SBIN = $(LIBTOOL) --mode=install $(INSTALL)
+INSTALL_FS_SBIN = $(INSTALL_SBIN)
 INSTALL_INCLUDE = $(INSTALL) -m 644
 INSTALL_MOD_SHARED = @APXS@ -i -a
 INSTALL_MOD_STATIC = $(INSTALL) -m 644
@@ -81,7 +92,7 @@
 
 @INCLUDE_OUTPUTS@
 
-local-all: libs programs @FS_RULES@ @BUILD_APACHE_RULE@
+local-all: @BUILD_RULES@ @BUILD_APACHE_RULE@
 
 local-clean: doc-clean
         @list='$(BUILD_DIRS)'; for i in $$list; do \
@@ -100,7 +111,7 @@
                 ac-helpers/libtool.m4 ac-helpers/ltconfig \
                 ac-helpers/ltmain.sh
 
-local-install: install-lib install-include install-bin $(INSTALL_APACHE_RULE)
+local-install: $(INSTALL_RULES) $(INSTALL_APACHE_RULE)
 
 ### the chmod really sucks, but some repository files don't have it like
 ### they should ...
@@ -149,14 +160,19 @@
             echo "------ completed $$target in $$i"; \
         done;
 
-### temporary hack. Neon does not have an "extraclean"
+### temporary hack. Neon does not have an "extraclean" and neither does db
+### If we don't have extraclean -- do the next best thing.
 external-extraclean:
         @list='$(EXTERNAL_PROJECT_DIRS)'; \
         for i in $$list; do \
- if test "$$i" != "neon"; then \
- echo "------ making extraclean in $$i"; \
- (cd $$i && $(MAKE) extraclean) || exit 1; \
- echo "------ completed extraclean in $$i"; \
+ if test "$$i" != "neon" && test "$$i" != "db/dist"; then \
+ echo "------ making extraclean in $$i"; \
+ (cd $$i && $(MAKE) extraclean) || exit 1; \
+ echo "------ completed extraclean in $$i"; \
+ else \
+ echo "------ making distclean(no extraclean) in $$i"; \
+ (cd $$i && $(MAKE) distclean) || exit 1; \
+ echo "------ completed distclean(no extraclean) in $$i"; \
             fi; \
         done;
 
Index: ./build.conf
===================================================================
--- ./SVN/text-base/build.conf Fri Aug 31 09:50:56 2001
+++ ./build.conf Fri Aug 31 10:03:00 2001
@@ -25,6 +25,9 @@
         subversion/tests/clients/cmdline/xmltests/*.sh
 # bourne: test target condensation in libsvn_subr
         subversion/tests/libsvn_subr/target-test.sh
+
+[fs-test-scripts]
+paths =
 # C: test both external and internal APIs of libsvn_fs
         subversion/tests/libsvn_fs/run-fs-tests.sh
 # C: test svn_repos_update() in libsvn_repos
@@ -41,7 +44,6 @@
         subversion/tests/clients/cmdline/svnadmin_tests.py
 
 
-
 # ----------------------------------------------------------------------------
 #
 # BUILD TARGETS
@@ -51,7 +53,6 @@
 [svn]
 type = exe
 path = subversion/clients/cmdline
-group = programs
 libs = libsvn_client libsvn_wc libsvn_ra libsvn_delta libsvn_subr
         $(SVN_APR_LIBS) libexpat
 
@@ -59,40 +60,37 @@
 [svnadmin]
 type = exe
 path = subversion/svnadmin
-group = fs-programs
+install = fs-bin
 libs = libsvn_repos libsvn_fs libsvn_delta libsvn_subr $(SVN_APR_LIBS) libexpat
 
 # The subversion repository inspection tool
 [svnlook]
 type = exe
 path = subversion/svnlook
-group = fs-programs
+install = fs-bin
 libs = libsvn_repos libsvn_fs libsvn_delta libsvn_subr $(SVN_APR_LIBS) libexpat
 
 # Library needed by all subversion clients
 [libsvn_client]
 type = lib
 path = subversion/libsvn_client
-group = libs
 
 # Routines for binary diffing and tree-deltas
 [libsvn_delta]
 type = lib
 path = subversion/libsvn_delta
-group = libs
 
 # The repository filesystem library
 [libsvn_fs]
 type = lib
 path = subversion/libsvn_fs
-group = fs-libs
+install = fs-lib
 libs = $(SVN_DB_LIBS)
 
 # General API for accessing repositories
 [libsvn_ra]
 type = lib
 path = subversion/libsvn_ra
-group = libs
 # conditionally link in some more libs
 libs = $(SVN_RA_LIB_LINK)
 # conditionally add more dependencies
@@ -102,7 +100,6 @@
 [libsvn_ra_dav]
 type = lib
 path = subversion/libsvn_ra_dav
-group = libs
 ### hack to deal with libtool's busted intra-library dependencies
 libs = -L$(abs_builddir)/neon/src/.libs -lneon
 
@@ -110,32 +107,29 @@
 [libsvn_ra_local]
 type = lib
 path = subversion/libsvn_ra_local
-group = fs-libs
+install = fs-lib
 libs = libsvn_repos libsvn_fs libsvn_delta libsvn_subr
 
 # Routines built on top of libsvn_fs
 [libsvn_repos]
 type = lib
 path = subversion/libsvn_repos
-group = fs-libs
+install = fs-lib
 
 # Low-level grab bag of utilities
 [libsvn_subr]
 type = lib
 path = subversion/libsvn_subr
-group = libs
 
 # Working copy management lib
 [libsvn_wc]
 type = lib
 path = subversion/libsvn_wc
-group = libs
 
 # Subversion plugin for Apache's mod_dav
 [libmod_dav_svn]
 type = lib
 path = subversion/mod_dav_svn
-group = apache-mods
 libs = libsvn_repos libsvn_fs libsvn_delta libsvn_subr
 # we don't need the .so version stuff for an Apache module, so avoid them
 link-flags = -avoid-version
@@ -147,7 +141,6 @@
 [libexpat]
 type = lib
 path = expat-lite
-group = libs
 # there are some .c files included by others, so *.c isn't appropriate
 sources = hashtable.c xmlparse.c xmlrole.c xmltok.c
 
@@ -162,23 +155,20 @@
 path = subversion/tests
 sources = svn_tests_main.c svn_test_editor.c
 install = test
-group = libs
 
 # shared utils for writing fs tests
 [libsvn_test_fs]
 type = lib
 path = subversion/tests
 sources = fs-helpers.c
-install = test
-group = fs-libs
+install = fs-test
 
 # tests for *public* fs API (svn_fs.h)
 [fs-test]
 type = exe
 path = subversion/tests/libsvn_fs
 sources = fs-test.c
-install = test
-group = fs-programs
+install = fs-test
 libs = libsvn_test libsvn_test_fs libsvn_fs libsvn_delta libsvn_subr
         $(SVN_APR_LIBS) libexpat
 # run-fs-tests.sh will run this for us
@@ -189,8 +179,7 @@
 type = exe
 path = subversion/tests/libsvn_fs
 sources = skel-test.c
-install = test
-group = fs-programs
+install = fs-test
 libs = libsvn_test libsvn_fs libsvn_delta libsvn_subr $(SVN_APR_LIBS) libexpat
 # run-fs-tests.sh will run this for us
 testing = skip
@@ -200,8 +189,7 @@
 type = exe
 path = subversion/tests/libsvn_fs
 sources = key-test.c
-install = test
-group = fs-programs
+install = fs-test
 libs = libsvn_test libsvn_fs libsvn_delta libsvn_subr $(SVN_APR_LIBS) libexpat
 # run-fs-tests.sh will run this for us
 testing = skip
@@ -211,8 +199,7 @@
 type = exe
 path = subversion/tests/libsvn_fs
 sources = strings-reps-test.c
-install = test
-group = fs-programs
+install = fs-test
 libs = libsvn_test libsvn_test_fs libsvn_fs libsvn_delta libsvn_subr
        $(SVN_APR_LIBS) libexpat
 # run-fs-tests.sh will run this for us
@@ -222,7 +209,6 @@
 [md5args]
 type = exe
 path = subversion/tests/libsvn_repos
-group = programs
 sources = md5args.c
 install = test
 libs = libsvn_subr $(SVN_APR_LIBS) libexpat
@@ -234,8 +220,7 @@
 type = exe
 path = subversion/tests/libsvn_repos
 sources = repos-test.c dir-delta-editor.c
-install = test
-group = fs-programs
+install = fs-test
 libs = libsvn_test libsvn_test_fs libsvn_repos libsvn_fs libsvn_delta
         libsvn_subr $(SVN_APR_LIBS) libexpat
 # run-repos-tests.sh will run this for us
@@ -247,7 +232,6 @@
 path = subversion/tests/libsvn_subr
 sources = hashdump-test.c
 install = test
-group = programs
 libs = libsvn_test libsvn_delta libsvn_subr $(SVN_APR_LIBS) libexpat
 
 # test svn_stringbuf_t utilities
@@ -256,7 +240,6 @@
 path = subversion/tests/libsvn_subr
 sources = stringtest.c
 install = test
-group = programs
 libs = libsvn_test libsvn_delta libsvn_subr $(SVN_APR_LIBS) libexpat
 
 # test path library
@@ -265,7 +248,6 @@
 path = subversion/tests/libsvn_subr
 sources = path-test.c
 install = test
-group = programs
 libs = libsvn_test libsvn_delta libsvn_subr $(SVN_APR_LIBS) libexpat
 
 
@@ -276,8 +258,7 @@
 type = exe
 path = subversion/tests/libsvn_ra_local
 sources = ra-local-test.c
-install = test
-group = fs-programs
+install = fs-test
 libs = libsvn_test libsvn_ra libsvn_fs libsvn_delta libsvn_subr
         $(SVN_APR_LIBS) libexpat
 # disabled for now, BROKEN.
@@ -292,7 +273,6 @@
 path = subversion/tests/libsvn_delta
 sources = random-test.c
 install = test
-group = programs
 libs = libsvn_delta libsvn_subr $(SVN_APR_LIBS) libexpat
 
 # test svn_path_condense_targets()
@@ -301,7 +281,6 @@
 path = subversion/tests/libsvn_subr
 sources = target-test.c
 install = test
-group = programs
 libs = libsvn_subr $(SVN_APR_LIBS) libexpat
 # target-test.sh will run this for us
 testing = skip
@@ -312,7 +291,6 @@
 path = subversion/tests/libsvn_delta
 sources = xml-output-test.c
 install = test
-group = programs
 libs = libsvn_delta libsvn_subr $(SVN_APR_LIBS) libexpat
 # this is really redundant with our XML svn-test*.sh tests.
 testing = skip
@@ -323,7 +301,6 @@
 path = subversion/tests/libsvn_wc
 sources = checkout-test.c
 install = test
-group = programs
 libs = libsvn_wc libsvn_delta libsvn_subr $(SVN_APR_LIBS) libexpat
 # this is really redundant with our XML svn-test*.sh tests.
 testing = skip
@@ -334,7 +311,6 @@
 path = subversion/tests/libsvn_wc
 sources = commit-test.c
 install = test
-group = programs
 libs = libsvn_test libsvn_wc libsvn_delta libsvn_subr $(SVN_APR_LIBS) libexpat
 # this is really redundant with our XML svn-test*.sh tests.
 testing = skip
@@ -348,7 +324,6 @@
 path = subversion/tests/libsvn_delta
 sources = deltaparse-test.c
 install = test
-group = programs
 libs = libsvn_test libsvn_delta libsvn_subr $(SVN_APR_LIBS) libexpat
 testing = skip
 
@@ -362,7 +337,6 @@
 path = subversion/tests/libsvn_delta
 sources = svndiff-test.c
 install = test
-group = programs
 libs = libsvn_delta libsvn_subr $(SVN_APR_LIBS) libexpat
 testing = skip
 
@@ -372,7 +346,6 @@
 path = subversion/tests/libsvn_delta
 sources = vdelta-test.c
 install = test
-group = programs
 libs = libsvn_delta libsvn_subr $(SVN_APR_LIBS) libexpat
 testing = skip
 
@@ -385,7 +358,7 @@
 #[svn-design]
 #type = doc
 #path = doc
-#group = docs
+#install = doc
 #sources = svn-design.texi
 #deps = ...
 
Index: ./configure.in
===================================================================
--- ./SVN/text-base/configure.in Fri Aug 31 09:50:55 2001
+++ ./configure.in Sat Sep 1 08:49:39 2001
@@ -151,10 +151,18 @@
 SVN_LIB_BERKELEY_DB($SVN_FS_WANT_DB_MAJOR, $SVN_FS_WANT_DB_MINOR,
                     $SVN_FS_WANT_DB_PATCH)
 
+INSTALL_RULES="install-lib install-bin"
+BUILD_RULES="lib bin test"
 if test "$svn_lib_berkeley_db" = "yes"; then
- FS_RULES="fs-libs fs-programs"
+ BUILD_RULES="lib fs-lib bin fs-bin test fs-test"
+ INSTALL_RULES="install-lib install-fs-lib install-bin install-fs-bin"
+ FS_TEST_DEPS="\$(FS_TEST_DEPS)"
+ FS_TEST_PROGRAMS="\$(FS_TEST_PROGRAMS)"
 fi
-AC_SUBST(FS_RULES)
+AC_SUBST(BUILD_RULES)
+AC_SUBST(INSTALL_RULES)
+AC_SUBST(FS_TEST_DEPS)
+AC_SUBST(FS_TEST_PROGRAMS)
 AC_SUBST(SVN_DB_INCLUDES)
 AC_SUBST(SVN_DB_LIBS)
 
Index: ./gen-make.py
===================================================================
--- ./SVN/text-base/gen-make.py Fri Aug 31 09:50:53 2001
+++ ./gen-make.py Sat Sep 1 08:49:08 2001
@@ -27,10 +27,11 @@
 
   errors = 0
   targets = { }
- groups = { } # group name -> targets
   install = { } # install area name -> targets
   test_progs = [ ]
   test_deps = [ ]
+ fs_test_progs = [ ]
+ fs_test_deps = [ ]
   file_deps = [ ]
   target_dirs = { }
 
@@ -50,12 +51,6 @@
 
     targets[target] = target_ob
 
- group = parser.get(target, 'group')
- if groups.has_key(group):
- groups[group].append(target_ob.output)
- else:
- groups[group] = [ target_ob.output ]
-
     itype = target_ob.install
     if install.has_key(itype):
       install[itype].append(target_ob)
@@ -83,6 +78,11 @@
       if parser.get(target, 'testing') != 'skip':
         test_progs.append(tpath)
 
+ if target_ob.install == 'fs-test' and bldtype == 'exe':
+ fs_test_deps.append(tpath)
+ if parser.get(target, 'testing') != 'skip':
+ fs_test_progs.append(tpath)
+
     pats = parser.get(target, 'sources')
     if not pats:
       pats = _default_sources[bldtype]
@@ -148,8 +148,12 @@
                       % (src[:-2], objext, src))
       ofile.write('\n')
 
- for g_name, g_targets in groups.items():
- ofile.write('%s: %s\n\n' % (g_name, string.join(g_targets)))
+ for g_name, g_targets in install.items():
+ target_names = [ ]
+ for i in g_targets:
+ target_names.append(i.output)
+
+ ofile.write('%s: %s\n\n' % (g_name, string.join(target_names)))
 
   ofile.write('BUILD_DIRS = %s\n' % string.join(target_dirs.keys()))
 
@@ -205,15 +209,15 @@
                                           os.path.basename(file))))
       ofile.write('\n')
 
- elif area != 'test':
+ elif area != 'test' and area != 'fs-test':
       ofile.write('install-%s: %s\n'
                   '\t$(MKDIR) $(%sdir)\n'
- % (area, string.join(files), area))
+ % (area, string.join(files), string.replace(area, '-', '_')))
       for file in files:
         ofile.write('\t$(INSTALL_%s) %s %s\n'
- % (string.upper(area), file,
- os.path.join('$(%sdir)' % area,
- os.path.basename(file))))
+ % (string.replace(string.upper(area), '-', '_'), file,
+ string.replace(os.path.join('$(%sdir)' % area,
+ os.path.basename(file)), '-', '_')))
       ofile.write('\n')
 
   includes, i_errors = _collect_paths(parser.get('includes', 'paths'))
@@ -235,8 +239,15 @@
   scripts, s_errors = _collect_paths(parser.get('test-scripts', 'paths'))
   errors = errors or s_errors
 
- ofile.write('TEST_DEPS = %s\n\n' % string.join(test_deps + scripts))
- ofile.write('TEST_PROGRAMS = %s\n\n' % string.join(test_progs + scripts))
+ fs_scripts, fs_errors = _collect_paths(parser.get('fs-test-scripts', 'paths'))
+ errors = errors or fs_errors
+
+ ofile.write('FS_TEST_DEPS = %s\n\n' % string.join(fs_test_deps + fs_scripts))
+ ofile.write('FS_TEST_PROGRAMS = %s\n\n' %
+ string.join(fs_test_progs + fs_scripts))
+ ofile.write('NON_FS_TEST_DEPS = %s\n\n' % string.join(test_deps + scripts))
+ ofile.write('NON_FS_TEST_PROGRAMS = %s\n\n' %
+ string.join(test_progs + scripts))
 
   if not skip_depends:
     #
@@ -321,6 +332,7 @@
   'includes',
   'static-apache',
   'test-scripts',
+ 'fs-test-scripts',
   ]
 
 def _filter_targets(t):
Index: ac-helpers/svn-apache.m4
===================================================================
--- ac-helpers/SVN/text-base/svn-apache.m4 Fri Aug 31 09:53:18 2001
+++ ac-helpers/svn-apache.m4 Fri Aug 31 09:57:32 2001
@@ -100,7 +100,7 @@
     echo " --with-apxs or --with-apache must be used"
     echo "=================================================================="
 else
- BUILD_APACHE_RULE=apache-mods
+ BUILD_APACHE_RULE=apache-mod
 fi
 AC_SUBST(APACHE_TARGET)
 AC_SUBST(APACHE_INCLUDES)
Index: ac-helpers/berkeley-db.m4
===================================================================
--- ac-helpers/SVN/text-base/berkeley-db.m4 Fri Aug 31 09:53:18 2001
+++ ac-helpers/berkeley-db.m4 Sat Sep 1 08:26:39 2001
@@ -95,8 +95,10 @@
   if test "$status" = "builtin"; then
     # Use the include and lib files in the build dir.
     dbdir=`cd db/dist ; pwd`
- CPPFLAGS="$CPPFLAGS -I$dbdir"
- LIBS="$LIBS -L$dbdir -ldb"
+ SVN_DB_INCLUDES="-I$dbdir"
+ # Note that once we upgrade to libtool 1.4 this should be changed to
+ # SVN_DB_LIBS="$dbdir/libdb-3.3.la"
+ SVN_DB_LIBS="-L$dbdir/.libs -ldb-3.3"
     svn_lib_berkeley_db=yes
   elif test "$status" = "skip"; then
     svn_lib_berkeley_db=no

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Kevin Pilch-Bisson                    http://www.pilch-bisson.net
     "Historically speaking, the presences of wheels in Unix
     has never precluded their reinvention." - Larry Wall
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  • application/pgp-signature attachment: stored
Received on Sat Oct 21 14:36:39 2006

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.