aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.am
diff options
context:
space:
mode:
authorAndrew John Hughes <[email protected]>2010-11-26 15:21:56 +0000
committerAndrew John Hughes <[email protected]>2010-11-26 15:21:56 +0000
commitb57a8065fa00e77fec46f68df1735cb4ccc5e385 (patch)
tree981f508c45f62cfa2dd36c1c17315ff626a94e74 /Makefile.am
parente0bd7b0b44090ee4bee28d2f74d0e3559fb75857 (diff)
Add documentation build support.
2010-11-25 Andrew John Hughes <[email protected]> * Makefile.am: (JDK_UPDATE_VERSION): Document. (NETX_PKGS): NetX packages for documentation. (PLUGIN_PKGS): Same for the plugin. (JAVADOC_OPTS): Common options passed to javadoc. (JAVADOC_MEM_OPTS): Memory options passed to JVM if possible (taken from the previous OpenJDK build). (all-local): Depend on docs.stamp. (clean-local): Add clean-docs. (.PHONY): Add clean-docs, clean-plugin-docs, clean-netx-docs. (install-exec-local): Install the documentation if enabled. (docs): Meta-dependency for netx-docs and plugin-docs. (clean-docs): Likewise but for clean targets. (netx-docs): Build documentation for the NetX API. (clean-netx-docs): Remove the NetX docs. (plugin-docs): Build documentation for the plugin API. (clean-plugin-docs): Likewise. (bootstrap-directory): Link to javadoc binary. * acinclude.m4: (IT_FIND_JAVADOC): Find a javadoc binary, first checking user input, then the JDK and the path for 'javadoc' and 'gjdoc'. Also sets JAVADOC_SUPPORTS_J_OPTIONS if it does. * configure.ac: Call IT_FIND_JAVADOC.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am73
1 files changed, 70 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am
index def4774..2c5aa63 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -17,12 +17,20 @@ IT_LANGUAGE_SOURCE_VERSION=6
IT_CLASS_TARGET_VERSION=6
IT_JAVACFLAGS=$(IT_JAVAC_SETTINGS) -source $(IT_LANGUAGE_SOURCE_VERSION) -target $(IT_CLASS_TARGET_VERSION)
+# Fake update version to shut up the plugin detector hosted by Oracle.
+# If Oracle ever release a JDK update greater than 50, this needs to be increased.
JDK_UPDATE_VERSION=50
# Sources list
PLUGIN_TEST_SRCS = $(abs_top_srcdir)/plugin/tests/LiveConnect/*.java
+NETX_PKGS = javax.jnlp net.sourceforge.nanoxml net.sourceforge.jnlp \
+ net.sourceforge.jnlp.cache net.sourceforge.jnlp.event \
+ net.sourceforge.jnlp.security net.sourceforge.jnlp.security.viewer \
+ net.sourceforge.jnlp.services net.sourceforge.jnlp.tools \
+ net.sourceforge.jnlp.util
+
# Conditional defintions
if ENABLE_PLUGIN
ICEDTEAPLUGIN_CLEAN = clean-IcedTeaPlugin
@@ -32,6 +40,7 @@ PLUGIN_SRCDIR=$(abs_top_srcdir)/plugin/icedteanp
LIVECONNECT_SRCS = $(PLUGIN_SRCDIR)/java
ICEDTEAPLUGIN_TARGET = $(PLUGIN_DIR)/IcedTeaPlugin.so stamps/liveconnect-dist.stamp \
$(PLUGIN_DIR)/launcher/pluginappletviewer
+PLUGIN_PKGS = sun.applet netscape.security netscape.javascript
endif
if CP_SUPPORTS_REFLINK
@@ -51,6 +60,14 @@ if HAS_PKGVERSION
ICEDTEA_PKG = $(EMPTY) (${PKGVERSION})
endif
+if ENABLE_DOCS
+JAVADOC_OPTS=-use -keywords -encoding UTF-8 -splitIndex \
+ -bottom '<font size="-1"> <a href="http://icedtea.classpath.org/bugzilla">Submit a bug or feature</a></font>'
+if JAVADOC_SUPPORTS_J_OPTIONS
+JAVADOC_MEM_OPTS=-J-Xmx1024m -J-Xms128m -J-XX:PermSize=32m -J-XX:MaxPermSize=160m
+endif
+endif
+
# Launcher
LAUNCHER_SRCDIR = $(abs_top_srcdir)/launcher
@@ -72,13 +89,13 @@ EXTRA_DIST = $(NETX_SRCDIR) $(abs_top_srcdir)/plugin javaws.png javaws.desktop.i
# =================
all-local: stamps/netx-dist.stamp extra-lib/about.jar stamps/plugin.stamp $(NETX_DIR)/launcher/javaws \
- javaws.desktop
+ javaws.desktop stamps/docs.stamp
clean-local: clean-netx clean-plugin clean-liveconnect clean-extra clean-bootstrap-directory \
- clean-native-ecj clean-desktop-files
+ clean-native-ecj clean-desktop-files clean-docs
.PHONY: clean-IcedTeaPlugin clean-add-netx clean-add-netx-debug clean-add-plugin clean-add-plugin-debug \
- clean-bootstrap-directory clean-native-ecj clean-desktop-files
+ clean-bootstrap-directory clean-native-ecj clean-desktop-files clean-netx-docs clean-docs clean-plugin-docs
install-exec-local:
mkdir -p $(DESTDIR)$(bindir)
@@ -96,6 +113,13 @@ install-data-local:
mkdir -p $(DESTDIR)$(prefix)/man/man1
cp $(NETX_SRCDIR)/javaws.1 $(DESTDIR)$(prefix)/man/man1
cp $(NETX_RESOURCE_DIR)/about.jnlp $(DESTDIR)$(prefix)/jre/lib
+if ENABLE_DOCS
+ mkdir -p $(DESTDIR)$(htmldir)
+ cp -pPRf ${abs_top_builddir}/docs/netx $(DESTDIR)$(htmldir)
+if ENABLE_PLUGIN
+ cp -pPRf ${abs_top_builddir}/docs/plugin $(DESTDIR)$(htmldir)
+endif
+endif
uninstall-local:
rm -f $(DESTDIR)$(prefix)/jre/lib/$(INSTALL_ARCH_DIR)/IcedTeaPlugin.so
@@ -285,6 +309,48 @@ $(NETX_DIR)/launcher/javaws: $(NETX_LAUNCHER_OBJECTS)
javaws.desktop: javaws.desktop.in
sed "s#PATH_TO_JAVAWS#$(DESTDIR)$(bindir)/javaws#" < $(srcdir)/javaws.desktop.in > javaws.desktop
+# documentation
+
+stamps/docs.stamp: stamps/netx-docs.stamp stamps/plugin-docs.stamp
+ touch stamps/docs.stamp
+
+clean-docs: clean-netx-docs clean-plugin-docs
+ rm -f stamps/docs.stamp
+
+stamps/netx-docs.stamp: stamps/bootstrap-directory.stamp
+if ENABLE_DOCS
+ $(BOOT_DIR)/bin/javadoc $(JAVADOC_MEM_OPTS) $(JAVADOC_OPTS) \
+ -d ${abs_top_builddir}/docs/netx -sourcepath $(NETX_SRCDIR) \
+ -doctitle 'IcedTea-Web: NetX API Specification' \
+ -windowtitle 'IcedTea-Web: NetX ' \
+ -header '<strong>IcedTea-Web<br/>NetX</strong>' \
+ $(NETX_PKGS)
+endif
+ mkdir -p stamps
+ touch stamps/netx-docs.stamp
+
+clean-netx-docs:
+ rm -rf ${abs_top_builddir}/docs/netx
+ rm -f stamps/netx-docs.stamp
+
+stamps/plugin-docs.stamp: stamps/bootstrap-directory.stamp
+if ENABLE_DOCS
+if ENABLE_PLUGIN
+ $(BOOT_DIR)/bin/javadoc $(JAVADOC_MEM_OPTS) $(JAVADOC_OPTS) \
+ -d ${abs_top_builddir}/docs/plugin -sourcepath $(NETX_SRCDIR):$(LIVECONNECT_SRCS) \
+ -doctitle 'IcedTea-Web: Plugin API Specification' \
+ -windowtitle 'IcedTea-Web: Plugin ' \
+ -header '<strong>IcedTea-Web<br/>Plugin</strong>' \
+ $(PLUGIN_PKGS)
+endif
+endif
+ mkdir -p stamps
+ touch stamps/plugin-docs.stamp
+
+clean-plugin-docs:
+ rm -rf ${abs_top_builddir}/docs/plugin
+ rm -f stamps/plugin-docs.stamp
+
# plugin tests
if ENABLE_PLUGIN
@@ -323,6 +389,7 @@ stamps/bootstrap-directory.stamp: stamps/native-ecj.stamp
mkdir -p $(BOOT_DIR)/bin stamps/
ln -sf $(JAR) $(BOOT_DIR)/bin/jar
ln -sf $(abs_top_builddir)/javac $(BOOT_DIR)/bin/javac
+ ln -sf $(JAVADOC) $(BOOT_DIR)/bin/javadoc
mkdir -p $(BOOT_DIR)/jre/lib && \
ln -s $(SYSTEM_JDK_DIR)/jre/lib/rt.jar $(BOOT_DIR)/jre/lib && \
if [ -e $(SYSTEM_JDK_DIR)/jre/lib/jsse.jar ] ; then \