[java-libglom/libglom-1-20] Generate a *-javadoc.jar too, as needed by the sonatype.org repository.



commit b49c659b117ba7a89059b3f308b4ef2d6d630f2c
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Jan 18 14:47:34 2012 +0100

    Generate a *-javadoc.jar too, as needed by the sonatype.org repository.
    
    * Makefile.am: Explicitly call javadoc and jar to generate the
    documentation jar.
    
    Conflicts:
    
    	ChangeLog

 ChangeLog   |    9 ++++++++-
 Makefile.am |   16 +++++++++++++++-
 2 files changed, 23 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 1221ebc..7fd3503 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,13 @@
+2012-01-18  Murray Cumming  <murrayc murrayc com>
+
+	Generate a *-javadoc.jar too, as needed by the sonatype.org repository.
+
+	* Makefile.am: Explicitly call javadoc and jar to generate the 
+	documentation jar.
+
 2012-01-10  Murray Cumming  <murrayc murrayc com>
 
-	.pom file: Adjust so we can upload to the sonatype.org resository.
+	.pom file: Adjust so we can upload to the sonatype.org repository.
 
 	* java-libglom.pom.in: Change the scm to something like the git scm 
 	example here, though the syntax is not clear:
diff --git a/Makefile.am b/Makefile.am
index a784a23..e7ab201 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -27,6 +27,7 @@ DISTCHECK_CONFIGURE_FLAGS = --enable-warnings=fatal
 SUBDIRS =
 
 jarfile = java-libglom- PACKAGE_VERSION@.jar
+doc_jarfile = java-libglom- PACKAGE_VERSION@-javadoc.jar
 jardir = $(datadir)/java
 
 generated_java_sources = src/main/java/org/glom/libglom/BakeryDocument.java \
@@ -86,6 +87,7 @@ swig_sources = src/glom.i \
                src/std_list.i
 
 java_binaries = $(top_builddir)/$(jarfile) \
+                $(top_builddir)/$(doc_jarfile) \
                 $(top_builddir)/org/glom/libglom/*.class \
                 $(top_builddir)/src/test/java/org/glom/libglom/tests/*.class \
                 $(top_builddir)/src/examples/org/glom/libglom/examples/*.class
@@ -98,6 +100,10 @@ CLEANFILES = $(java_binaries) tests-and-examples.stamp
 swig_dependencies =
 endif
 
+#We use this special target because CLEANFILES cannot contain a whole directory.
+clean-local:
+	$(RM) -rf $(top_builddir)/doc
+
 dist_noinst_JAVA = $(generated_java_sources)
 
 test_sources = src/test/java/org/glom/libglom/tests/DocumentTest.java \
@@ -136,7 +142,7 @@ src/glom_wrap.cc: $(swig_dependencies)
 $(jarfile): classdist_noinst.stamp
 	$(JAR) cf $(JARFLAGS) $(top_builddir)/$(jarfile) org
 
-all-local: tests-and-examples.stamp
+all-local: $(jarfile) $(doc_jarfile) tests-and-examples.stamp
 
 # This uses mvn to install the .jar file in the local .m2 directory.
 # and install our .pom file alongside it.
@@ -167,3 +173,11 @@ tests-and-examples.stamp: $(jarfile) $(test_sources)
 
 deploy: $(pomfile) $(jarfile) 
 	mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=sonatype-nexus-staging -DpomFile=$(pomfile) -Dfile=$(jarfile)
+
+
+docbuild: $(jarfile)
+	javadoc -public $(top_srcdir)/src/main/java/org/glom/libglom/*.java -d doc
+
+$(doc_jarfile): docbuild
+	$(JAR) cf $(JARFLAGS) $(top_builddir)/$(doc_jarfile) doc/*
+



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]