8172562: Changing log level on Javadoc causes total rebuild
Reviewed-by: erikj, tbell
--- a/make/Javadoc.gmk Wed Jan 11 13:00:05 2017 +0100
+++ b/make/Javadoc.gmk Thu Jan 12 10:08:16 2017 +0100
@@ -1,4 +1,4 @@
-# Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -235,10 +235,6 @@
$1_OPTIONS += --add-modules $$(call CommaList, $$($1_MODULES))
- ifneq ($$(LOG_LEVEL), trace)
- $1_OPTIONS += -quiet
- endif
-
ifneq ($$($1_DISABLED_DOCLINT), )
# Create a string like ",-syntax,-html"
$1_DOCLINT_EXCEPTIONS := ,$$(call CommaList, $$(addprefix -, $$($1_DISABLED_DOCLINT)))
@@ -292,6 +288,13 @@
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
$$(SUPPORT_OUTPUTDIR)/docs/$1.vardeps)
+ # Do not store debug level options in VARDEPS.
+ ifneq ($$(LOG_LEVEL), trace)
+ $1_OPTIONS += -quiet
+ else
+ $1_OPTIONS += -verbose
+ endif
+
$1_PACKAGE_DEPS := $$(call CacheFind, $$(wildcard $$(foreach p, \
$$(subst .,/,$$(strip $$($1_PACKAGES))), \
$$(addsuffix /$$p, $$(wildcard $$(JAVADOC_SOURCE_DIRS))))))