190 JAVASE_LONG_NAME := Java<sup>®</sup> Platform, Standard Edition |
190 JAVASE_LONG_NAME := Java<sup>®</sup> Platform, Standard Edition |
191 |
191 |
192 ################################################################################ |
192 ################################################################################ |
193 # Functions |
193 # Functions |
194 |
194 |
195 # Helper function for creating a png file from a dot file generated by the |
195 # Helper function for creating a svg file from a dot file generated by the |
196 # GenGraphs tool. |
196 # GenGraphs tool. |
197 # param 1: SetupJavadocGeneration namespace ($1) |
197 # param 1: SetupJavadocGeneration namespace ($1) |
198 # param 2: module name |
198 # param 2: module name |
199 # |
199 # |
200 define setup_gengraph_dot_to_png |
200 define setup_gengraph_dot_to_svg |
201 $1_$2_DOT_SRC := $$($1_GENGRAPHS_DIR)/$2.dot |
201 $1_$2_DOT_SRC := $$($1_GENGRAPHS_DIR)/$2.dot |
202 $1_$2_PNG_TARGET := $$($1_TARGET_DIR)/$2/module-graph.png |
202 $1_$2_SVG_TARGET := $$($1_TARGET_DIR)/$2/module-graph.svg |
203 |
203 |
204 # For each module needing a graph, create a png file from the dot file |
204 # For each module needing a graph, create a svg file from the dot file |
205 # generated by the GenGraphs tool and store it in the target dir. |
205 # generated by the GenGraphs tool and store it in the target dir. |
206 $$(eval $$(call SetupExecute, gengraphs_png_$1_$2, \ |
206 $$(eval $$(call SetupExecute, gengraphs_svg_$1_$2, \ |
207 INFO := Running dot for module graphs for $2, \ |
207 INFO := Running dot for module graphs for $2, \ |
208 DEPS := $$(gengraphs_$1_TARGET), \ |
208 DEPS := $$(gengraphs_$1_TARGET), \ |
209 OUTPUT_FILE := $$($1_$2_PNG_TARGET), \ |
209 OUTPUT_FILE := $$($1_$2_SVG_TARGET), \ |
210 SUPPORT_DIR := $$($1_GENGRAPHS_DIR), \ |
210 SUPPORT_DIR := $$($1_GENGRAPHS_DIR), \ |
211 COMMAND := $$(DOT) -Tpng -o $$($1_$2_PNG_TARGET) $$($1_$2_DOT_SRC), \ |
211 COMMAND := $$(DOT) -Tsvg -o $$($1_$2_SVG_TARGET) $$($1_$2_DOT_SRC), \ |
212 )) |
212 )) |
213 |
213 |
214 $1_MODULEGRAPH_TARGETS += $$($1_$2_PNG_TARGET) |
214 $1_MODULEGRAPH_TARGETS += $$($1_$2_SVG_TARGET) |
215 endef |
215 endef |
216 |
216 |
217 # Helper function to create the overview.html file to use with the -overview |
217 # Helper function to create the overview.html file to use with the -overview |
218 # javadoc option. |
218 # javadoc option. |
219 # Returns the filename as $1_OVERVIEW. |
219 # Returns the filename as $1_OVERVIEW. |
280 $1_JAVA_ARGS := -Dextlink.spec.version=$$(VERSION_SPECIFICATION) \ |
280 $1_JAVA_ARGS := -Dextlink.spec.version=$$(VERSION_SPECIFICATION) \ |
281 -Djspec.version=$$(VERSION_SPECIFICATION) |
281 -Djspec.version=$$(VERSION_SPECIFICATION) |
282 |
282 |
283 ifeq ($$(ENABLE_FULL_DOCS), true) |
283 ifeq ($$(ENABLE_FULL_DOCS), true) |
284 # Tell the ModuleGraph taglet to generate html links to soon-to-be-created |
284 # Tell the ModuleGraph taglet to generate html links to soon-to-be-created |
285 # png files with module graphs. |
285 # svg files with module graphs. |
286 $1_JAVA_ARGS += -DenableModuleGraph=true |
286 $1_JAVA_ARGS += -DenableModuleGraph=true |
287 endif |
287 endif |
288 |
288 |
289 # Start with basic options and tags |
289 # Start with basic options and tags |
290 ifeq ($$($1_OPTIONS), ) |
290 ifeq ($$($1_OPTIONS), ) |
360 )) |
360 )) |
361 |
361 |
362 $1_JAVADOC_TARGETS := $$(javadoc_$1_TARGET) |
362 $1_JAVADOC_TARGETS := $$(javadoc_$1_TARGET) |
363 |
363 |
364 ifeq ($$(ENABLE_FULL_DOCS), true) |
364 ifeq ($$(ENABLE_FULL_DOCS), true) |
365 # We have asked ModuleGraph to generate links to png files. Now we must |
365 # We have asked ModuleGraph to generate links to svg files. Now we must |
366 # produce the png files. |
366 # produce the svg files. |
367 |
367 |
368 # Locate which modules has the @moduleGraph tag in their module-info.java |
368 # Locate which modules has the @moduleGraph tag in their module-info.java |
369 $1_MODULES_NEEDING_GRAPH := $$(strip $$(foreach m, $$($1_ALL_MODULES), \ |
369 $1_MODULES_NEEDING_GRAPH := $$(strip $$(foreach m, $$($1_ALL_MODULES), \ |
370 $$(if $$(shell $$(GREP) -e @moduleGraph \ |
370 $$(if $$(shell $$(GREP) -e @moduleGraph \ |
371 $$(wildcard $$(addsuffix /module-info.java, \ |
371 $$(wildcard $$(addsuffix /module-info.java, \ |
386 OUTPUT_DIR := $$($1_GENGRAPHS_DIR), \ |
386 OUTPUT_DIR := $$($1_GENGRAPHS_DIR), \ |
387 COMMAND := $$(TOOL_GENGRAPHS) --spec --output $$($1_GENGRAPHS_DIR) \ |
387 COMMAND := $$(TOOL_GENGRAPHS) --spec --output $$($1_GENGRAPHS_DIR) \ |
388 --dot-attributes $$(GENGRAPHS_PROPS), \ |
388 --dot-attributes $$(GENGRAPHS_PROPS), \ |
389 )) |
389 )) |
390 |
390 |
391 # For each module needing a graph, create a png file from the dot file |
391 # For each module needing a graph, create a svg file from the dot file |
392 # generated by the GenGraphs tool and store it in the target dir. |
392 # generated by the GenGraphs tool and store it in the target dir. |
393 # They will depend on gengraphs_$1_TARGET, and will be added to $1. |
393 # They will depend on gengraphs_$1_TARGET, and will be added to $1. |
394 $$(foreach m, $$($1_MODULES_NEEDING_GRAPH), \ |
394 $$(foreach m, $$($1_MODULES_NEEDING_GRAPH), \ |
395 $$(eval $$(call setup_gengraph_dot_to_png,$1,$$m)) \ |
395 $$(eval $$(call setup_gengraph_dot_to_svg,$1,$$m)) \ |
396 ) |
396 ) |
397 endif |
397 endif |
398 endef |
398 endef |
399 |
399 |
400 ################################################################################ |
400 ################################################################################ |