204 # Print out a summary of the javadoc command about to be run
205 define JavadocSummary # optionsfile packagesfile
206 @$(ECHO) "# Summary for $@"; \
207 $(ECHO) "# Options (`$(BASENAME) $1`):"; $(SED) -e 's@^@# @' $1; \
208 $(ECHO) "# Packages (`$(BASENAME) $2`):";$(SED) -e 's@^@# @' $2
209 endef
210
211 #
212 # Temporary directory for javadoc creation
213 #
214 DOCSTMPDIR = $(TEMPDIR)/doctmp
215
216 #
217 # Different api directories created from root directory
218 #
219 COREAPI_DOCSDIR = $(DOCSDIR)/api
220 JDK_API_DOCSDIR = $(DOCSDIR)/jdk/api
221 JRE_API_DOCSDIR = $(DOCSDIR)/jre/api
222 PLATFORM_DOCSDIR = $(DOCSDIR)/platform
223
224 # 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/
226 # directory we would use this:
227 JDKJRE2COREAPI = ../../api
228
229 # Common bottom argument
230 define CommonBottom # year
231 <font size="-1"><br> $(call CopyrightLine,,$1,)</font>
232 endef
233
234 # Common trademark bottom argument (Not sure why this is used sometimes)
235 define CommonTrademarkBottom # year
236 <font size="-1">\
237 $(BUG_SUBMIT_LINE)<br>$(JAVA_TRADEMARK_LINE)<br>\
238 $(call CopyrightLine,,$1,$(COMPANY_ADDRESS))\
239 </font>
240 endef
241
242 # Common echo of option
243 define OptionOnly # opt
312 # the Java SE platform
313 #
314 include NON_CORE_PKGS.gmk
315
316 #################################################################
317
318 #
319 # Load custom Javadoc rules, if present
320 #
321 -include $(CUSTOM_MAKE_DIR)/Javadoc.gmk
322
323 #################################################################
324
325 #
326 # Default target is same as docs target, create core api and all others it can
327 #
328
329 all: docs
330 docs: coredocs otherdocs
331
332 #################################################################
333 # Production Targets -- USE THESE TARGETS WHEN:
334 # a) You're generating docs outside of release engineering's
335 # standard control build.
336 # b) The docs will be pushed to the web and/or included in
337 # the downloaded doc bundle.
338 #
339 # See: Notes.html#releaseTargets
340 # Note: Spaces precede ifdef/ifndef indents. Tabs precede target commands (!)
341 #
342
343 sanitycheckcoredocs:
344 @$(ECHO) ""
345 @$(ECHO) "Building core api docs with these values:"
346 @$(ECHO) " BUILD_NUMBER = $(BUILD_NUMBER)"
347 @$(ECHO) " MILESTONE = $(MILESTONE)"
348 @$(ECHO) ""
349 ifeq ($(BUILD_NUMBER), b00)
350 @$(ECHO) "ERROR: Build number must be defined"
351 @$(ECHO) "MILESTONE is set to $(MILESTONE)"
1355 # end of production targets
1356
1357 otherdocs: $(ALL_OTHER_TARGETS)
1358
1359 clean:
1360 $(RM) -r $(DOCSDIR) $(DOCSTMPDIR)
1361
1362 #############################################################
1363 # DEBUG TARGET
1364 # List the values defined in the makefile hierarchy, to make sure everything
1365 # is set properly, and to help identify values we can use instead of making new ones.
1366 # (Most of them come from common/shared/Defs.gmk)
1367 #
1368 # Notes:
1369 # * BUILD_NUMBER defaults to b00 if not set on command line with BUILD_NUMBER=<value>
1370 # * MILESTONE defaults to internal unless set to beta, rc, or fcs on command line
1371 #
1372
1373 #############################################################
1374 .PHONY: all docs coredocs rel-docs otherdocs rel-coredocs \
1375 sanitycheckcoredocs $(ALL_OTHER_TARGETS)
|
204 # Print out a summary of the javadoc command about to be run
205 define JavadocSummary # optionsfile packagesfile
206 @$(ECHO) "# Summary for $@"; \
207 $(ECHO) "# Options (`$(BASENAME) $1`):"; $(SED) -e 's@^@# @' $1; \
208 $(ECHO) "# Packages (`$(BASENAME) $2`):";$(SED) -e 's@^@# @' $2
209 endef
210
211 #
212 # Temporary directory for javadoc creation
213 #
214 DOCSTMPDIR = $(TEMPDIR)/doctmp
215
216 #
217 # Different api directories created from root directory
218 #
219 COREAPI_DOCSDIR = $(DOCSDIR)/api
220 JDK_API_DOCSDIR = $(DOCSDIR)/jdk/api
221 JRE_API_DOCSDIR = $(DOCSDIR)/jre/api
222 PLATFORM_DOCSDIR = $(DOCSDIR)/platform
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
229 # The non-core api javadocs need to be able to access the root of the core
230 # api directory, so for jdk/api or jre/api to get to the core api/
231 # directory we would use this:
232 JDKJRE2COREAPI = ../../api
233
234 # Common bottom argument
235 define CommonBottom # year
236 <font size="-1"><br> $(call CopyrightLine,,$1,)</font>
237 endef
238
239 # Common trademark bottom argument (Not sure why this is used sometimes)
240 define CommonTrademarkBottom # year
241 <font size="-1">\
242 $(BUG_SUBMIT_LINE)<br>$(JAVA_TRADEMARK_LINE)<br>\
243 $(call CopyrightLine,,$1,$(COMPANY_ADDRESS))\
244 </font>
245 endef
246
247 # Common echo of option
248 define OptionOnly # opt
317 # the Java SE platform
318 #
319 include NON_CORE_PKGS.gmk
320
321 #################################################################
322
323 #
324 # Load custom Javadoc rules, if present
325 #
326 -include $(CUSTOM_MAKE_DIR)/Javadoc.gmk
327
328 #################################################################
329
330 #
331 # Default target is same as docs target, create core api and all others it can
332 #
333
334 all: docs
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 ;
367
368 #################################################################
369 # Production Targets -- USE THESE TARGETS WHEN:
370 # a) You're generating docs outside of release engineering's
371 # standard control build.
372 # b) The docs will be pushed to the web and/or included in
373 # the downloaded doc bundle.
374 #
375 # See: Notes.html#releaseTargets
376 # Note: Spaces precede ifdef/ifndef indents. Tabs precede target commands (!)
377 #
378
379 sanitycheckcoredocs:
380 @$(ECHO) ""
381 @$(ECHO) "Building core api docs with these values:"
382 @$(ECHO) " BUILD_NUMBER = $(BUILD_NUMBER)"
383 @$(ECHO) " MILESTONE = $(MILESTONE)"
384 @$(ECHO) ""
385 ifeq ($(BUILD_NUMBER), b00)
386 @$(ECHO) "ERROR: Build number must be defined"
387 @$(ECHO) "MILESTONE is set to $(MILESTONE)"
1391 # end of production targets
1392
1393 otherdocs: $(ALL_OTHER_TARGETS)
1394
1395 clean:
1396 $(RM) -r $(DOCSDIR) $(DOCSTMPDIR)
1397
1398 #############################################################
1399 # DEBUG TARGET
1400 # List the values defined in the makefile hierarchy, to make sure everything
1401 # is set properly, and to help identify values we can use instead of making new ones.
1402 # (Most of them come from common/shared/Defs.gmk)
1403 #
1404 # Notes:
1405 # * BUILD_NUMBER defaults to b00 if not set on command line with BUILD_NUMBER=<value>
1406 # * MILESTONE defaults to internal unless set to beta, rc, or fcs on command line
1407 #
1408
1409 #############################################################
1410 .PHONY: all docs coredocs rel-docs otherdocs rel-coredocs \
1411 sanitycheckcoredocs $(ALL_OTHER_TARGETS) docs-zip
|