You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by David James <st...@gmail.com> on 2004/09/09 20:07:16 UTC

[PATCH] Add in missing javahl-java and javahl-javah dependencies

Add in missing javahl-java and javahl-javah dependencies

This patch fixes the dependency problems with javahl-java and
javahl-javah by making all .class files dependent on all .java files

PROBLEM: 
- We don't currently have any system for parsing the Java dependencies
CURRENT SOLUTION: 
- Make each %.class file dependent on its associated %.java file. This
is clearly wrong because, sometimes, if you change one .java file,
other .class will need to be recompiled.
- Because the dependencies are wrong, always rebuild the .class files,
regardless of the dependencies.
A BETTER SOLUTION: (implemented by this patch)
- Make each of the .class files dependent on all of the .java files
- With the new, correct dependencies, make will know when to rebuild
the .class files (i.e. only when the .java files change!)

Q: Why not just parse the dependencies from the Java files?
A: We could. But that solution might be overkill, considering that we
don't have a lot of Java files. We'd also need to require that users
install jikes (or a similar dependency-checker).

The patch is attached.

Re: [PATCH] Add in missing javahl-java and javahl-javah dependencies

Posted by Greg Hudson <gh...@MIT.EDU>.
For the record, I can't really evaluate or test the javahl-specific
patches (this one and "Allow users to test JavaHL bindings before
installation") because I don't understand how a Java build system shoudl
work.  So folks shouldn't assume that I will take point on these
patches, even though I've been dealing with the others.  They seem
reasonable to me, but I can't really take responsibility if they break
anything, so I can't feel comfortable committing them.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Add in missing javahl-java and javahl-javah dependencies

Posted by David James <st...@gmail.com>.
(As per Jani Averbach's request, I have reformatted my log message and
reattached my patch. See below.)

This patch fixes the dependency problems with javahl-java and
javahl-javah by making all .class files dependent on all .java files.

This patch also solves the bug behind issue 2039:
<http://subversion.tigris.org/issues/show_bug.cgi?id=2039>

* build/generator/gen-base.py
 (gen_base.TargetJavaClasses.add_dependencies): Add class file to
    dependency list instead of source file.

* build/generator/gen_make.py
  (gen_make.Generator.write): Switched TargetJavaClasses rules to
     depend on the object files instead of the source files. These
     object files are generated in a single call to 'javac'. This
     change prevents unnecessary regeneration of .class files.
  (gen_make.Generator.write): Switched TargetJavaHeaders rules to
     depend on the header files instead of the source files. These
     header files are generated in a single call to 'javah'. This
     change prevents unnecessary regeneration of .h files.
  (gen_make.Generator.write): Added code to keep track of
     dependencies for new TargetJavaHeaders and TargetJavaClasses rules

Re: [PATCH] Add in missing javahl-java and javahl-javah dependencies

Posted by Jani Averbach <ja...@jaa.iki.fi>.
Hi James, 
I have few stylistic comments about your patch log.

1) Always send a log and patch together, even when one of them is same
   as earlier. This makes reviewerer's job much easier, when she/he
   can see the actual log message and patch in the same message.

2) Please separate your filename lines with a blank line, and after
   that indent your entries for that file. This will make them much
   more readable.

3) Provide higher level message first, and after that detailed file
   level entries. This way reviewer will get big picture first and
   after that detailed information how this big picture is
   implemented/changed.

There should be some text and guides of that in HACKING, and you could
copycat old log messages.  This way we could keep Subversion's
beautiful log messages consistent and people keep going and asking
which tool has been used to formulate them. =)

BR, Jani

P.S. I reformatted your log entry, so that you don't have to do it
again, and it is more clear this way what I meant.


LOG MESSAGE:

This patch fixes the dependency problems with javahl-java and
javahl-javah by making all .class files dependent on all .java files.

This patch also solves the bug behind issue 2039:
http://subversion.tigris.org/issues/show_bug.cgi?id=2039

* build/generator/gen-base.py
  (gen_base.TargetJavaClasses.add_dependencies): Add class file to
     dependency list instead of source file.

* gen_make.py
   (gen_make.Generator.write): Switched TargetJavaClasses rules to
      depend on the object files instead of the source files. These
      object files are generated in a single call to 'javac'. This
      change prevents unnecessary regeneration of .class files.
   (gen_make.Generator.write): Switched TargetJavaHeaders rules to
      depend on the header files instead of the source files. These
      header files are generated in a single call to 'javah'. This
      change prevents unnecessary regeneration of .h files.
   (gen_make.Generator.write): Added code to keep track of
      dependencies for new TargetJavaHeaders and TargetJavaClasses rules


-- 
Jani Averbach

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Add in missing javahl-java and javahl-javah dependencies

Posted by David James <st...@gmail.com>.
Below, I've included a proper log message for my previous patch.

LOG MESSAGE:
* gen_base.py
  (gen_base.TargetJavaClasses.add_dependencies): Add class file to
dependency list instead of source file
* gen_make.py
  (gen_make.Generator.write): Switched TargetJavaClasses rules to
depend on the object files instead of the source files. These object
files are generated in a single call to 'javac'. This change prevents
unnecessary regeneration of .class files.
  (gen_make.Generator.write): Switched TargetJavaHeaders rules to
depend on the header files instead of the source files. These header
files are generated in a single call to 'javah'. This change prevents
unnecessary regeneration of .h files.
  (gen_make.Generator.write): Added code to keep track of dependencies
for new TargetJavaHeaders and TargetJavaClasses rules

PROBLEM WE SOLVE:
- This patch fixes the dependency problems with javahl-java and
javahl-javah by making all .class files dependent on all .java files
- This patch solves the bug behind issue 2039:
<http://subversion.tigris.org/issues/show_bug.cgi?id=2039>

PATCH:
- See my original post:
<http://www.contactor.se/~dast/svn/archive-2004-09/0308.shtml>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org