GNOME Bugzilla – Bug 339854
Autoconf macro to offer to create source jars
Last modified: 2007-01-05 00:59:25 UTC
This is a set of buildsystem patches (5-liners each) for creating source jars. A new target "src-jar" is introduced, so building is as easy as issuing "make src-jar" in $(top_srcdir). This target is also called from dist-hook resulting in "make dist" creating them automatically.
Created attachment 64352 [details] [review] glib-java-srcjar.diff Ok, 2 more lines for supporting out-of-srcdir builds.
Created attachment 64353 [details] [review] cairo-java-srcjar.diff Ok, 2 more lines for supporting out-of-srcdir builds.
Created attachment 64355 [details] [review] libgtk-java-srcjar.diff Ok, 2 more lines for supporting out-of-srcdir builds.
Created attachment 64356 [details] [review] libglade-java-srcjar.diff Ok, 2 more lines for supporting out-of-srcdir builds.
I've discussed this with Robert a few times. We want to make it so that there is a ./configure option that allows a distro packaging java-gnome to say where they want the source jars to go [as different distros have different location policies]. It would seem a little autoconf macro foo will be necessary but I think that will end us up with the most flexible result. AfC
Will take care of that. How do the options --enable-srcjar --srcjar-prefix=$foo sound to you? What about a default srcjar prefix of "$(datadir)/java" ?
Created attachment 64661 [details] libgtk-java2.8.4-src.jar
Comment on attachment 64661 [details] libgtk-java2.8.4-src.jar Source java against the recent stable build
Created attachment 64662 [details] libgnome-java2.12-src.jar Source java against the recent stable build
Created attachment 64663 [details] libgnome-java2.12-src.jar Source java against the recent stable build
Created attachment 64700 [details] [review] glib-java-srcjar.diff The new options now are --enable-srcjar --with-srcjardir=DIR
Created attachment 64701 [details] [review] cairo-java-srcjar.diff The new options now are --enable-srcjar --with-srcjardir=DIR
Created attachment 64702 [details] [review] libgtk-java-srcjar.diff The new options now are --enable-srcjar --with-srcjardir=DIR
Created attachment 64703 [details] [review] libglade-java-srcjar.diff The new options now are --enable-srcjar --with-srcjardir=DIR
Created attachment 64705 [details] [review] cairo-java-srcjar.diff The new options now are --enable-srcjar --with-srcjardir=DIR
Created attachment 64706 [details] [review] libgtk-java-srcjar.diff The new options now are --enable-srcjar --with-srcjardir=DIR
Created attachment 64707 [details] [review] libglade-java-srcjar.diff The new options now are --enable-srcjar --with-srcjardir=DIR
This is fantastic, Robert! Initial glance looks fine; I will apply just as soon as I get a moment. AfC
(In reply to comment #18) [...] > Initial glance looks fine; I will apply just as soon as I get a moment. Maybe you'd like to swap AC_ARG_ENABLE for AC_ARG_WITH in attachment #64700 [details] (the glib-java patch). Initially I thought using _ENABLE was more to the autoconf docs but since at present all options are declared _WITH that'd be more consistent. Will update patch if i get to it before you apply.
Consistency is good. I'd prefer to stick with --with now that you mention it. Of course, it would be famous if someone could figure out a way to make {with and enable} and {without and disable} be synonyms in all of our options. Kinda silly that you have to remember which is which. We've run also run into behaviour that --with doesn't leave on a default behaviour that --without turns off. So lame. But another story. AfC
Created attachment 64912 [details] [review] glib-java-srcjar.diff --with-srcjar --with-srcjardir=DIR
Sure, that makes sense. Any more for any more? Otherwise I'll commit this in the morning. AfC
Eeeee nope. The glib-java patch causes the build to fail, after compiling everything, with: No rule to make target `"./doc-stamp"', needed by `all-local'. Stop. Presumably it would have worked fine if --with-jardir=blah or whatever was specified, but the build still needs to work if no option are specified! What was wrong with the original if BUILD_JAVADOC all-local: $(top_builddir)/doc-stamp else all-local: endif that you removed? AfC
Created attachment 65221 [details] [review] glib-java-srcjar.diff Fix typo.
Created attachment 65222 [details] [review] cairo-java-srcjar.diff Fix typo.
Created attachment 65224 [details] [review] libgtk-java-srcjar.diff Fix typo.
Created attachment 65225 [details] [review] libglade-java-srcjar.diff Fix typo.
(In reply to comment #23) [...] > What was wrong with the original > > if BUILD_JAVADOC > all-local: $(top_builddir)/doc-stamp > else > all-local: > endif Had restructure the "all-local" target a bit, there are now multiple optional dependencies on it because of the added srcjar. Sorry for the messup, please try the fresh patches.
glib: committed Please somebody with a freedesktop cvs commit bit take care of the cairo-java patch.
Rob, I can do the cairo patch in the next day or so; go head and do the libgtk-java, libgnome-java, etc patches that *are* in GNOME CVS. AfC
Marking these patches as "committed" (although they were actually applied by virtue of the patches contributed by John Rich getting java-gnome to build on OpenSolaris). Thanks to Rob and John! AfC