make/common/JavaCompilation.gmk

Wed, 27 Apr 2016 01:39:08 +0800

author
aoqi
date
Wed, 27 Apr 2016 01:39:08 +0800
changeset 0
75a576e87639
child 1133
50aaf272884f
permissions
-rw-r--r--

Initial load
http://hg.openjdk.java.net/jdk8u/jdk8u/
changeset: 1170:d117f01bfb4f
tag: jdk8u25-b17

aoqi@0 1 #
aoqi@0 2 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
aoqi@0 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
aoqi@0 4 #
aoqi@0 5 # This code is free software; you can redistribute it and/or modify it
aoqi@0 6 # under the terms of the GNU General Public License version 2 only, as
aoqi@0 7 # published by the Free Software Foundation. Oracle designates this
aoqi@0 8 # particular file as subject to the "Classpath" exception as provided
aoqi@0 9 # by Oracle in the LICENSE file that accompanied this code.
aoqi@0 10 #
aoqi@0 11 # This code is distributed in the hope that it will be useful, but WITHOUT
aoqi@0 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
aoqi@0 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
aoqi@0 14 # version 2 for more details (a copy is included in the LICENSE file that
aoqi@0 15 # accompanied this code).
aoqi@0 16 #
aoqi@0 17 # You should have received a copy of the GNU General Public License version
aoqi@0 18 # 2 along with this work; if not, write to the Free Software Foundation,
aoqi@0 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
aoqi@0 20 #
aoqi@0 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
aoqi@0 22 # or visit www.oracle.com if you need additional information or have any
aoqi@0 23 # questions.
aoqi@0 24 #
aoqi@0 25
aoqi@0 26 # This makefile is much simpler now that it can use the smart javac wrapper
aoqi@0 27 # for dependency tracking between java packages and incremental compiles.
aoqi@0 28 # It could be even more simple if we added support for incremental jar updates
aoqi@0 29 # directly from the smart javac wrapper.
aoqi@0 30
aoqi@0 31 # Cleaning/copying properties here is not a good solution. The properties
aoqi@0 32 # should be cleaned/copied by a annotation processor in sjavac.
aoqi@0 33
aoqi@0 34 # When you read this source. Remember that $(sort ...) has the side effect
aoqi@0 35 # of removing duplicates. It is actually this side effect that is
aoqi@0 36 # desired whenever sort is used below!
aoqi@0 37
aoqi@0 38 ifeq (,$(_MAKEBASE_GMK))
aoqi@0 39 $(error You must include MakeBase.gmk prior to including JavaCompilation.gmk)
aoqi@0 40 endif
aoqi@0 41
aoqi@0 42 FALSE_FIND_PATTERN:=-name FILE_NAME_THAT_DOESNT_EXIST
aoqi@0 43
aoqi@0 44 define SetupJavaCompiler
aoqi@0 45 # param 1 is for example GENERATE_OLD_BYTECODE or GENERATE_NEW_JDKBYTECODE
aoqi@0 46 # This is the name of the compiler setup.
aoqi@0 47 # param 2-9 are named args.
aoqi@0 48 # JVM:=The jvm used to run the javac/javah command
aoqi@0 49 # JAVAC:=The javac jar and bootstrap classpath changes, or just bin/javac if JVM is left out
aoqi@0 50 # FLAGS:=Flags to be supplied to javac
aoqi@0 51 # SERVER_DIR:=Use a javac server (-XDserver) and store the server related files here
aoqi@0 52 # SERVER_JVM:=Use this JVM for the server. Defaults to the JVM above.
aoqi@0 53 $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
aoqi@0 54 $(call LogSetupMacroEntry,SetupJavaCompiler($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
aoqi@0 55 $(if $(16),$(error Internal makefile error: Too many arguments to SetupJavaCompiler, please update JavaCompilation.gmk))
aoqi@0 56
aoqi@0 57 # The port file contains the tcp/ip on which the server listens
aoqi@0 58 # and the cookie necessary to talk to the server.
aoqi@0 59 $1_SJAVAC_PORTFILE:=$$($1_SERVER_DIR)/server.port
aoqi@0 60 # You can use a different JVM to run the background javac server.
aoqi@0 61 ifeq ($$($1_SERVER_JVM),)
aoqi@0 62 # It defaults to the same JVM that is used to start the javac command.
aoqi@0 63 $1_SERVER_JVM:=$$($1_JVM)
aoqi@0 64 endif
aoqi@0 65 endef
aoqi@0 66
aoqi@0 67 define SetupArchive
aoqi@0 68 # param 1 is for example ARCHIVE_MYPACKAGE
aoqi@0 69 # param 2 are the dependecies
aoqi@0 70 # param 3,4,5,6,7,8,9 are named args.
aoqi@0 71 # SRCS:=List of directories in where to find files to add to archive
aoqi@0 72 # SUFFIXES:=File suffixes to include in jar
aoqi@0 73 # INCLUDES:=List of directories/packages in SRCS that should be included
aoqi@0 74 # EXCLUDES:=List of directories/packages in SRCS that should be excluded
aoqi@0 75 # EXCLUDE_FILES:=List of files in SRCS that should be excluded
aoqi@0 76 # EXTRA_FILES:=List of files in SRCS that should be included regardless of suffix match.
aoqi@0 77 # JAR:=Jar file to create
aoqi@0 78 # MANIFEST:=Optional manifest file template.
aoqi@0 79 # JARMAIN:=Optional main class to add to manifest
aoqi@0 80 # JARINDEX:=true means generate the index in the jar file.
aoqi@0 81 # SKIP_METAINF:=Set to prevent contents of an META-INF directory to be automatically
aoqi@0 82 # added to the archive.
aoqi@0 83 # EXTRA_MANIFEST_ATTR:=Extra attribute to add to manifest.
aoqi@0 84 # CHECK_COMPRESS_JAR Check the COMPRESS_JAR variable
aoqi@0 85
aoqi@0 86 # NOTE: $2 is dependencies, not a named argument!
aoqi@0 87 $(foreach i,3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
aoqi@0 88 $(call LogSetupMacroEntry,SetupArchive($1),<dependencies>,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
aoqi@0 89 $(if $(findstring $(LOG_LEVEL),trace), $(info *[2] <dependencies> = $(strip $2)))
aoqi@0 90 $(if $(16),$(error Internal makefile error: Too many arguments to SetupArchive, please update JavaCompilation.gmk))
aoqi@0 91
aoqi@0 92 $1_JARMAIN:=$(strip $$($1_JARMAIN))
aoqi@0 93 $1_JARNAME:=$$(notdir $$($1_JAR))
aoqi@0 94 $1_MANIFEST_FILE:=$$(dir $$($1_JAR))_the.$$($1_JARNAME)_manifest
aoqi@0 95 $1_DELETESS_FILE:=$$(dir $$($1_JAR))_the.$$($1_JARNAME)_deletess
aoqi@0 96 $1_DELETES_FILE:=$$(dir $$($1_JAR))_the.$$($1_JARNAME)_deletes
aoqi@0 97 $1_BIN:=$$(dir $$($1_JAR))
aoqi@0 98
aoqi@0 99 ifeq (,$$($1_SUFFIXES))
aoqi@0 100 # No suffix was set, default to classes.
aoqi@0 101 $1_SUFFIXES:=.class
aoqi@0 102 endif
aoqi@0 103 # Convert suffixes to a find expression
aoqi@0 104 $1_FIND_PATTERNS:=$(FALSE_FIND_PATTERN) $$(patsubst %,$(SPACE)-o$(SPACE)-name$(SPACE)$(DQUOTE)*%$(DQUOTE),$$($1_SUFFIXES))
aoqi@0 105 # On windows, a lot of includes/excludes risk making the command line too long, so
aoqi@0 106 # writing the grep patterns to files.
aoqi@0 107 ifneq (,$$($1_INCLUDES))
aoqi@0 108 $1_GREP_INCLUDE_PATTERNS:=$$(foreach src,$$($1_SRCS), \
aoqi@0 109 $$(addprefix $$(src)/,$$($1_INCLUDES)))
aoqi@0 110 # If there are a lot of include patterns, output to file to shorten command lines
aoqi@0 111 ifeq ($$(word 20,$$($1_GREP_INCLUDE_PATTERNS)),)
aoqi@0 112 $1_GREP_INCLUDES:=| $(GREP) $$(patsubst %,$(SPACE)-e$(SPACE)$(DQUOTE)%$(DQUOTE),$$($1_GREP_INCLUDE_PATTERNS))
aoqi@0 113 else
aoqi@0 114 $1_GREP_INCLUDE_OUTPUT:=$(RM) $$($1_BIN)/_the.$$($1_JARNAME)_include $$(NEWLINE) \
aoqi@0 115 $$(call ListPathsSafely,$1_GREP_INCLUDE_PATTERNS,\n, \
aoqi@0 116 >> $$($1_BIN)/_the.$$($1_JARNAME)_include)
aoqi@0 117 $1_GREP_INCLUDES:=| $(GREP) -f $$($1_BIN)/_the.$$($1_JARNAME)_include
aoqi@0 118 endif
aoqi@0 119 endif
aoqi@0 120 ifneq (,$$($1_EXCLUDES)$$($1_EXCLUDE_FILES))
aoqi@0 121 $1_GREP_EXCLUDE_PATTERNS:=$$(foreach src,$$($1_SRCS),$$(addprefix $$(src)/, \
aoqi@0 122 $$($1_EXCLUDES) $$($1_EXCLUDE_FILES)))
aoqi@0 123 # If there are a lot of include patterns, output to file to shorten command lines
aoqi@0 124 ifeq ($$(word 20,$$($1_GREP_EXCLUDE_PATTERNS)),)
aoqi@0 125 $1_GREP_EXCLUDES:=| $(GREP) -v $$(patsubst %,$(SPACE)-e$(SPACE)$(DQUOTE)%$(DQUOTE),$$($1_GREP_EXCLUDE_PATTERNS))
aoqi@0 126 else
aoqi@0 127 $1_GREP_EXCLUDE_OUTPUT=$(RM) $$($1_BIN)/_the.$$($1_JARNAME)_exclude $$(NEWLINE) \
aoqi@0 128 $$(call ListPathsSafely,$1_GREP_EXCLUDE_PATTERNS,\n, \
aoqi@0 129 >> $$($1_BIN)/_the.$$($1_JARNAME)_exclude)
aoqi@0 130 $1_GREP_EXCLUDES:=| $(GREP) -v -f $$($1_BIN)/_the.$$($1_JARNAME)_exclude
aoqi@0 131 endif
aoqi@0 132 endif
aoqi@0 133
aoqi@0 134 # Check if this jar needs to have its index generated.
aoqi@0 135 ifneq (,$$($1_JARINDEX))
aoqi@0 136 $1_JARINDEX = (cd $$(dir $$@) && $(JAR) -i $$(notdir $$@))
aoqi@0 137 else
aoqi@0 138 $1_JARINDEX = true
aoqi@0 139 endif
aoqi@0 140 # When this macro is run in the same makefile as the java compilation, dependencies are
aoqi@0 141 # transfered in make variables. When the macro is run in a different makefile than the
aoqi@0 142 # java compilation, the dependencies need to be found in the filesystem.
aoqi@0 143 ifneq (,$2)
aoqi@0 144 $1_DEPS:=$2
aoqi@0 145 else
aoqi@0 146 $1_DEPS:=$$(filter $$(addprefix %,$$($1_SUFFIXES)), \
aoqi@0 147 $$(call CacheFind,$$($1_SRCS)))
aoqi@0 148 ifneq (,$$($1_GREP_INCLUDE_PATTERNS))
aoqi@0 149 $1_DEPS:=$$(filter $$(addsuffix %,$$($1_GREP_INCLUDE_PATTERNS)),$$($1_DEPS))
aoqi@0 150 endif
aoqi@0 151 ifneq (,$$($1_GREP_EXCLUDE_PATTERNS))
aoqi@0 152 $1_DEPS:=$$(filter-out $$(addsuffix %,$$($1_GREP_EXCLUDE_PATTERNS)),$$($1_DEPS))
aoqi@0 153 endif
aoqi@0 154 # The subst of \ is needed because $ has to be escaped with \ in EXTRA_FILES for the command
aoqi@0 155 # lines, but not here for use in make dependencies.
aoqi@0 156 $1_DEPS+=$$(subst \,,$$(foreach src,$$($1_SRCS),$$(addprefix $$(src)/,$$($1_EXTRA_FILES))))
aoqi@0 157 ifeq (,$$($1_SKIP_METAINF))
aoqi@0 158 $1_DEPS+=$$(call CacheFind,$$(wildcard $$(addsuffix /META-INF,$$($1_SRCS))))
aoqi@0 159 endif
aoqi@0 160 endif
aoqi@0 161
aoqi@0 162 # Utility macros, to make the shell script receipt somewhat easier to decipher.
aoqi@0 163
aoqi@0 164 # The capture contents macro finds all files (matching the patterns, typically
aoqi@0 165 # .class and .prp) that are newer than the jar-file, ie the new content to be put into the jar.
aoqi@0 166 # NOTICE: please leave the parentheses space separated otherwise the AIX build will break!
aoqi@0 167 $1_CAPTURE_CONTENTS=$$(foreach src,$$($1_SRCS), \
aoqi@0 168 ( ( $(FIND) $$(src) -type f -a \( $$($1_FIND_PATTERNS) \) -a -newer $$@ $$($1_GREP_INCLUDES) \
aoqi@0 169 $$($1_GREP_EXCLUDES) | $(SED) 's|$$(src)/||g' && \
aoqi@0 170 $(ECHO) $$(subst $$(src)/,,$$($1_EXTRA_FILES) ) ) > \
aoqi@0 171 $$(src)/_the.$$($1_JARNAME)_contents) $$(NEWLINE) )
aoqi@0 172 # The capture metainf macro finds all files below the META-INF directory that are newer than the jar-file.
aoqi@0 173 ifeq (,$$($1_SKIP_METAINF))
aoqi@0 174 $1_CAPTURE_METAINF =$$(foreach src,$$($1_SRCS),($(FIND) $$(src)/META-INF -type f -a -newer $$@ 2> /dev/null | $(SED) 's|$$(src)/||g' >> $$(src)/_the.$$($1_JARNAME)_contents ) $$(NEWLINE))
aoqi@0 175 endif
aoqi@0 176 # The capture deletes macro finds all deleted files and concatenates them. The resulting file
aoqi@0 177 # tells us what to remove from the jar-file.
aoqi@0 178 $1_CAPTURE_DELETES=$$(foreach src,$$($1_SRCS),($(FIND) $$(src) -name _the.package.deleted -newer $$@ -exec $(SED) 's|$$(src)||g' \{\} >> $$($1_DELETES_FILE) \;) $$(NEWLINE))
aoqi@0 179 # The update contents macro updates the jar file with the previously capture contents.
aoqi@0 180 # Use 'wc -w' to see if the contents file is empty.
aoqi@0 181 $1_UPDATE_CONTENTS=$$(foreach src,$$($1_SRCS), \
aoqi@0 182 (cd $$(src) && \
aoqi@0 183 if [ "`$(WC) -w _the.$$($1_JARNAME)_contents | $(AWK) '{ print $$$$1 }'`" -gt "0" ]; then \
aoqi@0 184 $(ECHO) " updating" `$(WC) -l _the.$$($1_JARNAME)_contents | $(AWK) '{ print $$$$1 }'` files && \
aoqi@0 185 $(JAR) $$($1_JAR_UPDATE_OPTIONS) $$@ @_the.$$($1_JARNAME)_contents; \
aoqi@0 186 fi) $$(NEWLINE))
aoqi@0 187 # The s-variants of the above macros are used when the jar is created from scratch.
aoqi@0 188 # NOTICE: please leave the parentheses space separated otherwise the AIX build will break!
aoqi@0 189 $1_SCAPTURE_CONTENTS=$$(foreach src,$$($1_SRCS), \
aoqi@0 190 ( ( $(FIND) $$(src) -type f -a \( $$($1_FIND_PATTERNS) \) $$($1_GREP_INCLUDES) \
aoqi@0 191 $$($1_GREP_EXCLUDES) | $(SED) 's|$$(src)/||g' && \
aoqi@0 192 $$(subst $$(src)/,,$(ECHO) $$($1_EXTRA_FILES) ) ) > \
aoqi@0 193 $$(src)/_the.$$($1_JARNAME)_contents) $$(NEWLINE) )
aoqi@0 194
aoqi@0 195 ifeq (,$$($1_SKIP_METAINF))
aoqi@0 196 $1_SCAPTURE_METAINF=$$(foreach src,$$($1_SRCS), \
aoqi@0 197 ($(FIND) $$(src)/META-INF -type f 2> /dev/null | $(SED) 's|$$(src)/||g' >> \
aoqi@0 198 $$(src)/_the.$$($1_JARNAME)_contents) $$(NEWLINE))
aoqi@0 199 endif
aoqi@0 200 $1_SUPDATE_CONTENTS=$$(foreach src,$$($1_SRCS), \
aoqi@0 201 (cd $$(src) && $(JAR) $$($1_JAR_UPDATE_OPTIONS) $$@ @$$(src)/_the.$$($1_JARNAME)_contents) $$(NEWLINE))
aoqi@0 202
aoqi@0 203 # Use a slightly shorter name for logging, but with enough path to identify this jar.
aoqi@0 204 $1_NAME:=$$(subst $$(OUTPUT_ROOT)/,,$$($1_JAR))
aoqi@0 205
aoqi@0 206 ifneq (,$$($1_CHECK_COMPRESS_JAR))
aoqi@0 207 $1_JAR_CREATE_OPTIONS := c0fm
aoqi@0 208 $1_JAR_UPDATE_OPTIONS := u0f
aoqi@0 209 ifeq ($(COMPRESS_JARS), true)
aoqi@0 210 $1_JAR_CREATE_OPTIONS := cfm
aoqi@0 211 $1_JAR_UPDATE_OPTIONS := uf
aoqi@0 212 endif
aoqi@0 213 else
aoqi@0 214 $1_JAR_CREATE_OPTIONS := cfm
aoqi@0 215 $1_JAR_UPDATE_OPTIONS := uf
aoqi@0 216 endif
aoqi@0 217
aoqi@0 218 # Here is the rule that creates/updates the jar file.
aoqi@0 219 $$($1_JAR) : $$($1_DEPS)
aoqi@0 220 $(MKDIR) -p $$($1_BIN)
aoqi@0 221 $$($1_GREP_INCLUDE_OUTPUT)
aoqi@0 222 $$($1_GREP_EXCLUDE_OUTPUT)
aoqi@0 223 $$(if $$($1_MANIFEST), \
aoqi@0 224 $(SED) -e "s#@@RELEASE@@#$(RELEASE)#" \
aoqi@0 225 -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" $$($1_MANIFEST) > $$($1_MANIFEST_FILE) \
aoqi@0 226 , \
aoqi@0 227 $(RM) $$($1_MANIFEST_FILE) && $(TOUCH) $$($1_MANIFEST_FILE))
aoqi@0 228 $$(if $$($1_JARMAIN),$(ECHO) "Main-Class: $$(strip $$($1_JARMAIN))" >> $$($1_MANIFEST_FILE))
aoqi@0 229 $$(if $$($1_EXTRA_MANIFEST_ATTR),$(PRINTF) "$$($1_EXTRA_MANIFEST_ATTR)\n" >> $$($1_MANIFEST_FILE))
aoqi@0 230 $$(if $$(wildcard $$@), \
aoqi@0 231 $(ECHO) Modifying $$($1_NAME) $$(NEWLINE) \
aoqi@0 232 $$($1_CAPTURE_CONTENTS) \
aoqi@0 233 $$($1_CAPTURE_METAINF) \
aoqi@0 234 $(RM) $$($1_DELETES_FILE) $$(NEWLINE) \
aoqi@0 235 $$($1_CAPTURE_DELETES) \
aoqi@0 236 $(CAT) $$($1_DELETES_FILE) > $$($1_DELETESS_FILE) $$(NEWLINE) \
aoqi@0 237 if [ -s $$($1_DELETESS_FILE) ]; then \
aoqi@0 238 $(ECHO) " deleting" `$(WC) -l $$($1_DELETESS_FILE) | $(AWK) '{ print $$$$1 }'` files && \
aoqi@0 239 $(ZIP) -q -d $$@ `$(CAT) $$($1_DELETESS_FILE)` ; \
aoqi@0 240 fi $$(NEWLINE) \
aoqi@0 241 $$($1_UPDATE_CONTENTS) true $$(NEWLINE) \
aoqi@0 242 $$($1_JARINDEX) && true \
aoqi@0 243 , \
aoqi@0 244 $(ECHO) Creating $$($1_NAME) && $(JAR) $$($1_JAR_CREATE_OPTIONS) $$@ $$($1_MANIFEST_FILE) $$(NEWLINE) \
aoqi@0 245 $$($1_SCAPTURE_CONTENTS) \
aoqi@0 246 $$($1_SCAPTURE_METAINF) \
aoqi@0 247 $$($1_SUPDATE_CONTENTS) \
aoqi@0 248 $$($1_JARINDEX) && true )
aoqi@0 249
aoqi@0 250 endef
aoqi@0 251
aoqi@0 252 define SetupZipArchive
aoqi@0 253 # param 1 is for example ZIP_MYSOURCE
aoqi@0 254 # param 2,3,4,5,6,7,8,9 are named args.
aoqi@0 255 # SRC,ZIP,INCLUDES,INCLUDE_FILES,EXCLUDES,EXCLUDE_FILES,SUFFIXES,EXTRA_DEPS
aoqi@0 256 $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
aoqi@0 257 $(call LogSetupMacroEntry,SetupZipArchive($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
aoqi@0 258 $(if $(16),$(error Internal makefile error: Too many arguments to SetupZipArchive, please update JavaCompilation.gmk))
aoqi@0 259
aoqi@0 260 # To avoid running find over too large sets of files, which causes make to crash
aoqi@0 261 # on some configurations (cygwin), use INCLUDES and INCLUDE_FILES to build a set
aoqi@0 262 # of directories to run find in, if available.
aoqi@0 263 ifneq ($$($1_INCLUDES)$$($1_INCLUDE_FILES),)
aoqi@0 264 $1_FIND_LIST := $$(wildcard $$(foreach i,$$($1_SRC), \
aoqi@0 265 $$(addprefix $$i/,$$($1_INCLUDES) $$($1_INCLUDE_FILES))))
aoqi@0 266 else
aoqi@0 267 $1_FIND_LIST := $$($1_SRC)
aoqi@0 268 endif
aoqi@0 269
aoqi@0 270 # Find all files in the source tree.
aoqi@0 271 $1_ALL_SRCS := $$(call not-containing,_the.,$$(call CacheFind,$$($1_FIND_LIST)))
aoqi@0 272
aoqi@0 273 # Filter on suffixes if set
aoqi@0 274 ifneq ($$($1_SUFFIXES),)
aoqi@0 275 $1_ALL_SRCS := $$(filter $$(addprefix %, $$($1_SUFFIXES)), $$($1_ALL_SRCS))
aoqi@0 276 endif
aoqi@0 277
aoqi@0 278 ifneq ($$($1_INCLUDES),)
aoqi@0 279 ifneq ($$($1_SUFFIXES),)
aoqi@0 280 $1_ZIP_INCLUDES := $$(foreach s,$$($1_SUFFIXES), \
aoqi@0 281 $$(addprefix -i$(SPACE)$(DQUOTE),$$(addsuffix /*$$s$(DQUOTE),$$($1_INCLUDES))))
aoqi@0 282 else
aoqi@0 283 $1_ZIP_INCLUDES := $$(addprefix -i$(SPACE)$(DQUOTE),$$(addsuffix /*$(DQUOTE),$$($1_INCLUDES)))
aoqi@0 284 endif
aoqi@0 285 endif
aoqi@0 286 ifneq ($$($1_INCLUDE_FILES),)
aoqi@0 287 $1_ZIP_INCLUDES += $$(addprefix -i$(SPACE),$$($1_INCLUDE_FILES))
aoqi@0 288 endif
aoqi@0 289 ifneq ($$($1_EXCLUDES),)
aoqi@0 290 $1_SRC_EXCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_EXCLUDES))))
aoqi@0 291 $1_ZIP_EXCLUDES := $$(addprefix -x$(SPACE)$(DQUOTE),$$(addsuffix /*$(DQUOTE),$$($1_EXCLUDES)))
aoqi@0 292 $1_ALL_SRCS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_ALL_SRCS))
aoqi@0 293 endif
aoqi@0 294
aoqi@0 295 # Use a slightly shorter name for logging, but with enough path to identify this zip.
aoqi@0 296 $1_NAME:=$$(subst $$(OUTPUT_ROOT)/,,$$($1_ZIP))
aoqi@0 297
aoqi@0 298 # Now $1_ALL_SRCS should contain all sources that are going to be put into the zip.
aoqi@0 299 # I.e. the zip -i and -x options should match the filtering done in the makefile.
aoqi@0 300 # Explicitly excluded files can be given with absolute path. The patsubst solution
aoqi@0 301 # isn't perfect but the likelyhood of an absolute path to match something in a src
aoqi@0 302 # dir is very small.
aoqi@0 303 # If zip has nothing to do, it returns 12 and would fail the build. Check for 12
aoqi@0 304 # and only fail if it's not.
aoqi@0 305 $$($1_ZIP) : $$($1_ALL_SRCS) $$($1_EXTRA_DEPS)
aoqi@0 306 $(MKDIR) -p $$(@D)
aoqi@0 307 $(ECHO) Updating $$($1_NAME)
aoqi@0 308 $$(foreach i,$$($1_SRC),(cd $$i && $(ZIP) -qru $$@ . $$($1_ZIP_INCLUDES) $$($1_ZIP_EXCLUDES) -x \*_the.\* $$(addprefix -x$(SPACE),$$(patsubst $$i/%,%,$$($1_EXCLUDE_FILES))) || test "$$$$?" = "12" )$$(NEWLINE)) true
aoqi@0 309 $(TOUCH) $$@
aoqi@0 310 endef
aoqi@0 311
aoqi@0 312 define add_file_to_copy
aoqi@0 313 # param 1 = BUILD_MYPACKAGE
aoqi@0 314 # parma 2 = The source file to copy.
aoqi@0 315 $2_TARGET:=$2
aoqi@0 316 # Remove the source prefix.
aoqi@0 317 $$(foreach i,$$($1_SRC),$$(eval $$(call remove_string,$$i,$2_TARGET)))
aoqi@0 318 # Now we can setup the depency that will trigger the copying.
aoqi@0 319 $$($1_BIN)$$($2_TARGET) : $2
aoqi@0 320 $(MKDIR) -p $$(@D)
aoqi@0 321 $(CP) $$< $$@
aoqi@0 322 $(CHMOD) -f ug+w $$@
aoqi@0 323
aoqi@0 324 # And do not forget this target
aoqi@0 325 $1_ALL_COPY_TARGETS += $$($1_BIN)$$($2_TARGET)
aoqi@0 326 endef
aoqi@0 327
aoqi@0 328
aoqi@0 329 # This macro is used only for properties files that are to be
aoqi@0 330 # copied over to the classes directory in cleaned form:
aoqi@0 331 # Previously this was inconsistently done in different repositories.
aoqi@0 332 # This is the new clean standard. Though it is to be superseded by
aoqi@0 333 # a standard annotation processor from with sjavac.
aoqi@0 334 define add_file_to_copy_and_clean
aoqi@0 335 # param 1 = BUILD_MYPACKAGE
aoqi@0 336 # parma 2 = The source file to copy and clean.
aoqi@0 337 $2_TARGET:=$2
aoqi@0 338 # Remove the source prefix.
aoqi@0 339 $$(foreach i,$$($1_SRC),$$(eval $$(call remove_string,$$i,$2_TARGET)))
aoqi@0 340 # Now we can setup the depency that will trigger the copying.
aoqi@0 341 $$($1_BIN)$$($2_TARGET) : $2
aoqi@0 342 $(MKDIR) -p $$(@D)
aoqi@0 343 $(CAT) $$< | $(SED) -e 's/\([^\\]\):/\1\\:/g' -e 's/\([^\\]\)=/\1\\=/g' -e 's/#.*/#/g' \
aoqi@0 344 | $(SED) -f "$(SRC_ROOT)/make/common/support/unicode2x.sed" \
aoqi@0 345 | $(SED) -e '/^#/d' -e '/^$$$$/d' \
aoqi@0 346 -e :a -e '/\\$$$$/N; s/\\\n//; ta' \
aoqi@0 347 -e 's/^[ \t]*//;s/[ \t]*$$$$//' \
aoqi@0 348 -e 's/\\=/=/' | LANG=C $(SORT) > $$@
aoqi@0 349 $(CHMOD) -f ug+w $$@
aoqi@0 350
aoqi@0 351 # And do not forget this target
aoqi@0 352 $1_ALL_COPY_CLEAN_TARGETS += $$($1_BIN)$$($2_TARGET)
aoqi@0 353 endef
aoqi@0 354
aoqi@0 355 define remove_string
aoqi@0 356 $2 := $$(subst $1,,$$($2))
aoqi@0 357 endef
aoqi@0 358
aoqi@0 359 define replace_space_with_pathsep
aoqi@0 360 $1:=$(subst $(SPACE),$(PATH_SEP),$(strip $(patsubst %,%,$2)))
aoqi@0 361 endef
aoqi@0 362
aoqi@0 363 define SetupJavaCompilation
aoqi@0 364 # param 1 is for example BUILD_MYPACKAGE
aoqi@0 365 # param 2,3,4,5,6,7,8 are named args.
aoqi@0 366 # SETUP:=must point to a previously setup java compiler, for example: SETUP:=BOOTJAVAC
aoqi@0 367 # JVM:=path to ..bin/java
aoqi@0 368 # ADD_JAVAC_FLAGS:=javac flags to append to the default ones.
aoqi@0 369 # SRC:=one or more directories to search for sources
aoqi@0 370 # BIN:=store classes here
aoqi@0 371 # INCLUDES:=myapp.foo means will only compile java files in myapp.foo or any of its sub-packages.
aoqi@0 372 # EXCLUDES:=myapp.foo means will do not compile java files in myapp.foo or any of its sub-packages.
aoqi@0 373 # COPY:=.prp means copy all prp files to the corresponding package in BIN.
aoqi@0 374 # CLEAN:=.properties means copy and clean all properties file to the corresponding package in BIN.
aoqi@0 375 # COPY_FILES:=myapp/foo/setting.txt means copy this file over to the package myapp/foo
aoqi@0 376 # SRCZIP:=Create a src.zip based on the found sources and copied files.
aoqi@0 377 # INCLUDE_FILES:="com/sun/SolarisFoobar.java" means only compile this file!
aoqi@0 378 # EXCLUDE_FILES:="com/sun/SolarisFoobar.java" means do not compile this particular file!
aoqi@0 379 # "SolarisFoobar.java" means do not compile SolarisFoobar, wherever it is found.
aoqi@0 380 # JAVAC_SOURCE_PATH_OVERRIDE:=This forces an explicit -sourcepath to javac instead of the complete
aoqi@0 381 # source roots from SRC. This is sometimes needed when compiling specific subsets of the source.
aoqi@0 382 # HEADERS:=path to directory where all generated c-headers are written.
aoqi@0 383 # DEPENDS:=Extra dependecy
aoqi@0 384 $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
aoqi@0 385 $(call LogSetupMacroEntry,SetupJavaCompilation($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
aoqi@0 386 $(if $(16),$(error Internal makefile error: Too many arguments to SetupJavaCompilation, please update JavaCompilation.gmk))
aoqi@0 387
aoqi@0 388 # Extract the info from the java compiler setup.
aoqi@0 389 $1_JVM := $$($$($1_SETUP)_JVM)
aoqi@0 390 $1_JAVAC := $$($$($1_SETUP)_JAVAC)
aoqi@0 391 $1_FLAGS := $$($$($1_SETUP)_FLAGS) $(JAVAC_FLAGS) $$($1_ADD_JAVAC_FLAGS)
aoqi@0 392 ifeq ($$($1_JAVAC),)
aoqi@0 393 $$(error The Java compilation $1 refers to a non-existant java compiler setup $$($1_SETUP))
aoqi@0 394 endif
aoqi@0 395 $1_SJAVAC_PORTFILE := $$($$($1_SETUP)_SJAVAC_PORTFILE)
aoqi@0 396 $1_SERVER_JVM := $$($$($1_SETUP)_SERVER_JVM)
aoqi@0 397
aoqi@0 398 # Handle addons and overrides.
aoqi@0 399 $1_SRC:=$$(call ADD_SRCS,$$($1_SRC))
aoqi@0 400 # Make sure the dirs exist.
aoqi@0 401 $$(foreach d,$$($1_SRC), $$(if $$(wildcard $$d),,$$(error SRC specified to SetupJavaCompilation $1 contains missing directory $$d)))
aoqi@0 402 $$(eval $$(call MakeDir,$$($1_BIN)))
aoqi@0 403 # Find all files in the source trees.
aoqi@0 404 $1_ALL_SRCS += $$(filter-out $(OVR_SRCS),$$(call CacheFind,$$($1_SRC)))
aoqi@0 405 # Extract the java files.
aoqi@0 406 ifneq ($$($1_EXCLUDE_FILES),)
aoqi@0 407 $1_EXCLUDE_FILES_PATTERN:=$$(addprefix %,$$($1_EXCLUDE_FILES))
aoqi@0 408 endif
aoqi@0 409 $1_SRCS := $$(filter-out $$($1_EXCLUDE_FILES_PATTERN),$$(filter %.java,$$($1_ALL_SRCS)))
aoqi@0 410 ifneq ($$($1_INCLUDE_FILES),)
aoqi@0 411 $1_INCLUDE_FILES:=$$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$($1_INCLUDE_FILES)))
aoqi@0 412 $1_SRCS := $$(filter $$($1_INCLUDE_FILES), $$($1_SRCS))
aoqi@0 413 endif
aoqi@0 414
aoqi@0 415 # Now we have a list of all java files to compile: $$($1_SRCS)
aoqi@0 416
aoqi@0 417 # Create the corresponding smart javac wrapper command line.
aoqi@0 418 $1_SJAVAC_ARGS:=$$(addprefix -x ,$$(addsuffix .*,$$(subst /,.,$$($1_EXCLUDES)))) \
aoqi@0 419 $$(addprefix -i ,$$(addsuffix .*,$$(subst /,.,$$($1_INCLUDES)))) \
aoqi@0 420 $$(addprefix -xf *,$$(strip $$($1_EXCLUDE_FILES))) \
aoqi@0 421 $$(addprefix -if *,$$(strip $$($1_INCLUDE_FILES))) \
aoqi@0 422 -src "$$(subst $$(SPACE),$$(PATH_SEP),$$(strip $$($1_SRC)))"
aoqi@0 423
aoqi@0 424 # Prepend the source/bin path to the filter expressions.
aoqi@0 425 ifneq ($$($1_INCLUDES),)
aoqi@0 426 $1_SRC_INCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_INCLUDES))))
aoqi@0 427 $1_SRCS := $$(filter $$($1_SRC_INCLUDES),$$($1_SRCS))
aoqi@0 428 endif
aoqi@0 429 ifneq ($$($1_EXCLUDES),)
aoqi@0 430 $1_SRC_EXCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_EXCLUDES))))
aoqi@0 431 $1_SRCS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_SRCS))
aoqi@0 432 endif
aoqi@0 433
aoqi@0 434 # Find all files to be copied from source to bin.
aoqi@0 435 ifneq (,$$($1_COPY))
aoqi@0 436 # Search for all files to be copied.
aoqi@0 437 $1_ALL_COPIES := $$(filter $$(addprefix %,$$($1_COPY)),$$($1_ALL_SRCS))
aoqi@0 438 # Copy these explicitly
aoqi@0 439 $1_ALL_COPIES += $$($1_COPY_FILES)
aoqi@0 440 # Copy must also respect filters.
aoqi@0 441 ifneq (,$$($1_INCLUDES))
aoqi@0 442 $1_ALL_COPIES := $$(filter $$($1_SRC_INCLUDES),$$($1_ALL_COPIES))
aoqi@0 443 endif
aoqi@0 444 ifneq (,$$($1_EXCLUDES))
aoqi@0 445 $1_ALL_COPIES := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_ALL_COPIES))
aoqi@0 446 endif
aoqi@0 447 ifneq (,$$($1_EXCLUDE_FILES))
aoqi@0 448 $1_ALL_COPIES := $$(filter-out $$($1_EXCLUDE_FILES_PATTERN),$$($1_ALL_COPIES))
aoqi@0 449 endif
aoqi@0 450 # All files below META-INF are always copied.
aoqi@0 451 $1_ALL_COPIES += $$(filter $$(addsuffix /META-INF%,$$($1_SRC)),$$($1_ALL_SRCS))
aoqi@0 452 ifneq (,$$($1_ALL_COPIES))
aoqi@0 453 # Yep, there are files to be copied!
aoqi@0 454 $1_ALL_COPY_TARGETS:=
aoqi@0 455 $$(foreach i,$$($1_ALL_COPIES),$$(eval $$(call add_file_to_copy,$1,$$i)))
aoqi@0 456 # Now we can depend on $$($1_ALL_COPY_TARGETS) to copy all files!
aoqi@0 457 endif
aoqi@0 458 endif
aoqi@0 459
aoqi@0 460 # Find all property files to be copied and cleaned from source to bin.
aoqi@0 461 ifneq (,$$($1_CLEAN))
aoqi@0 462 # Search for all files to be copied.
aoqi@0 463 $1_ALL_CLEANS := $$(filter $$(addprefix %,$$($1_CLEAN)),$$($1_ALL_SRCS))
aoqi@0 464 # Copy and clean must also respect filters.
aoqi@0 465 ifneq (,$$($1_INCLUDES))
aoqi@0 466 $1_ALL_CLEANS := $$(filter $$($1_SRC_INCLUDES),$$($1_ALL_CLEANS))
aoqi@0 467 endif
aoqi@0 468 ifneq (,$$($1_EXCLUDES))
aoqi@0 469 $1_ALL_CLEANS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_ALL_CLEANS))
aoqi@0 470 endif
aoqi@0 471 ifneq (,$$($1_EXCLUDE_FILES))
aoqi@0 472 $1_ALL_CLEANS := $$(filter-out $$($1_EXCLUDE_FILES_PATTERN),$$($1_ALL_CLEANS))
aoqi@0 473 endif
aoqi@0 474 ifneq (,$$($1_ALL_CLEANS))
aoqi@0 475 # Yep, there are files to be copied and cleaned!
aoqi@0 476 $1_ALL_COPY_CLEAN_TARGETS:=
aoqi@0 477 $$(foreach i,$$($1_ALL_CLEANS),$$(eval $$(call add_file_to_copy_and_clean,$1,$$i)))
aoqi@0 478 # Now we can depend on $$($1_ALL_COPY_CLEAN_TARGETS) to copy all files!
aoqi@0 479 endif
aoqi@0 480 endif
aoqi@0 481
aoqi@0 482 # Prep the source paths.
aoqi@0 483 ifneq ($$($1_JAVAC_SOURCE_PATH_OVERRIDE),)
aoqi@0 484 $$(eval $$(call replace_space_with_pathsep,$1_SRCROOTSC,$$($1_JAVAC_SOURCE_PATH_OVERRIDE)))
aoqi@0 485 else
aoqi@0 486 $$(eval $$(call replace_space_with_pathsep,$1_SRCROOTSC,$$($1_SRC)))
aoqi@0 487 endif
aoqi@0 488
aoqi@0 489 # Create a sed expression to remove the source roots and to replace / with .
aoqi@0 490 # and remove .java at the end.
aoqi@0 491 $1_REWRITE_INTO_CLASSES:=$$(foreach i,$$($1_SRC),-e 's|$$i/||g') -e 's|/|.|g' -e 's|.java$$$$||g'
aoqi@0 492
aoqi@0 493 ifeq ($$($1_DISABLE_SJAVAC)x$$(ENABLE_SJAVAC),xyes)
aoqi@0 494 ifneq (,$$($1_HEADERS))
aoqi@0 495 $1_HEADERS_ARG := -h $$($1_HEADERS)
aoqi@0 496 endif
aoqi@0 497
aoqi@0 498 # Using sjavac to compile.
aoqi@0 499 $1 := $$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS) $$($1_BIN)/javac_state
aoqi@0 500
aoqi@0 501 # Create SJAVAC variable form JAVAC variable. Expects $1_JAVAC to be
aoqi@0 502 # "bootclasspathprepend -cp .../javac.jar com.sun.tools.javac.Main"
aoqi@0 503 # and javac is simply replaced with sjavac.
aoqi@0 504 $1_SJAVAC:=$$(subst com.sun.tools.javac.Main,com.sun.tools.sjavac.Main,$$($1_JAVAC))
aoqi@0 505
aoqi@0 506 # Set the $1_REMOTE to spawn a background javac server.
aoqi@0 507 $1_REMOTE:=--server:portfile=$$($1_SJAVAC_PORTFILE),id=$1,sjavac=$$(subst $$(SPACE),%20,$$(subst $$(COMMA),%2C,$$(strip $$($1_SERVER_JVM) $$($1_SJAVAC))))
aoqi@0 508
aoqi@0 509 $$($1_BIN)/javac_state: $$($1_SRCS) $$($1_DEPENDS)
aoqi@0 510 $(MKDIR) -p $$(@D)
aoqi@0 511 $$(call ListPathsSafely,$1_SRCS,\n, >> $$($1_BIN)/_the.$1_batch.tmp)
aoqi@0 512 $(ECHO) Compiling $1
aoqi@0 513 ($$($1_JVM) $$($1_SJAVAC) \
aoqi@0 514 $$($1_REMOTE) \
aoqi@0 515 -j $(JOBS) \
aoqi@0 516 --permit-unidentified-artifacts \
aoqi@0 517 --permit-sources-without-package \
aoqi@0 518 --compare-found-sources $$($1_BIN)/_the.$1_batch.tmp \
aoqi@0 519 --log=$(LOG_LEVEL) \
aoqi@0 520 $$($1_SJAVAC_ARGS) \
aoqi@0 521 $$($1_FLAGS) \
aoqi@0 522 $$($1_HEADERS_ARG) \
aoqi@0 523 -d $$($1_BIN) && \
aoqi@0 524 $(MV) $$($1_BIN)/_the.$1_batch.tmp $$($1_BIN)/_the.$1_batch)
aoqi@0 525 else
aoqi@0 526 # Using plain javac to batch compile everything.
aoqi@0 527 $1 := $$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS) $$($1_BIN)/_the.$1_batch
aoqi@0 528
aoqi@0 529 # When building in batch, put headers in a temp dir to filter out those that actually
aoqi@0 530 # changed before copying them to the real header dir.
aoqi@0 531 ifneq (,$$($1_HEADERS))
aoqi@0 532 $1_HEADERS_ARG := -h $$($1_HEADERS).$1.tmp
aoqi@0 533
aoqi@0 534 $$($1_HEADERS)/_the.$1_headers: $$($1_BIN)/_the.$1_batch
aoqi@0 535 $(MKDIR) -p $$(@D)
aoqi@0 536 for f in `ls $$($1_HEADERS).$1.tmp`; do \
aoqi@0 537 if [ ! -f "$$($1_HEADERS)/$$$$f" ] || [ "`$(DIFF) $$($1_HEADERS)/$$$$f $$($1_HEADERS).$1.tmp/$$$$f`" != "" ]; then \
aoqi@0 538 $(CP) -f $$($1_HEADERS).$1.tmp/$$$$f $$($1_HEADERS)/$$$$f; \
aoqi@0 539 fi; \
aoqi@0 540 done
aoqi@0 541 $(RM) -r $$($1_HEADERS).$1.tmp
aoqi@0 542 $(TOUCH) $$@
aoqi@0 543
aoqi@0 544 $1 += $$($1_HEADERS)/_the.$1_headers
aoqi@0 545 endif
aoqi@0 546
aoqi@0 547 # When not using sjavac, pass along all sources to javac using an @file.
aoqi@0 548 $$($1_BIN)/_the.$1_batch: $$($1_SRCS) $$($1_DEPENDS)
aoqi@0 549 $(MKDIR) -p $$(@D)
aoqi@0 550 $(RM) $$($1_BIN)/_the.$1_batch $$($1_BIN)/_the.$1_batch.tmp
aoqi@0 551 $$(call ListPathsSafely,$1_SRCS,\n, >> $$($1_BIN)/_the.$1_batch.tmp)
aoqi@0 552 $(ECHO) Compiling `$(WC) $$($1_BIN)/_the.$1_batch.tmp | $(TR) -s ' ' | $(CUT) -f 2 -d ' '` files for $1
aoqi@0 553 ($$($1_JVM) $$($1_JAVAC) $$($1_FLAGS) \
aoqi@0 554 -implicit:none -sourcepath "$$($1_SRCROOTSC)" \
aoqi@0 555 -d $$($1_BIN) $$($1_HEADERS_ARG) @$$($1_BIN)/_the.$1_batch.tmp && \
aoqi@0 556 $(MV) $$($1_BIN)/_the.$1_batch.tmp $$($1_BIN)/_the.$1_batch)
aoqi@0 557
aoqi@0 558 endif
aoqi@0 559
aoqi@0 560 # Check if a jar file was specified, then setup the rules for the jar.
aoqi@0 561 ifneq (,$$($1_JAR))
aoqi@0 562 # If no suffixes was explicitly set for this jar file.
aoqi@0 563 # Use class and the cleaned/copied properties file suffixes as the default
aoqi@0 564 # for the types of files to be put into the jar.
aoqi@0 565 ifeq (,$$($1_SUFFIXES))
aoqi@0 566 $1_SUFFIXES:=.class $$($1_CLEAN) $$($1_COPY)
aoqi@0 567 endif
aoqi@0 568
aoqi@0 569 $$(eval $$(call SetupArchive,ARCHIVE_$1,$$($1), \
aoqi@0 570 SRCS:=$$($1_BIN), \
aoqi@0 571 SUFFIXES:=$$($1_SUFFIXES), \
aoqi@0 572 EXCLUDE:=$$($1_EXCLUDES), \
aoqi@0 573 INCLUDES:=$$($1_INCLUDES), \
aoqi@0 574 EXTRA_FILES:=$$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS), \
aoqi@0 575 JAR:=$$($1_JAR), \
aoqi@0 576 JARMAIN:=$$($1_JARMAIN), \
aoqi@0 577 MANIFEST:=$$($1_MANIFEST), \
aoqi@0 578 EXTRA_MANIFEST_ATTR:=$$($1_EXTRA_MANIFEST_ATTR), \
aoqi@0 579 JARINDEX:=$$($1_JARINDEX), \
aoqi@0 580 HEADERS:=$$($1_HEADERS), \
aoqi@0 581 SETUP:=$$($1_SETUP)))
aoqi@0 582 endif
aoqi@0 583
aoqi@0 584 # Check if a srczip was specified, then setup the rules for the srczip.
aoqi@0 585 ifneq (,$$($1_SRCZIP))
aoqi@0 586 $$(eval $$(call SetupZipArchive,ARCHIVE_$1, \
aoqi@0 587 SRC:=$$($1_SRC), \
aoqi@0 588 ZIP:=$$($1_SRCZIP), \
aoqi@0 589 INCLUDES:=$$($1_INCLUDES), \
aoqi@0 590 EXCLUDES:=$$($1_EXCLUDES), \
aoqi@0 591 EXCLUDE_FILES:=$$($1_EXCLUDE_FILES)))
aoqi@0 592 endif
aoqi@0 593
aoqi@0 594 endef

mercurial