common/makefiles/JavaCompilation.gmk

changeset 840
6274d4cd22d3
parent 839
174a54ce39c4
child 852
77473affb9c0
child 859
17d195bd56fc
equal deleted inserted replaced
839:174a54ce39c4 840:6274d4cd22d3
84 # CHECK_COMPRESS_JAR Check the COMPRESS_JAR variable 84 # CHECK_COMPRESS_JAR Check the COMPRESS_JAR variable
85 85
86 # NOTE: $2 is dependencies, not a named argument! 86 # NOTE: $2 is dependencies, not a named argument!
87 $(foreach i,3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE)) 87 $(foreach i,3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
88 $(call LogSetupMacroEntry,SetupArchive($1),<dependencies>,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15)) 88 $(call LogSetupMacroEntry,SetupArchive($1),<dependencies>,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
89 $(if $(findstring $(LOG_LEVEL),debug trace), $(info *[2] <dependencies> = $(strip $2))) 89 $(if $(findstring $(LOG_LEVEL),trace), $(info *[2] <dependencies> = $(strip $2)))
90 $(if $(16),$(error Internal makefile error: Too many arguments to SetupArchive, please update JavaCompilation.gmk)) 90 $(if $(16),$(error Internal makefile error: Too many arguments to SetupArchive, please update JavaCompilation.gmk))
91 91
92 $1_JARMAIN:=$(strip $$($1_JARMAIN)) 92 $1_JARMAIN:=$(strip $$($1_JARMAIN))
93 $1_JARNAME:=$$(notdir $$($1_JAR)) 93 $1_JARNAME:=$$(notdir $$($1_JAR))
94 $1_MANIFEST_FILE:=$$(dir $$($1_JAR))_the.$$($1_JARNAME)_manifest 94 $1_MANIFEST_FILE:=$$(dir $$($1_JAR))_the.$$($1_JARNAME)_manifest
109 $$(addprefix $$(src)/,$$($1_INCLUDES))) 109 $$(addprefix $$(src)/,$$($1_INCLUDES)))
110 # If there are a lot of include patterns, output to file to shorten command lines 110 # If there are a lot of include patterns, output to file to shorten command lines
111 ifeq ($$(word 20,$$($1_GREP_INCLUDE_PATTERNS)),) 111 ifeq ($$(word 20,$$($1_GREP_INCLUDE_PATTERNS)),)
112 $1_GREP_INCLUDES:=| $(GREP) $$(patsubst %,$(SPACE)-e$(SPACE)$(DQUOTE)%$(DQUOTE),$$($1_GREP_INCLUDE_PATTERNS)) 112 $1_GREP_INCLUDES:=| $(GREP) $$(patsubst %,$(SPACE)-e$(SPACE)$(DQUOTE)%$(DQUOTE),$$($1_GREP_INCLUDE_PATTERNS))
113 else 113 else
114 $1_GREP_INCLUDE_OUTPUT:=$(RM) $$($1_BIN)/_the.$$($1_JARNAME)_include && \ 114 $1_GREP_INCLUDE_OUTPUT:=$(RM) $$($1_BIN)/_the.$$($1_JARNAME)_include $$(NEWLINE) \
115 $$(strip $$(call ListPathsSafely,$1_GREP_INCLUDE_PATTERNS,\n, \ 115 $$(call ListPathsSafely,$1_GREP_INCLUDE_PATTERNS,\n, \
116 >> $$($1_BIN)/_the.$$($1_JARNAME)_include)) 116 >> $$($1_BIN)/_the.$$($1_JARNAME)_include)
117 $1_GREP_INCLUDES:=| $(GREP) -f $$($1_BIN)/_the.$$($1_JARNAME)_include 117 $1_GREP_INCLUDES:=| $(GREP) -f $$($1_BIN)/_the.$$($1_JARNAME)_include
118 endif 118 endif
119 endif 119 endif
120 ifneq (,$$($1_EXCLUDES)$$($1_EXCLUDE_FILES)) 120 ifneq (,$$($1_EXCLUDES)$$($1_EXCLUDE_FILES))
121 $1_GREP_EXCLUDE_PATTERNS:=$$(foreach src,$$($1_SRCS),$$(addprefix $$(src)/, \ 121 $1_GREP_EXCLUDE_PATTERNS:=$$(foreach src,$$($1_SRCS),$$(addprefix $$(src)/, \
122 $$($1_EXCLUDES) $$($1_EXCLUDE_FILES))) 122 $$($1_EXCLUDES) $$($1_EXCLUDE_FILES)))
123 # If there are a lot of include patterns, output to file to shorten command lines 123 # If there are a lot of include patterns, output to file to shorten command lines
124 ifeq ($$(word 20,$$($1_GREP_EXCLUDE_PATTERNS)),) 124 ifeq ($$(word 20,$$($1_GREP_EXCLUDE_PATTERNS)),)
125 $1_GREP_EXCLUDES:=| $(GREP) -v $$(patsubst %,$(SPACE)-e$(SPACE)$(DQUOTE)%$(DQUOTE),$$($1_GREP_EXCLUDE_PATTERNS)) 125 $1_GREP_EXCLUDES:=| $(GREP) -v $$(patsubst %,$(SPACE)-e$(SPACE)$(DQUOTE)%$(DQUOTE),$$($1_GREP_EXCLUDE_PATTERNS))
126 else 126 else
127 $1_GREP_EXCLUDE_OUTPUT=$(RM) $$($1_BIN)/_the.$$($1_JARNAME)_exclude && \ 127 $1_GREP_EXCLUDE_OUTPUT=$(RM) $$($1_BIN)/_the.$$($1_JARNAME)_exclude $$(NEWLINE) \
128 $$(strip $$(call ListPathsSafely,$1_GREP_EXCLUDE_PATTERNS,\n, \ 128 $$(call ListPathsSafely,$1_GREP_EXCLUDE_PATTERNS,\n, \
129 >> $$($1_BIN)/_the.$$($1_JARNAME)_exclude)) 129 >> $$($1_BIN)/_the.$$($1_JARNAME)_exclude)
130 $1_GREP_EXCLUDES:=| $(GREP) -v -f $$($1_BIN)/_the.$$($1_JARNAME)_exclude 130 $1_GREP_EXCLUDES:=| $(GREP) -v -f $$($1_BIN)/_the.$$($1_JARNAME)_exclude
131 endif 131 endif
132 endif 132 endif
133 133
134 # Check if this jar needs to have its index generated. 134 # Check if this jar needs to have its index generated.

mercurial