common/makefiles/MakeHelpers.gmk

changeset 478
2ba6f4da4bf3
parent 459
3156dff953b1
child 494
e64f2cb57d05
equal deleted inserted replaced
476:76844579fa4b 478:2ba6f4da4bf3
55 endef 55 endef
56 56
57 define ParseLogLevel 57 define ParseLogLevel
58 ifeq ($$(origin VERBOSE),undefined) 58 ifeq ($$(origin VERBOSE),undefined)
59 # Setup logging according to LOG (but only if VERBOSE is not given) 59 # Setup logging according to LOG (but only if VERBOSE is not given)
60
61 # If the "nofile" argument is given, act on it and strip it away
62 ifneq ($$(findstring nofile,$$(LOG)),)
63 # Reset the build log wrapper, regardless of other values
64 override BUILD_LOG_WRAPPER=
65 # COMMA is defined in spec.gmk, but that is not included yet
66 COMMA=,
67 # First try to remove ",nofile" if it exists
68 LOG_STRIPPED1=$$(subst $$(COMMA)nofile,,$$(LOG))
69 # Otherwise just remove "nofile"
70 LOG_STRIPPED2=$$(subst nofile,,$$(LOG_STRIPPED1))
71 # We might have ended up with a leading comma. Remove it
72 LOG_STRIPPED3=$$(strip $$(patsubst $$(COMMA)%,%,$$(LOG_STRIPPED2)))
73 override LOG:=$$(LOG_STRIPPED3)
74 endif
75
60 ifeq ($$(LOG),) 76 ifeq ($$(LOG),)
61 # Set LOG to "warn" as default if not set (and no VERBOSE given) 77 # Set LOG to "warn" as default if not set (and no VERBOSE given)
62 LOG=warn 78 override LOG=warn
63 endif 79 endif
64 ifeq ($$(LOG),warn) 80 ifeq ($$(LOG),warn)
65 VERBOSE=-s 81 VERBOSE=-s
66 else ifeq ($$(LOG),info) 82 else ifeq ($$(LOG),info)
67 VERBOSE= 83 VERBOSE=
180 define PrintEndMessage 196 define PrintEndMessage
181 @$(ECHO) "Finished building OpenJDK for target '$@'" 197 @$(ECHO) "Finished building OpenJDK for target '$@'"
182 $(call CheckEnvironment) 198 $(call CheckEnvironment)
183 endef 199 endef
184 200
201 # Cleans the component given as $1
202 define CleanComponent
203 @$(PRINTF) "Cleaning $1 build artifacts ..."
204 @($(CD) $(OUTPUT_ROOT) && $(RM) -r $1)
205 @$(PRINTF) " done\n"
206 endef
207
185 endif # _MAKEHELPERS_GMK 208 endif # _MAKEHELPERS_GMK

mercurial