subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From james...@apache.org
Subject svn commit: r1840977 - in /subversion/branches/java10-compat: Makefile.in build.conf build/generator/gen_base.py build/generator/gen_make.py build/generator/gen_win.py build/generator/templates/build-outputs.mk.ezt
Date Sat, 15 Sep 2018 20:44:07 GMT
Author: jamessan
Date: Sat Sep 15 20:44:06 2018
New Revision: 1840977

URL: http://svn.apache.org/viewvc?rev=1840977&view=rev
Log:
On the 'java10-compat' branch: Add initial support for building with Java 10

Java 10 removed the javah tool, moving the functionality of generating header
files for native code into javac behind the -h switch.  One command
invocation will both compile the class files and generate the native headers.

To support this, build.conf's java and javah types have been combined into a
single java type.  If there are java files with native code, they need to be
explicitly declared in the new "native" attribute to allow defining a
dependency between the generated header file and the java file.

Unlike javah, javac will only produce header files for source files that
actually have native content, so there is not a 1:1 relationship between .java
and .h files.  This also means that the .java files which don't directly have
native code, but which provide fields used by native code need to be properly
annotated.

* build.conf
  (javahl-javah, javahl-callback-javah, javahl-remote-javah, javahl-types-javah):
   Remove in favor of...
  (javahl-java, javahl-callback-java, javahl-remote-java, javahl-types-java):
   Add native attribute declaring files with native content, and headers
   attribute for location of generated header files.
  (javahl-compat-java): List all dependencies now that the javahl-java target
   doesn't aggregate all of its sub-packages.
  (libsvnjavahl): Rename *_javah_DEPS to *_java_DEPS

* build/generator/gen_base.py
  (TargetJavaHeaders, TargetJavaClasses): Remove and merge their functionality
   together into a single TargetJava class.
  (TargetJava): Remove support for package-roots attribute.  Add handling for
   native attribute.  If native content exists for a target, an additional
   DT_LINK object is added to the graph for the header file.

* build/generator/gen_make.py
  (write): Propagate the headers_dir attribute from target_ob into ezt_target.

* build/generator/gen_win.py
  (get_install_targets): Remove check for TargetJavaHeaders type
  (get_proj_sources): Remove checks for/uses of javah executable.  Replace
   TargetJavaClasses/TargetJavaHeaders checks with one for TargetJava.  Add
   "-h headers_dir" to javac command if target has headers location defined.
   Set ctarget/cdesc for the project item based on the object type being
   created.
  (get_output_dir): Use the classes directory for all TargetJava targets,
   since class files will always be created.

* build/generator/templates/build-outputs.mk.ezt
  (target.type "java"): Merge the target's _HEADERS and _OBJECTS rules into
   one, which only depends on the _SRC files.  The link_cmd will include
   "-h headers_dir" if the target has a headers_dir attribute.

* Makefile.in
  (): Remove COMPILE_JAVAHL_JAVAH and JAVAH

Modified:
    subversion/branches/java10-compat/Makefile.in
    subversion/branches/java10-compat/build.conf
    subversion/branches/java10-compat/build/generator/gen_base.py
    subversion/branches/java10-compat/build/generator/gen_make.py
    subversion/branches/java10-compat/build/generator/gen_win.py
    subversion/branches/java10-compat/build/generator/templates/build-outputs.mk.ezt

Modified: subversion/branches/java10-compat/Makefile.in
URL: http://svn.apache.org/viewvc/subversion/branches/java10-compat/Makefile.in?rev=1840977&r1=1840976&r2=1840977&view=diff
==============================================================================
--- subversion/branches/java10-compat/Makefile.in (original)
+++ subversion/branches/java10-compat/Makefile.in Sat Sep 15 20:44:06 2018
@@ -218,7 +218,6 @@ COMPILE_SWIG_RB = $(LIBTOOL) $(LTFLAGS)
 # special compilation for files destined for javahl (i.e. C++)
 COMPILE_JAVAHL_CXX = $(LIBTOOL) $(LTCXXFLAGS) --mode=compile $(COMPILE_CXX) $(LT_CFLAGS)
$(JAVAHL_INCLUDES) -o $@ -c
 COMPILE_JAVAHL_JAVAC = $(JAVAC) $(JAVAC_FLAGS)
-COMPILE_JAVAHL_JAVAH = $(JAVAH)
 COMPILE_JAVAHL_COMPAT_JAVAC = $(JAVAC) $(JAVAC_COMPAT_FLAGS)
 
 # On Mac OS X, export an env variable so that the tests can run without
@@ -393,7 +392,6 @@ JAVAC = @JAVAC@
 JAVADOC = @JAVADOC@
 JAVAC_FLAGS = @JAVAC_FLAGS@
 JAVAC_COMPAT_FLAGS = @JAVAC_COMPAT_FLAGS@
-JAVAH = @JAVAH@
 JAR = @JAR@
 
 JAVA_CLASSPATH=$(abs_srcdir)/subversion/bindings/javahl/src:@JAVA_CLASSPATH@
@@ -494,8 +492,8 @@ revision-install:
 install-static: @INSTALL_STATIC_RULES@
 
 # JavaHL target aliases
-javahl: mkdir-init javahl-java javahl-javah javahl-callback-javah javahl-remote-javah javahl-types-javah
javahl-util-javah javahl-lib @JAVAHL_TESTS_TARGET@ javahl-compat
-install-javahl: javahl install-javahl-java install-javahl-javah install-javahl-lib
+javahl: mkdir-init javahl-java javahl-callback-java javahl-remote-java javahl-types-java
javahl-util-java javahl-lib @JAVAHL_TESTS_TARGET@ javahl-compat
+install-javahl: javahl install-javahl-java install-javahl-lib
 javahl-compat: javahl-compat-java @JAVAHL_COMPAT_TESTS_TARGET@
 
 clean-javahl:

Modified: subversion/branches/java10-compat/build.conf
URL: http://svn.apache.org/viewvc/subversion/branches/java10-compat/build.conf?rev=1840977&r1=1840976&r2=1840977&view=diff
==============================================================================
--- subversion/branches/java10-compat/build.conf (original)
+++ subversion/branches/java10-compat/build.conf Sat Sep 15 20:44:06 2018
@@ -608,16 +608,14 @@ msvc-export = ../bindings/swig/ruby/libs
 [javahl-java]
 type = java
 path = subversion/bindings/javahl/src/org/apache/subversion/javahl
-  subversion/bindings/javahl/src/org/apache/subversion/javahl/callback
-  subversion/bindings/javahl/src/org/apache/subversion/javahl/remote
-  subversion/bindings/javahl/src/org/apache/subversion/javahl/types
-  subversion/bindings/javahl/src/org/apache/subversion/javahl/util
-src-root = subversion/bindings/javahl/src
 sources = *.java
+native = CommitItemStateFlags.java NativeResources.java SVNClient.java
+         SVNRepos.java
 install = javahl-java
 link-cmd = $(COMPILE_JAVAHL_JAVAC)
 classes = subversion/bindings/javahl/classes
-package-roots = org
+headers = subversion/bindings/javahl/include
+package = org.apache.subversion.javahl
 
 [javahl-compat-java]
 type = java
@@ -626,10 +624,12 @@ sources = *.java
 install = javahl-java
 link-cmd = $(COMPILE_JAVAHL_COMPAT_JAVAC)
 classes = subversion/bindings/javahl/classes
-add-deps = $(javahl_java_DEPS)
+add-deps = $(javahl_callback_java_DEPS) $(javahl_remote_java_DEPS)
+           $(javahl_types_java_DEPS) $(javahl_util_java_DEPS)
+           $(javahl_java_DEPS)
 ### Replace JAR call in INSTALL_EXTRA_JAVAHL_JAVA macro Makefile.in.
 #jar = svn-javahl.jar
-package-roots = org
+package = org.tigris.subversion.javahl
 
 [javahl-tests]
 type = java
@@ -638,10 +638,12 @@ sources = *.java
 install = javahl-java
 link-cmd = $(COMPILE_JAVAHL_JAVAC)
 classes = subversion/bindings/javahl/classes
-package-roots = org
+package = org.apache.subversion.javahl
 ### Java targets don't do up-to-date checks yet.
 #add-deps = javahl-java
-add-deps = $(javahl_java_DEPS)
+add-deps = $(javahl_callback_java_DEPS) $(javahl_remote_java_DEPS)
+           $(javahl_types_java_DEPS) $(javahl_util_java_DEPS)
+           $(javahl_java_DEPS)
 
 [javahl-compat-tests]
 type = java
@@ -650,65 +652,59 @@ sources = *.java
 install = javahl-java
 link-cmd = $(COMPILE_JAVAHL_COMPAT_JAVAC)
 classes = subversion/bindings/javahl/classes
-package-roots = org
+package = org.tigris.subversion.javahl
 ### Java targets don't do up-to-date checks yet.
 #add-deps = javahl-compat-java
 add-deps = $(javahl_compat_java_DEPS)
 
-[javahl-callback-javah]
-type = javah
+[javahl-callback-java]
+type = java
 path = subversion/bindings/javahl/src/org/apache/subversion/javahl/callback
 classes = subversion/bindings/javahl/classes
 headers = subversion/bindings/javahl/include
 package = org.apache.subversion.javahl.callback
 sources = *.java
-add-deps = $(javahl_java_DEPS)
-install = javahl-javah
-link-cmd = $(COMPILE_JAVAHL_JAVAH) -force
+native = UserPasswordCallback.java
+install = javahl-java
+link-cmd = $(COMPILE_JAVAHL_JAVAC)
 
-[javahl-remote-javah]
-type = javah
+[javahl-remote-java]
+type = java
 path = subversion/bindings/javahl/src/org/apache/subversion/javahl/remote
 classes = subversion/bindings/javahl/classes
 headers = subversion/bindings/javahl/include
 package = org.apache.subversion.javahl.remote
 sources = *.java
-add-deps = $(javahl_java_DEPS)
-install = javahl-javah
-link-cmd = $(COMPILE_JAVAHL_JAVAH) -force
+native = CommitEditor.java RemoteFactory.java RemoteSession.java
+         StateReporter.java
+install = javahl-java
+link-cmd = $(COMPILE_JAVAHL_JAVAC)
 
-[javahl-types-javah]
-type = javah
+[javahl-types-java]
+type = java
 path = subversion/bindings/javahl/src/org/apache/subversion/javahl/types
 classes = subversion/bindings/javahl/classes
 headers = subversion/bindings/javahl/include
 package = org.apache.subversion.javahl.types
 sources = *.java
-add-deps = $(javahl_java_DEPS)
-install = javahl-javah
-link-cmd = $(COMPILE_JAVAHL_JAVAH) -force
+native = NativeInputStream.java NativeOutputStream.java Revision.java
+         RevisionRangeList.java RuntimeVersion.java VersionExtended.java
+         Version.java
+install = javahl-java
+link-cmd = $(COMPILE_JAVAHL_JAVAC)
 
-[javahl-util-javah]
-type = javah
+[javahl-util-java]
+type = java
 path = subversion/bindings/javahl/src/org/apache/subversion/javahl/util
 classes = subversion/bindings/javahl/classes
 headers = subversion/bindings/javahl/include
 package = org.apache.subversion.javahl.util
 sources = *.java
-add-deps = $(javahl_java_DEPS)
-install = javahl-javah
-link-cmd = $(COMPILE_JAVAHL_JAVAH) -force
-
-[javahl-javah]
-type = javah
-path = subversion/bindings/javahl/src/org/apache/subversion/javahl
-classes = subversion/bindings/javahl/classes
-headers = subversion/bindings/javahl/include
-package = org.apache.subversion.javahl
-sources = *.java
-add-deps = $(javahl_java_DEPS)
-install = javahl-javah
-link-cmd = $(COMPILE_JAVAHL_JAVAH) -force
+native = ConfigImpl.java ConfigLib.java DiffLib.java PropLib.java
+         RequestChannel.java ResponseChannel.java SubstLib.java
+         TunnelChannel.java
+install = javahl-java
+link-cmd = $(COMPILE_JAVAHL_JAVAC)
 
 [libsvnjavahl]
 description = Subversion Java HighLevel binding
@@ -717,9 +713,9 @@ path = subversion/bindings/javahl/native
 libs = libsvn_repos libsvn_client libsvn_wc libsvn_ra libsvn_delta libsvn_diff 
        libsvn_subr libsvn_fs aprutil apriconv apr java-sdk
 sources = *.cpp jniwrapper/*.cpp
-add-deps = $(javahl_java_DEPS) $(javahl_callback_javah_DEPS)
-           $(javahl_remote_javah_DEPS) $(javahl_types_javah_DEPS)
-           $(javahl_util_javah_DEPS) $(javahl_javah_DEPS)
+add-deps = $(javahl_java_DEPS) $(javahl_callback_java_DEPS)
+           $(javahl_remote_java_DEPS) $(javahl_types_java_DEPS)
+           $(javahl_util_java_DEPS) $(javahl_java_DEPS)
 install = javahl-lib
 # need special build rule to include -I$(JDK)/include/jni.h
 compile-cmd = $(COMPILE_JAVAHL_CXX)
@@ -1630,7 +1626,7 @@ lang = ruby
 [__JAVAHL__]
 type = project
 path = build/win32
-libs = javahl-java javahl-javah libsvnjavahl
+libs = javahl-java libsvnjavahl
 
 [__JAVAHL_TESTS__]
 type = project

Modified: subversion/branches/java10-compat/build/generator/gen_base.py
URL: http://svn.apache.org/viewvc/subversion/branches/java10-compat/build/generator/gen_base.py?rev=1840977&r1=1840976&r2=1840977&view=diff
==============================================================================
--- subversion/branches/java10-compat/build/generator/gen_base.py (original)
+++ subversion/branches/java10-compat/build/generator/gen_base.py Sat Sep 15 20:44:06 2018
@@ -900,115 +900,67 @@ class TargetJava(TargetLinked):
   def __init__(self, name, options, gen_obj):
     TargetLinked.__init__(self, name, options, gen_obj)
     self.link_cmd = options.get('link-cmd')
-    self.packages = options.get('package-roots', '').split()
+    self.package = options.get('package')
     self.jar = options.get('jar')
     self.deps = [ ]
-
-class TargetJavaHeaders(TargetJava):
-  def __init__(self, name, options, gen_obj):
-    TargetJava.__init__(self, name, options, gen_obj)
     self.objext = '.class'
-    self.javah_objext = '.h'
     self.headers = options.get('headers')
     self.classes = options.get('classes')
-    self.package = options.get('package')
-    self.output_dir = self.headers
+    self.native = options.get('native', '')
+    self.output_dir = self.classes
+    self.headers_dir = self.headers
 
   def add_dependencies(self):
     sources = _collect_paths(self.sources, self.path)
+    native = _collect_paths(self.native, self.path)
+
+    class_pkg_list = self.package.split('.')
+    sourcepath = build_path_split(self.path)[:-len(class_pkg_list)]
+    sourcepath = build_path_join(*sourcepath)
 
     for src, reldir in sources:
       if src[-5:] != '.java':
         raise GenError('ERROR: unknown file extension on ' + src)
 
+      sfile = SourceFile(src, reldir)
+      sfile.sourcepath = sourcepath
+
       class_name = build_path_basename(src[:-5])
 
-      class_header = build_path_join(self.headers, class_name + '.h')
-      class_header_win = build_path_join(self.headers,
-                                         self.package.replace(".", "_")
-                                         + "_" + class_name + '.h')
-      class_pkg_list = self.package.split('.')
       class_pkg = build_path_join(*class_pkg_list)
       class_file = ObjectFile(build_path_join(self.classes, class_pkg,
                                               class_name + self.objext),
-                              self.when)
+                              self.compile_cmd, self.when)
       class_file.source_generated = 1
       class_file.class_name = class_name
-      hfile = HeaderFile(class_header, self.package + '.' + class_name,
-                         self.compile_cmd)
-      hfile.filename_win = class_header_win
-      hfile.source_generated = 1
-      self.gen_obj.graph.add(DT_OBJECT, hfile, class_file)
-      self.deps.append(hfile)
-
-      # target (a linked item) depends upon object
-      self.gen_obj.graph.add(DT_LINK, self.name, hfile)
 
+      self.gen_obj.graph.add(DT_OBJECT, class_file, sfile)
+      self.gen_obj.graph.add(DT_LINK, self.name, class_file)
+      self.deps.append(class_file)
+
+      if (src, reldir) in native:
+        class_header = build_path_join(self.headers, class_name + '.h')
+        class_header_win = build_path_join(self.headers,
+                                           self.package.replace(".", "_")
+                                           + "_" + class_name + '.h')
+        hfile = HeaderFile(class_header, self.package + '.' + class_name,
+                           self.compile_cmd)
+        hfile.filename_win = class_header_win
+        hfile.source_generated = 1
+        self.gen_obj.graph.add(DT_OBJECT, hfile, sfile)
+        self.deps.append(hfile)
 
-    # collect all the paths where stuff might get built
-    ### we should collect this from the dependency nodes rather than
-    ### the sources. "what dir are you going to put yourself into?"
-    self.gen_obj.target_dirs.append(self.path)
-    self.gen_obj.target_dirs.append(self.classes)
-    self.gen_obj.target_dirs.append(self.headers)
-    for pattern in self.sources.split():
-      dirname = build_path_dirname(pattern)
-      if dirname:
-        self.gen_obj.target_dirs.append(build_path_join(self.path, dirname))
+        # target (a linked item) depends upon object
+        self.gen_obj.graph.add(DT_LINK, self.name, hfile)
 
-    self.gen_obj.graph.add(DT_INSTALL, self.name, self)
-
-class TargetJavaClasses(TargetJava):
-  def __init__(self, name, options, gen_obj):
-    TargetJava.__init__(self, name, options, gen_obj)
-    self.objext = '.class'
-    self.lang = 'java'
-    self.classes = options.get('classes')
-    self.output_dir = self.classes
-
-  def add_dependencies(self):
-    sources = []
-    for p in self.path.split():
-      sources.extend(_collect_paths(self.sources, p))
-
-    for src, reldir in sources:
-      if src[-5:] != '.java':
-        raise GenError('ERROR: unknown file extension on "' + src + '"')
-
-      objname = src[:-5] + self.objext
-
-      # As .class files are likely not generated into the same
-      # directory as the source files, the object path may need
-      # adjustment.  To this effect, take "target_ob.classes" into
-      # account.
-      dirs = build_path_split(objname)
-      sourcedirs = dirs[:-1]  # Last element is the .class file name.
-      while sourcedirs:
-        if sourcedirs.pop() in self.packages:
-          sourcepath = build_path_join(*sourcedirs)
-          objname = build_path_join(self.classes, *dirs[len(sourcedirs):])
-          break
-      else:
-        raise GenError('Unable to find Java package root in path "%s"' % objname)
-
-      ofile = ObjectFile(objname, self.compile_cmd, self.when)
-      sfile = SourceFile(src, reldir)
-      sfile.sourcepath = sourcepath
-
-      # object depends upon source
-      self.gen_obj.graph.add(DT_OBJECT, ofile, sfile)
-
-      # target (a linked item) depends upon object
-      self.gen_obj.graph.add(DT_LINK, self.name, ofile)
-
-      # Add the class file to the dependency tree for this target
-      self.deps.append(ofile)
 
     # collect all the paths where stuff might get built
     ### we should collect this from the dependency nodes rather than
     ### the sources. "what dir are you going to put yourself into?"
-    self.gen_obj.target_dirs.extend(self.path.split())
+    self.gen_obj.target_dirs.append(self.path)
     self.gen_obj.target_dirs.append(self.classes)
+    if self.headers:
+      self.gen_obj.target_dirs.append(self.headers)
     for pattern in self.sources.split():
       dirname = build_path_dirname(pattern)
       if dirname:
@@ -1057,8 +1009,7 @@ _build_types = {
   'apache-mod': TargetApacheMod,
   'shared-only-lib': TargetSharedOnlyLib,
   'shared-only-cxx-lib': TargetSharedOnlyCxxLib,
-  'javah' : TargetJavaHeaders,
-  'java' : TargetJavaClasses,
+  'java' : TargetJava,
   'i18n' : TargetI18N,
   'sql-header' : TargetSQLHeader,
   }

Modified: subversion/branches/java10-compat/build/generator/gen_make.py
URL: http://svn.apache.org/viewvc/subversion/branches/java10-compat/build/generator/gen_make.py?rev=1840977&r1=1840976&r2=1840977&view=diff
==============================================================================
--- subversion/branches/java10-compat/build/generator/gen_make.py (original)
+++ subversion/branches/java10-compat/build/generator/gen_make.py Sat Sep 15 20:44:06 2018
@@ -309,6 +309,8 @@ class Generator(gen_base.GeneratorBase):
         ezt_target.link_cmd = target_ob.link_cmd
       if hasattr(target_ob, 'output_dir'):
         ezt_target.output_dir = target_ob.output_dir
+      if hasattr(target_ob, 'headers_dir'):
+        ezt_target.headers_dir = target_ob.headers_dir
 
       # Add additional install dependencies if necessary
       if target_ob.add_install_deps:

Modified: subversion/branches/java10-compat/build/generator/gen_win.py
URL: http://svn.apache.org/viewvc/subversion/branches/java10-compat/build/generator/gen_win.py?rev=1840977&r1=1840976&r2=1840977&view=diff
==============================================================================
--- subversion/branches/java10-compat/build/generator/gen_win.py (original)
+++ subversion/branches/java10-compat/build/generator/gen_win.py Sat Sep 15 20:44:06 2018
@@ -217,7 +217,6 @@ class WinGeneratorBase(gen_win_dependenc
     if 'java_sdk' not in self._libraries:
       install_targets = [x for x in install_targets
                                      if not (isinstance(x, gen_base.TargetJava)
-                                             or isinstance(x, gen_base.TargetJavaHeaders)
                                              or x.name == '__JAVAHL__'
                                              or x.name == '__JAVAHL_TESTS__'
                                              or x.name == 'libsvnjavahl')]
@@ -332,11 +331,9 @@ class WinGeneratorBase(gen_win_dependenc
     sources = [ ]
 
     javac_exe = "javac"
-    javah_exe = "javah"
     jar_exe = "jar"
     if self.jdk_path:
       javac_exe = os.path.join(self.jdk_path, "bin", javac_exe)
-      javah_exe = os.path.join(self.jdk_path, "bin", javah_exe)
       jar_exe = os.path.join(self.jdk_path, "bin", jar_exe)
 
     if not isinstance(target, gen_base.TargetProject):
@@ -345,25 +342,13 @@ class WinGeneratorBase(gen_win_dependenc
         ctarget = None
         cdesc = None
         cignore = None
-        if isinstance(target, gen_base.TargetJavaHeaders):
-          classes = self.path(target.classes)
-          if self.junit_path is not None:
-            classes = "%s;%s" % (classes, self.junit_path)
-
-          headers = self.path(target.headers)
-          classname = target.package + "." + source.class_name
-
-          cbuild = "%s -verbose -force -classpath %s -d %s %s" \
-                   % (self.quote(javah_exe), self.quote(classes),
-                      self.quote(headers), classname)
-
-          ctarget = self.path(object.filename_win)
-          cdesc = "Generating %s" % (object.filename_win)
-
-        elif isinstance(target, gen_base.TargetJavaClasses):
+        if isinstance(target, gen_base.TargetJava):
           classes = targetdir = self.path(target.classes)
           if self.junit_path is not None:
             classes = "%s;%s" % (classes, self.junit_path)
+          headers = ''
+          if self.headers is not None:
+            headers = '-h %s' % self.quote(self.path(self.headers))
 
           sourcepath = self.path(source.sourcepath)
 
@@ -375,6 +360,7 @@ class WinGeneratorBase(gen_win_dependenc
 
           cbuild = ("%s -g -Xlint -Xlint:-options " +
                     per_project_flags +
+                    headers + 
                     " -target 1.8 -source 1.8 -classpath "
                     " %s -d %s "
                     " -sourcepath %s $(InputPath)") \
@@ -382,8 +368,12 @@ class WinGeneratorBase(gen_win_dependenc
                                             targetdir, sourcepath)))
 
 
-          ctarget = self.path(object.filename)
-          cdesc = "Compiling %s" % (source)
+          if isinstance(object, gen_base.HeaderFile):
+            ctarget = self.path(object.filename_win)
+            cdesc = "Generating %s" % (object.filename_win)
+          else:
+            ctarget = self.path(object.filename)
+            cdesc = "Compiling %s" % (source)
 
         rsrc = self.path(str(source))
         if quote_path and '-' in rsrc:
@@ -403,7 +393,7 @@ class WinGeneratorBase(gen_win_dependenc
                                    custom_desc=cdesc, ignored = cignore,
                                    extension=os.path.splitext(rsrc)[1]))
 
-    if isinstance(target, gen_base.TargetJavaClasses) and target.jar:
+    if isinstance(target, gen_base.TargetJava) and target.jar:
       classdir = self.path(target.classes)
       jarfile = msvc_path_join(classdir, target.jar)
       cbuild = "%s cf %s -C %s %s" \
@@ -507,9 +497,7 @@ class WinGeneratorBase(gen_win_dependenc
     return name[0] + '.pdb'
 
   def get_output_dir(self, target):
-    if isinstance(target, gen_base.TargetJavaHeaders):
-      return msvc_path("../" + target.headers)
-    elif isinstance(target, gen_base.TargetJavaClasses):
+    if isinstance(target, gen_base.TargetJava):
       return msvc_path("../" + target.classes)
     else:
       return msvc_path(target.path)

Modified: subversion/branches/java10-compat/build/generator/templates/build-outputs.mk.ezt
URL: http://svn.apache.org/viewvc/subversion/branches/java10-compat/build/generator/templates/build-outputs.mk.ezt?rev=1840977&r1=1840976&r2=1840977&view=diff
==============================================================================
--- subversion/branches/java10-compat/build/generator/templates/build-outputs.mk.ezt (original)
+++ subversion/branches/java10-compat/build/generator/templates/build-outputs.mk.ezt Sat Sep
15 20:44:06 2018
@@ -102,13 +102,9 @@ install-[target.install]: [target.instal
 [target.varname]_OBJECTS = [for target.objects][if-index target.objects first][else] [end][target.objects][end]
 [target.varname]_DEPS = $([target.varname]_HEADERS) $([target.varname]_OBJECTS)[for target.add_deps]
[target.add_deps][end][for target.deps][if-index target.deps first][else] [end][target.deps][end]
 [target.name]: $([target.varname]_DEPS)
-[if-any target.headers][target.varname]_CLASS_FILENAMES =[for target.header_class_filenames]
[target.header_class_filenames][end]
-[target.varname]_CLASSES =[for target.header_classes] [target.header_classes][end]
-$([target.varname]_HEADERS): $([target.varname]_CLASS_FILENAMES)
-	[target.link_cmd] -d [target.output_dir] -classpath [target.classes]:$([target.varname]_CLASSPATH)
$([target.varname]_CLASSES)
-[end][if-any target.sources][target.varname]_SRC =[for target.sources] [target.sources][end]
-$([target.varname]_OBJECTS): $([target.varname]_SRC)
-	[target.link_cmd] -d [target.output_dir] -classpath [target.classes]:$([target.varname]_CLASSPATH)
$([target.varname]_SRC)
+[if-any target.sources][target.varname]_SRC =[for target.sources] [target.sources][end]
+$([target.varname]_HEADERS) $([target.varname]_OBJECTS): $([target.varname]_SRC)
+	[target.link_cmd][if-any target.headers] -h [target.headers_dir][end] -d [target.output_dir]
-classpath [target.classes]:$([target.varname]_CLASSPATH) $([target.varname]_SRC)
 [if-any target.jar]
 	$(JAR) cf [target.jar_path] -C [target.classes][for target.packages] [target.packages][end][end][end]
 [else][is target.type "i18n"][target.varname]_DEPS =[for target.add_deps] [target.add_deps][end][for
target.objects] [target.objects][end][for target.deps] [target.deps][end]



Mime
View raw message