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

[PATCH] Fixing the build order of the javahl targets on Windows (VC6 + VS.NET)

From: Lieven Govaerts <lgo_at_mobsol.be>
Date: 2006-11-04 01:53:21 CET

When testing the 1.4.2 release package I noticed building the __JAVAHL__
target failed with missing include files. Building the javahl targets
(javahl_java, javahl_javah) again solved the build problems, which
indicates a problem with the ordering of those targets.

The order in which the dependencies for the __JAVAHL__ target are built
is very important:

1. javahl_java: builds the Java files and thereby creates the class files.
2. javahl_javah: uses the class files to create the jni include files
3. libsvnjavahl: uses those include files to build the native part of javahl

Although that order is correctly defined in build.conf using add-deps
directives, they aren't defined in the VC2005 solution file. As a result
the javahl targets are built in the order that Visual Studio decides
upon. On my machine, that order seems to be different between building
1.4.x and trunk.

Attached patch uses the add-deps lines in build.conf for the
javahl-_javah and libsvnjavahl targets to setup the correct project


Fix the order in which the javahl targets are built: define project
dependencies for javahl_javah and libsvnjavahl when generating
VC60 or VS.NET solution files.

* build/generator/gen_win.py
  (adjust_win_depends): For targets javahl_javah and libsvnjavahl,
   use dependencies defined on the add-deps line for generation VC60
   and VS.NET solution files.

Index: build/generator/gen_win.py
--- build/generator/gen_win.py (revision 22206)
+++ build/generator/gen_win.py (working copy)
@@ -514,6 +514,18 @@
     if self.zlib_path and (name == 'neon' or name == 'serf'):
+ # To set the correct build order of the JavaHL targets, the javahl-javah
+ # and libsvnjavahl targets are defined with extra dependencies in build.conf
+ # like this:
+ # add-deps = $(javahl_javah_DEPS) $(javahl_java_DEPS)
+ #
+ # This section parses those dependencies and adds them to the dependency list
+ # for this target.
+ if name == 'javahl-javah' or name == 'libsvnjavahl':
+ for dep in re.findall('\$\(([^\)]*)_DEPS\)', target.add_deps):
+ dep = string.replace(dep, '_', '-')
+ depends.extend(self.sections[dep].get_targets())
     return depends
   def get_win_depends(self, target, mode):

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Nov 4 01:53:38 2006

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