Closed
Bug 923306
Opened 11 years ago
Closed 11 years ago
Standardize Java JAR building into rules.mk
Categories
(Firefox Build System :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla27
People
(Reporter: nalexander, Assigned: nalexander)
References
Details
Attachments
(3 files, 4 obsolete files)
1.26 KB,
patch
|
ckitching
:
feedback+
|
Details | Diff | Splinter Review |
4.78 KB,
patch
|
glandium
:
review+
ckitching
:
feedback+
|
Details | Diff | Splinter Review |
12.12 KB,
patch
|
glandium
:
review+
|
Details | Diff | Splinter Review |
Bug 919563 standardized building APKs (for all but mobile/android/base); this ticket tracks standardizing building JARs (which only arise in mobile/android/base). This is a step towards defining a sensible moz.build grammar for JAR files.
Assignee | ||
Comment 1•11 years ago
|
||
Attachment #813348 -
Flags: review?(mh+mozilla)
Assignee | ||
Comment 2•11 years ago
|
||
Attachment #813349 -
Flags: review?(mh+mozilla)
Attachment #813349 -
Flags: feedback?(chriskitching)
Assignee | ||
Comment 3•11 years ago
|
||
Attachment #813350 -
Flags: review?(mh+mozilla)
Attachment #813350 -
Flags: feedback?(chriskitching)
Assignee | ||
Comment 4•11 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=7b909fc4d9f3
QA Contact: nalexander
Comment 5•11 years ago
|
||
Comment on attachment 813349 [details] [diff] [review] Make annotationProcessors build with -Xlint:all. r=glandium Ah, yes. Well spotted. There's not really anything in this patch that can go wrong.
Attachment #813349 -
Flags: feedback?(chriskitching) → feedback+
Comment 6•11 years ago
|
||
Comment on attachment 813350 [details] [diff] [review] Build annotationProcessors with JAVA_JAR_TARGETS. r=glandium This seems to be much neater than the earlier approach. If it compiles (Which I assume you tried before uploading it) then I can't find anything to complain about.
Attachment #813350 -
Flags: feedback?(chriskitching) → feedback+
Comment 7•11 years ago
|
||
Comment on attachment 813349 [details] [diff] [review] Make annotationProcessors build with -Xlint:all. r=glandium Review of attachment 813349 [details] [diff] [review]: ----------------------------------------------------------------- I'm not the right reviewer for java code. Not sure who's best to review this.
Attachment #813349 -
Flags: review?(mh+mozilla)
Comment 8•11 years ago
|
||
Comment on attachment 813348 [details] [diff] [review] Add JAVA_JAR_TARGETS. r=glandium Review of attachment 813348 [details] [diff] [review]: ----------------------------------------------------------------- This is sensible, but i'd like to see at least the include part fixed. ::: config/makefiles/java-build.mk @@ +100,5 @@ > +# jars must be relative to $(CURDIR). > +# Arg 4: Additional JAVAC_FLAGS. > +define java_jar_template > +$(1): $(2) $(3) > + @echo "JAR $(1)" Use $(REPORT_BUILD) instead. @@ +107,5 @@ > + $(4)\ > + -d $(1:.jar=)-classes\ > + $(if $(strip $(3)),-classpath $(subst $(NULL) ,:,$(strip $(3))))\ > + $$(filter %.java,$$^) > + $$(NSINSTALL) -D $$(@D) We may not want to run $(NSINSTALL) -D . when $(1) doesn't contain a path. ::: js/src/config/rules.mk @@ +1217,5 @@ > > ############################################################################### > # Java rules > ############################################################################### > +include $(topsrcdir)/config/makefiles/java-build.mk Please add more things to the ifneq instead of removing it. ::: mobile/android/base/Makefile.in @@ +288,4 @@ > WebRTCAudioDevice.java \ > $(NULL) > > +WEBRTC_JAVA_FILES := \ Those are unrelated. Can you leave them alone in this patch?
Attachment #813348 -
Flags: review?(mh+mozilla) → feedback+
Updated•11 years ago
|
Attachment #813350 -
Flags: review?(mh+mozilla) → review+
Assignee | ||
Comment 9•11 years ago
|
||
Attachment #814162 -
Flags: review?(mh+mozilla)
Assignee | ||
Updated•11 years ago
|
Attachment #813348 -
Attachment is obsolete: true
Assignee | ||
Comment 10•11 years ago
|
||
This version adds target_JAVAFILES and target_PP_JAVAFILES. The two are functionally equivalent, but later moz.build work (in progress) needs to know which inputs were preprocessed to create IDE projects, etc.
Attachment #814162 -
Attachment is obsolete: true
Attachment #814162 -
Flags: review?(mh+mozilla)
Attachment #814230 -
Flags: review?(mh+mozilla)
Comment 11•11 years ago
|
||
Comment on attachment 814230 [details] [diff] [review] Add JAVA_JAR_TARGETS. r=glandium Review of attachment 814230 [details] [diff] [review]: ----------------------------------------------------------------- ::: config/makefiles/java-build.mk @@ +98,5 @@ > +# $(srcdir), but we use VPATH and $^ so sources can be relative > +# to $(srcdir) or $(CURDIR). > +# Arg 3: Preprocessed Java sources list. These sources are usually > +# relative to $(CURDIR), but we use VPATH and $^ so sources can > +# be relative to $(srcdir) or $(CURDIR). I see how that can be useful to have those variables, but you don't actually need to separate them in the arguments to this macro. @@ +106,5 @@ > +define java_jar_template > +$(1): $(2) $(3) $(4) > + $$(REPORT_BUILD) > + @$$(NSINSTALL) -D $(1:.jar=)-classes > + @$$(ifneq ./,$$(@D),$$(NSINSTALL) -D $$(@D)) $(ifneq) doesn't exist.
Attachment #814230 -
Flags: review?(mh+mozilla) → review-
Assignee | ||
Comment 12•11 years ago
|
||
Good catch on the ifneq -- does the replacement $(if $(filter-out look good? Only other change is to roll back the new template argument but keep the target_PP_SOURCES.
Attachment #814230 -
Attachment is obsolete: true
Attachment #815104 -
Flags: review?(mh+mozilla)
Assignee | ||
Comment 13•11 years ago
|
||
Huh, lost an old review comment? Not sure how that happened.
Attachment #815104 -
Attachment is obsolete: true
Attachment #815104 -
Flags: review?(mh+mozilla)
Attachment #815136 -
Flags: review?(mh+mozilla)
Comment 14•11 years ago
|
||
Comment on attachment 815136 [details] [diff] [review] Add JAVA_JAR_TARGETS. r=glandium Review of attachment 815136 [details] [diff] [review]: ----------------------------------------------------------------- r+, provided you fixup the filter-out. ::: config/makefiles/java-build.mk @@ +102,5 @@ > +define java_jar_template > +$(1): $(2) $(3) > + $$(REPORT_BUILD) > + @$$(NSINSTALL) -D $(1:.jar=)-classes > + @$$(if $$(filter-out ./,$$(@D)),$$(NSINSTALL) -D $$(@D)) AFAICT, both make and pymake return "." when $(1) has no path, not "./"
Attachment #815136 -
Flags: review?(mh+mozilla) → review+
Assignee | ||
Comment 15•11 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/a29a192dbfe8 https://hg.mozilla.org/integration/fx-team/rev/61b6e63fe7f9 https://hg.mozilla.org/integration/fx-team/rev/905feca3578b https://hg.mozilla.org/integration/fx-team/rev/5055f99ce7c9
Assignee: nobody → nalexander
Status: NEW → ASSIGNED
Comment 16•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/a29a192dbfe8 https://hg.mozilla.org/mozilla-central/rev/61b6e63fe7f9 https://hg.mozilla.org/mozilla-central/rev/905feca3578b https://hg.mozilla.org/mozilla-central/rev/5055f99ce7c9
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
Updated•6 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•