make/Javadoc.gmk

changeset 2542
741aff26fe61
parent 1633
4ad71baca90c
child 2556
76a0f827e163
equal deleted inserted replaced
2541:834c6a13c8c8 2542:741aff26fe61
219 COREAPI_DOCSDIR = $(DOCSDIR)/api 219 COREAPI_DOCSDIR = $(DOCSDIR)/api
220 JDK_API_DOCSDIR = $(DOCSDIR)/jdk/api 220 JDK_API_DOCSDIR = $(DOCSDIR)/jdk/api
221 JRE_API_DOCSDIR = $(DOCSDIR)/jre/api 221 JRE_API_DOCSDIR = $(DOCSDIR)/jre/api
222 PLATFORM_DOCSDIR = $(DOCSDIR)/platform 222 PLATFORM_DOCSDIR = $(DOCSDIR)/platform
223 223
224 JAVADOC_ARCHIVE_NAME := jdk-$(FULL_VERSION)-docs.zip
225 JAVADOC_ARCHIVE_ASSEMBLY_DIR := $(DOCSTMPDIR)/docs-zip
226 JAVADOC_ARCHIVE_DIR := $(OUTPUT_ROOT)/bundles
227 JAVADOC_ARCHIVE := $(JAVADOC_ARCHIVE_DIR)/$(JAVADOC_ARCHIVE_NAME)
228
224 # The non-core api javadocs need to be able to access the root of the core 229 # The non-core api javadocs need to be able to access the root of the core
225 # api directory, so for jdk/api or jre/api to get to the core api/ 230 # api directory, so for jdk/api or jre/api to get to the core api/
226 # directory we would use this: 231 # directory we would use this:
227 JDKJRE2COREAPI = ../../api 232 JDKJRE2COREAPI = ../../api
228 233
326 # Default target is same as docs target, create core api and all others it can 331 # Default target is same as docs target, create core api and all others it can
327 # 332 #
328 333
329 all: docs 334 all: docs
330 docs: coredocs otherdocs 335 docs: coredocs otherdocs
336
337 #
338 # Optional target which bundles all generated javadocs into a zip
339 # archive. The dependency on docs is handled in Main.gmk. Incremental
340 # building of docs is currently broken so if you invoke docs-zip after
341 # docs, the docs are always rebuilt.
342 #
343
344 docs-zip: $(JAVADOC_ARCHIVE)
345
346 #
347 # Add the core docs as prerequisite to the archive to trigger a rebuild
348 # if the core docs were rebuilt. Ideally any doc rebuild should trigger
349 # this, but the way prerequisites are currently setup in this file, that
350 # is hard to achieve.
351 #
352
353 $(JAVADOC_ARCHIVE): $(COREAPI_INDEX_FILE)
354 @$(ECHO) $(LOG_INFO) "Compressing javadoc to single $(JAVADOC_ARCHIVE_NAME)"
355 $(MKDIR) -p $(JAVADOC_ARCHIVE_DIR)
356 $(RM) -r $(JAVADOC_ARCHIVE_ASSEMBLY_DIR)
357 $(MKDIR) -p $(JAVADOC_ARCHIVE_ASSEMBLY_DIR)
358 all_roots=`$(FIND) $(DOCSDIR) | $(GREP) index.html | grep -v old/doclet `; \
359 pushd $(JAVADOC_ARCHIVE_ASSEMBLY_DIR); \
360 for index_file in $${all_roots} ; do \
361 target_dir=`dirname $${index_file}`; \
362 name=`$(ECHO) $${target_dir} | $(SED) "s;/spec;;" | $(SED) "s;.*/;;"`; \
363 $(LN) -s $${target_dir} $${name}; \
364 done; \
365 $(ZIP) -q -r $(JAVADOC_ARCHIVE) * ; \
366 popd ;
331 367
332 ################################################################# 368 #################################################################
333 # Production Targets -- USE THESE TARGETS WHEN: 369 # Production Targets -- USE THESE TARGETS WHEN:
334 # a) You're generating docs outside of release engineering's 370 # a) You're generating docs outside of release engineering's
335 # standard control build. 371 # standard control build.
1370 # * MILESTONE defaults to internal unless set to beta, rc, or fcs on command line 1406 # * MILESTONE defaults to internal unless set to beta, rc, or fcs on command line
1371 # 1407 #
1372 1408
1373 ############################################################# 1409 #############################################################
1374 .PHONY: all docs coredocs rel-docs otherdocs rel-coredocs \ 1410 .PHONY: all docs coredocs rel-docs otherdocs rel-coredocs \
1375 sanitycheckcoredocs $(ALL_OTHER_TARGETS) 1411 sanitycheckcoredocs $(ALL_OTHER_TARGETS) docs-zip

mercurial