make/common/JarArchive.gmk
author dholmes
Thu, 01 Jun 2017 02:21:18 +0000
changeset 46511 4a5b7a2dd783
parent 42136 f872c8278074
child 47253 92fd0e04e0e1
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     1
#
41460
4d20b8cc49d4 8158181: Stop adding missing newline to manifest files
ihse
parents: 33438
diff changeset
     2
# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     4
#
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    10
#
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    15
# accompanied this code).
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    16
#
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    20
#
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    23
# questions.
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    24
#
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    25
33438
35cd6a1619df 8141333: Rename SetupArchive to SetupJarArchive
ihse
parents: 33437
diff changeset
    26
ifndef _JAR_ARCHIVE_GMK
35cd6a1619df 8141333: Rename SetupArchive to SetupJarArchive
ihse
parents: 33437
diff changeset
    27
_JAR_ARCHIVE_GMK := 1
25854
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
    28
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    29
ifeq (,$(_MAKEBASE_GMK))
33438
35cd6a1619df 8141333: Rename SetupArchive to SetupJarArchive
ihse
parents: 33437
diff changeset
    30
  $(error You must include MakeBase.gmk prior to including JarArchive.gmk)
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    31
endif
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    32
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    33
FALSE_FIND_PATTERN:=-name FILE_NAME_THAT_DOESNT_EXIST
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    34
27592
af7df0dd5ff7 8065911: Introduce EvalDebugWrapper for all Setup* macros
ihse
parents: 27591
diff changeset
    35
# Setup make rules for creating a jar archive.
af7df0dd5ff7 8065911: Introduce EvalDebugWrapper for all Setup* macros
ihse
parents: 27591
diff changeset
    36
#
af7df0dd5ff7 8065911: Introduce EvalDebugWrapper for all Setup* macros
ihse
parents: 27591
diff changeset
    37
# Parameter 1 is the name of the rule. This name is used as variable prefix,
af7df0dd5ff7 8065911: Introduce EvalDebugWrapper for all Setup* macros
ihse
parents: 27591
diff changeset
    38
# and the targets generated are listed in a variable by that name.
af7df0dd5ff7 8065911: Introduce EvalDebugWrapper for all Setup* macros
ihse
parents: 27591
diff changeset
    39
#
af7df0dd5ff7 8065911: Introduce EvalDebugWrapper for all Setup* macros
ihse
parents: 27591
diff changeset
    40
# Remaining parameters are named arguments. These include:
29312
f3f859137ce6 8074988: Reduce boilerplate in Setup* macro definitions
erikj
parents: 29174
diff changeset
    41
#   DEPENDENCIES:=List of dependencies for the jar target. If left empty,
f3f859137ce6 8074988: Reduce boilerplate in Setup* macro definitions
erikj
parents: 29174
diff changeset
    42
#       dependencies are calculated automatically from the source files found.
f3f859137ce6 8074988: Reduce boilerplate in Setup* macro definitions
erikj
parents: 29174
diff changeset
    43
#       For this to work, the source files must exist when the makefile is
f3f859137ce6 8074988: Reduce boilerplate in Setup* macro definitions
erikj
parents: 29174
diff changeset
    44
#       parsed.
27592
af7df0dd5ff7 8065911: Introduce EvalDebugWrapper for all Setup* macros
ihse
parents: 27591
diff changeset
    45
#   SRCS:=List of directories in where to find files to add to archive
af7df0dd5ff7 8065911: Introduce EvalDebugWrapper for all Setup* macros
ihse
parents: 27591
diff changeset
    46
#   SUFFIXES:=File suffixes to include in jar
af7df0dd5ff7 8065911: Introduce EvalDebugWrapper for all Setup* macros
ihse
parents: 27591
diff changeset
    47
#   INCLUDES:=List of directories/packages in SRCS that should be included
af7df0dd5ff7 8065911: Introduce EvalDebugWrapper for all Setup* macros
ihse
parents: 27591
diff changeset
    48
#   EXCLUDES:=List of directories/packages in SRCS that should be excluded
af7df0dd5ff7 8065911: Introduce EvalDebugWrapper for all Setup* macros
ihse
parents: 27591
diff changeset
    49
#   EXCLUDE_FILES:=List of files in SRCS that should be excluded
af7df0dd5ff7 8065911: Introduce EvalDebugWrapper for all Setup* macros
ihse
parents: 27591
diff changeset
    50
#   EXTRA_FILES:=List of files in SRCS that should be included regardless of suffix match.
af7df0dd5ff7 8065911: Introduce EvalDebugWrapper for all Setup* macros
ihse
parents: 27591
diff changeset
    51
#   JAR:=Jar file to create
af7df0dd5ff7 8065911: Introduce EvalDebugWrapper for all Setup* macros
ihse
parents: 27591
diff changeset
    52
#   MANIFEST:=Optional manifest file template.
af7df0dd5ff7 8065911: Introduce EvalDebugWrapper for all Setup* macros
ihse
parents: 27591
diff changeset
    53
#   JARMAIN:=Optional main class to add to manifest
af7df0dd5ff7 8065911: Introduce EvalDebugWrapper for all Setup* macros
ihse
parents: 27591
diff changeset
    54
#   JARINDEX:=true means generate the index in the jar file.
af7df0dd5ff7 8065911: Introduce EvalDebugWrapper for all Setup* macros
ihse
parents: 27591
diff changeset
    55
#   SKIP_METAINF:=Set to prevent contents of an META-INF directory to be automatically
af7df0dd5ff7 8065911: Introduce EvalDebugWrapper for all Setup* macros
ihse
parents: 27591
diff changeset
    56
#       added to the archive.
af7df0dd5ff7 8065911: Introduce EvalDebugWrapper for all Setup* macros
ihse
parents: 27591
diff changeset
    57
#   EXTRA_MANIFEST_ATTR:=Extra attribute to add to manifest.
af7df0dd5ff7 8065911: Introduce EvalDebugWrapper for all Setup* macros
ihse
parents: 27591
diff changeset
    58
#   CHECK_COMPRESS_JAR Check the COMPRESS_JAR variable
33438
35cd6a1619df 8141333: Rename SetupArchive to SetupJarArchive
ihse
parents: 33437
diff changeset
    59
SetupJarArchive = $(NamedParamsMacroTemplate)
35cd6a1619df 8141333: Rename SetupArchive to SetupJarArchive
ihse
parents: 33437
diff changeset
    60
define SetupJarArchiveBody
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    61
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    62
  $1_JARMAIN:=$(strip $$($1_JARMAIN))
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    63
  $1_JARNAME:=$$(notdir $$($1_JAR))
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    64
  $1_MANIFEST_FILE:=$$(dir $$($1_JAR))_the.$$($1_JARNAME)_manifest
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    65
  $1_DELETESS_FILE:=$$(dir $$($1_JAR))_the.$$($1_JARNAME)_deletess
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    66
  $1_DELETES_FILE:=$$(dir $$($1_JAR))_the.$$($1_JARNAME)_deletes
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    67
  $1_BIN:=$$(dir $$($1_JAR))
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    68
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    69
  ifeq (,$$($1_SUFFIXES))
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    70
    # No suffix was set, default to classes.
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    71
    $1_SUFFIXES:=.class
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    72
  endif
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    73
  # Convert suffixes to a find expression
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    74
  $1_FIND_PATTERNS:=$(FALSE_FIND_PATTERN) $$(patsubst %,$(SPACE)-o$(SPACE)-name$(SPACE)$(DQUOTE)*%$(DQUOTE),$$($1_SUFFIXES))
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    75
  # On windows, a lot of includes/excludes risk making the command line too long, so
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    76
  # writing the grep patterns to files.
28602
51c0dcf51b67 8065576: Enable pipefail in the shell used by make to better detect build errors
erikj
parents: 27866
diff changeset
    77
  # Grep returns 1 if nothing is matched. Do not fail the build for this.
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    78
  ifneq (,$$($1_INCLUDES))
25854
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
    79
    $1_GREP_INCLUDE_PATTERNS:=$$(call EscapeDollar, \
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
    80
        $$(foreach src,$$($1_SRCS), $$(addprefix $$(src)/,$$($1_INCLUDES))))
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    81
    # If there are a lot of include patterns, output to file to shorten command lines
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    82
    ifeq ($$(word 20,$$($1_GREP_INCLUDE_PATTERNS)),)
28602
51c0dcf51b67 8065576: Enable pipefail in the shell used by make to better detect build errors
erikj
parents: 27866
diff changeset
    83
      $1_GREP_INCLUDES:=| ( $(GREP) $$(patsubst %,$(SPACE)-e$(SPACE)$(DQUOTE)%$(DQUOTE),$$($1_GREP_INCLUDE_PATTERNS)) \
51c0dcf51b67 8065576: Enable pipefail in the shell used by make to better detect build errors
erikj
parents: 27866
diff changeset
    84
          || test "$$$$?" = "1" )
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    85
    else
32807
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32720
diff changeset
    86
      $1_GREP_INCLUDE_OUTPUT = \
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32720
diff changeset
    87
          $$(eval $$(call ListPathsSafely,$1_GREP_INCLUDE_PATTERNS, \
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32720
diff changeset
    88
              $$($1_BIN)/_the.$$($1_JARNAME)_include))
28602
51c0dcf51b67 8065576: Enable pipefail in the shell used by make to better detect build errors
erikj
parents: 27866
diff changeset
    89
      $1_GREP_INCLUDES:=| ( $(GREP) -f $$($1_BIN)/_the.$$($1_JARNAME)_include \
51c0dcf51b67 8065576: Enable pipefail in the shell used by make to better detect build errors
erikj
parents: 27866
diff changeset
    90
          || test "$$$$?" = "1" )
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    91
    endif
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    92
  endif
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    93
  ifneq (,$$($1_EXCLUDES)$$($1_EXCLUDE_FILES))
25854
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
    94
    $1_GREP_EXCLUDE_PATTERNS:=$$(call EscapeDollar, \
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
    95
        $$(foreach src,$$($1_SRCS),$$(addprefix $$(src)/, \
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
    96
        $$($1_EXCLUDES) $$($1_EXCLUDE_FILES))))
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    97
    # If there are a lot of include patterns, output to file to shorten command lines
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    98
    ifeq ($$(word 20,$$($1_GREP_EXCLUDE_PATTERNS)),)
28602
51c0dcf51b67 8065576: Enable pipefail in the shell used by make to better detect build errors
erikj
parents: 27866
diff changeset
    99
      $1_GREP_EXCLUDES:=| ( $(GREP) -v $$(patsubst %,$(SPACE)-e$(SPACE)$(DQUOTE)%$(DQUOTE),$$($1_GREP_EXCLUDE_PATTERNS)) \
51c0dcf51b67 8065576: Enable pipefail in the shell used by make to better detect build errors
erikj
parents: 27866
diff changeset
   100
          || test "$$$$?" = "1" )
12801
948f8ad66ee7 7170079: Adjustments to build-infra makefiles
erikj
parents: 12258
diff changeset
   101
    else
32807
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32720
diff changeset
   102
      $1_GREP_EXCLUDE_OUTPUT = \
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32720
diff changeset
   103
          $$(eval $$(call ListPathsSafely,$1_GREP_EXCLUDE_PATTERNS, \
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32720
diff changeset
   104
              $$($1_BIN)/_the.$$($1_JARNAME)_exclude))
28602
51c0dcf51b67 8065576: Enable pipefail in the shell used by make to better detect build errors
erikj
parents: 27866
diff changeset
   105
      $1_GREP_EXCLUDES:=| ( $(GREP) -v -f $$($1_BIN)/_the.$$($1_JARNAME)_exclude \
51c0dcf51b67 8065576: Enable pipefail in the shell used by make to better detect build errors
erikj
parents: 27866
diff changeset
   106
          || test "$$$$?" = "1" )
12801
948f8ad66ee7 7170079: Adjustments to build-infra makefiles
erikj
parents: 12258
diff changeset
   107
    endif
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   108
  endif
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   109
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   110
  # Check if this jar needs to have its index generated.
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   111
  ifneq (,$$($1_JARINDEX))
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   112
    $1_JARINDEX = (cd $$(dir $$@) && $(JAR) -i $$(notdir $$@))
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   113
  else
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   114
    $1_JARINDEX = true
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   115
  endif
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   116
  # When this macro is run in the same makefile as the java compilation, dependencies are
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   117
  # transfered in make variables. When the macro is run in a different makefile than the
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   118
  # java compilation, the dependencies need to be found in the filesystem.
32720
7e0e586a6817 8137014: Various improvements in build infrastructure
ihse
parents: 32717
diff changeset
   119
  $1_ORIG_DEPS := $$($1_DEPENDENCIES)
29312
f3f859137ce6 8074988: Reduce boilerplate in Setup* macro definitions
erikj
parents: 29174
diff changeset
   120
  ifeq ($$($1_DEPENDENCIES), )
27595
cff167b3bfa2 8065914: Various improvements and cleanup of build system
ihse
parents: 27592
diff changeset
   121
    # Add all source roots to the find cache since we are likely going to run find
23170
51e606ecede5 8037281: Improve CacheFind and enable on all platforms
erikj
parents: 23169
diff changeset
   122
    # on these more than once. The cache will only be updated if necessary.
51e606ecede5 8037281: Improve CacheFind and enable on all platforms
erikj
parents: 23169
diff changeset
   123
    $$(eval $$(call FillCacheFind, $$($1_FIND_LIST)))
29312
f3f859137ce6 8074988: Reduce boilerplate in Setup* macro definitions
erikj
parents: 29174
diff changeset
   124
    $1_DEPENDENCIES:=$$(filter $$(addprefix %,$$($1_SUFFIXES)), \
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   125
        $$(call CacheFind,$$($1_SRCS)))
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   126
    ifneq (,$$($1_GREP_INCLUDE_PATTERNS))
29312
f3f859137ce6 8074988: Reduce boilerplate in Setup* macro definitions
erikj
parents: 29174
diff changeset
   127
      $1_DEPENDENCIES:=$$(filter $$(addsuffix %,$$($1_GREP_INCLUDE_PATTERNS)),$$($1_DEPENDENCIES))
12801
948f8ad66ee7 7170079: Adjustments to build-infra makefiles
erikj
parents: 12258
diff changeset
   128
    endif
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   129
    ifneq (,$$($1_GREP_EXCLUDE_PATTERNS))
29312
f3f859137ce6 8074988: Reduce boilerplate in Setup* macro definitions
erikj
parents: 29174
diff changeset
   130
      $1_DEPENDENCIES:=$$(filter-out $$(addsuffix %,$$($1_GREP_EXCLUDE_PATTERNS)),$$($1_DEPENDENCIES))
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   131
    endif
25854
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
   132
    # Look for EXTRA_FILES in all SRCS dirs and as absolute paths.
29312
f3f859137ce6 8074988: Reduce boilerplate in Setup* macro definitions
erikj
parents: 29174
diff changeset
   133
    $1_DEPENDENCIES+=$$(wildcard $$(foreach src, $$($1_SRCS), \
25854
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
   134
        $$(addprefix $$(src)/, $$($1_EXTRA_FILES))) $$($1_EXTRA_FILES))
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   135
    ifeq (,$$($1_SKIP_METAINF))
29312
f3f859137ce6 8074988: Reduce boilerplate in Setup* macro definitions
erikj
parents: 29174
diff changeset
   136
      $1_DEPENDENCIES+=$$(call CacheFind,$$(wildcard $$(addsuffix /META-INF,$$($1_SRCS))))
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   137
    endif
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   138
  endif
23169
fdc2570ccbf4 8037238: JDK 9 images don't rebuild when access bridge jars rebuild
erikj
parents: 23167
diff changeset
   139
  # The dependency list should never be empty
29312
f3f859137ce6 8074988: Reduce boilerplate in Setup* macro definitions
erikj
parents: 29174
diff changeset
   140
  ifeq ($$(strip $$($1_DEPENDENCIES)), )
23169
fdc2570ccbf4 8037238: JDK 9 images don't rebuild when access bridge jars rebuild
erikj
parents: 23167
diff changeset
   141
    $$(warning No dependencies found for $1)
fdc2570ccbf4 8037238: JDK 9 images don't rebuild when access bridge jars rebuild
erikj
parents: 23167
diff changeset
   142
  endif
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   143
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   144
  # Utility macros, to make the shell script receipt somewhat easier to decipher.
12801
948f8ad66ee7 7170079: Adjustments to build-infra makefiles
erikj
parents: 12258
diff changeset
   145
25854
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
   146
  # Capture extra files is the same for both CAPTURE_CONTENTS and SCAPTURE_CONTENTS so
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
   147
  # only define it once to avoid duplication.
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
   148
  # The list of extra files might be long, so need to use ListPathsSafely to print
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
   149
  # them out to a separte file. Then process the contents of that file to rewrite
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
   150
  # into -C <dir> <file> lines.
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
   151
  # The EXTRA_FILES_RESOLVED varible must be set in the macro so that it's evaluated
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
   152
  # in the recipe when the files are guaranteed to exist.
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
   153
  $1_CAPTURE_EXTRA_FILES=\
32807
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32720
diff changeset
   154
      $$(eval $1_EXTRA_FILES_RESOLVED:=$$(call DoubleDollar, \
25854
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
   155
          $$(wildcard $$(foreach src, $$($1_SRCS), \
32807
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32720
diff changeset
   156
          $$(addprefix $$(src)/, $$($1_EXTRA_FILES))) $$($1_EXTRA_FILES)))) \
25854
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
   157
      $$(if $$($1_EXTRA_FILES_RESOLVED), \
32807
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32720
diff changeset
   158
        $$(eval $$(call ListPathsSafely,$1_EXTRA_FILES_RESOLVED, \
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32720
diff changeset
   159
            $$($1_BIN)/_the.$$($1_JARNAME)_contents.extra)) \
25854
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
   160
        $(SED) $$(foreach src,$$($1_SRCS), -e 's|$$(src)/|-C $$(src) |g') \
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
   161
            $$($1_BIN)/_the.$$($1_JARNAME)_contents.extra \
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
   162
            >> $$($1_BIN)/_the.$$($1_JARNAME)_contents $$(NEWLINE))
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
   163
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   164
  # The capture contents macro finds all files (matching the patterns, typically
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   165
  # .class and .prp) that are newer than the jar-file, ie the new content to be put into the jar.
22467
kvn
parents: 22466 21054
diff changeset
   166
  # NOTICE: please leave the parentheses space separated otherwise the AIX build will break!
25854
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
   167
  $1_CAPTURE_CONTENTS=\
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
   168
      $(RM) $$($1_BIN)/_the.$$($1_JARNAME)_contents $$(NEWLINE) \
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
   169
      $$(foreach src,$$($1_SRCS), \
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
   170
        $(FIND) $$(src) -type f -a \( $$($1_FIND_PATTERNS) \) -a -newer $$@ $$($1_GREP_INCLUDES) \
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
   171
          $$($1_GREP_EXCLUDES) | $(SED) 's|$$(src)/|-C $$(src) |g' \
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
   172
        >> $$($1_BIN)/_the.$$($1_JARNAME)_contents $$(NEWLINE)) \
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
   173
      $$($1_CAPTURE_EXTRA_FILES)
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
   174
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   175
  # The capture metainf macro finds all files below the META-INF directory that are newer than the jar-file.
28602
51c0dcf51b67 8065576: Enable pipefail in the shell used by make to better detect build errors
erikj
parents: 27866
diff changeset
   176
  # Find returns non zero if the META-INF dir does not exist, ignore this.
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   177
  ifeq (,$$($1_SKIP_METAINF))
25854
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
   178
    $1_CAPTURE_METAINF =$$(foreach src,$$($1_SRCS), \
28602
51c0dcf51b67 8065576: Enable pipefail in the shell used by make to better detect build errors
erikj
parents: 27866
diff changeset
   179
        ( ( $(FIND) $$(src)/META-INF -type f -a -newer $$@ 2> /dev/null || true ) \
51c0dcf51b67 8065576: Enable pipefail in the shell used by make to better detect build errors
erikj
parents: 27866
diff changeset
   180
            | $(SED) 's|$$(src)/|-C $$(src) |g' >> \
25854
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
   181
        $$($1_BIN)/_the.$$($1_JARNAME)_contents ) $$(NEWLINE) )
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   182
  endif
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   183
  # The capture deletes macro finds all deleted files and concatenates them. The resulting file
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   184
  # tells us what to remove from the jar-file.
25854
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
   185
  $1_CAPTURE_DELETES=$$(foreach src,$$($1_SRCS),($(FIND) $$(src) -name _the.package.deleted -newer $$@ \
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
   186
      -exec $(SED) 's|$$(src)||g' \{\} >> $$($1_DELETES_FILE) \;) $$(NEWLINE))
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   187
  # The update contents macro updates the jar file with the previously capture contents.
22467
kvn
parents: 22466 21054
diff changeset
   188
  # Use 'wc -w' to see if the contents file is empty.
25854
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
   189
  $1_UPDATE_CONTENTS=\
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
   190
      if [ "`$(WC) -l $$($1_BIN)/_the.$$($1_JARNAME)_contents | $(AWK) '{ print $$$$1 }'`" -gt "0" ]; then \
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
   191
        $(ECHO) "  updating" `$(WC) -l $$($1_BIN)/_the.$$($1_JARNAME)_contents | $(AWK) '{ print $$$$1 }'` files && \
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
   192
        $(JAR) $$($1_JAR_UPDATE_OPTIONS) $$@ @$$($1_BIN)/_the.$$($1_JARNAME)_contents; \
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
   193
      fi $$(NEWLINE)
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   194
  # The s-variants of the above macros are used when the jar is created from scratch.
22467
kvn
parents: 22466 21054
diff changeset
   195
  # NOTICE: please leave the parentheses space separated otherwise the AIX build will break!
25854
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
   196
  $1_SCAPTURE_CONTENTS=\
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
   197
      $(RM) $$($1_BIN)/_the.$$($1_JARNAME)_contents $$(NEWLINE) \
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
   198
      $$(foreach src,$$($1_SRCS), \
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
   199
        $(FIND) $$(src) -type f -a \( $$($1_FIND_PATTERNS) \) $$($1_GREP_INCLUDES) \
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
   200
            $$($1_GREP_EXCLUDES) | $(SED) 's|$$(src)/|-C $$(src) |g' \
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
   201
            >> $$($1_BIN)/_the.$$($1_JARNAME)_contents $$(NEWLINE)) \
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
   202
      $$($1_CAPTURE_EXTRA_FILES)
13132
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   203
28602
51c0dcf51b67 8065576: Enable pipefail in the shell used by make to better detect build errors
erikj
parents: 27866
diff changeset
   204
  # Find returns non zero if the META-INF dir does not exist, ignore this.
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   205
  ifeq (,$$($1_SKIP_METAINF))
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   206
    $1_SCAPTURE_METAINF=$$(foreach src,$$($1_SRCS), \
28602
51c0dcf51b67 8065576: Enable pipefail in the shell used by make to better detect build errors
erikj
parents: 27866
diff changeset
   207
        ( ( $(FIND) $$(src)/META-INF -type f 2> /dev/null || true ) \
51c0dcf51b67 8065576: Enable pipefail in the shell used by make to better detect build errors
erikj
parents: 27866
diff changeset
   208
            | $(SED) 's|$$(src)/|-C $$(src) |g' >> \
25854
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
   209
        $$($1_BIN)/_the.$$($1_JARNAME)_contents) $$(NEWLINE) )
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   210
  endif
25854
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
   211
  $1_SUPDATE_CONTENTS=$(JAR) $$($1_JAR_UPDATE_OPTIONS) $$@ @$$($1_BIN)/_the.$$($1_JARNAME)_contents $$(NEWLINE)
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   212
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   213
  # Use a slightly shorter name for logging, but with enough path to identify this jar.
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   214
  $1_NAME:=$$(subst $$(OUTPUT_ROOT)/,,$$($1_JAR))
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   215
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   216
  ifneq (,$$($1_CHECK_COMPRESS_JAR))
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   217
    $1_JAR_CREATE_OPTIONS := c0fm
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   218
    $1_JAR_UPDATE_OPTIONS := u0f
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   219
    ifeq ($(COMPRESS_JARS), true)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   220
      $1_JAR_CREATE_OPTIONS := cfm
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   221
      $1_JAR_UPDATE_OPTIONS := uf
13132
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   222
    endif
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   223
  else
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   224
    $1_JAR_CREATE_OPTIONS := cfm
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   225
    $1_JAR_UPDATE_OPTIONS := uf
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   226
  endif
13132
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   227
28600
09dd1740f176 8069261: Create make dependencies on make variable values
erikj
parents: 28360
diff changeset
   228
  # Include all variables of significance in the vardeps file
30534
5e259b665bbf 8080630: Stop doing sed manipulation of manifest files in SetupJavaCompilation
ihse
parents: 30095
diff changeset
   229
  $1_VARDEPS := $(JAR) $$($1_JAR_CREATE_OPTIONS) $$($1_MANIFEST) \
32720
7e0e586a6817 8137014: Various improvements in build infrastructure
ihse
parents: 32717
diff changeset
   230
      $$($1_JARMAIN) $$($1_EXTRA_MANIFEST_ATTR) $$($1_ORIG_DEPS) $$($1_SRCS) \
7e0e586a6817 8137014: Various improvements in build infrastructure
ihse
parents: 32717
diff changeset
   231
      $$($1_INCLUDES) $$($1_EXCLUDES) $$($1_EXCLUDE_FILES) $$($1_EXTRA_FILES)
28600
09dd1740f176 8069261: Create make dependencies on make variable values
erikj
parents: 28360
diff changeset
   232
  $1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, $$(dir $$($1_JAR))_the.$$($1_JARNAME).vardeps)
09dd1740f176 8069261: Create make dependencies on make variable values
erikj
parents: 28360
diff changeset
   233
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   234
  # Here is the rule that creates/updates the jar file.
29312
f3f859137ce6 8074988: Reduce boilerplate in Setup* macro definitions
erikj
parents: 29174
diff changeset
   235
  $$($1_JAR) : $$($1_DEPENDENCIES) $$($1_MANIFEST) $$($1_VARDEPS_FILE)
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   236
	$(MKDIR) -p $$($1_BIN)
15051
d32ad37472e6 8005540: build-infra: Improve incremental build speed on windows by caching find results
erikj
parents: 14613
diff changeset
   237
	$$($1_GREP_INCLUDE_OUTPUT)
d32ad37472e6 8005540: build-infra: Improve incremental build speed on windows by caching find results
erikj
parents: 14613
diff changeset
   238
	$$($1_GREP_EXCLUDE_OUTPUT)
28600
09dd1740f176 8069261: Create make dependencies on make variable values
erikj
parents: 28360
diff changeset
   239
        # If the vardeps file is part of the newer prereq list, it means that
09dd1740f176 8069261: Create make dependencies on make variable values
erikj
parents: 28360
diff changeset
   240
        # either the jar file does not exist, or we need to recreate it from
30095
0034766ccb09 8079344: Allow custom or platform specific java source to automatically override shared source
erikj
parents: 29442
diff changeset
   241
        # from scratch anyway since a simple update will not catch all the
28600
09dd1740f176 8069261: Create make dependencies on make variable values
erikj
parents: 28360
diff changeset
   242
        # potential changes.
09dd1740f176 8069261: Create make dependencies on make variable values
erikj
parents: 28360
diff changeset
   243
	$$(if $$(filter $$($1_VARDEPS_FILE) $$($1_MANIFEST), $$?), \
09dd1740f176 8069261: Create make dependencies on make variable values
erikj
parents: 28360
diff changeset
   244
	  $$(if $$($1_MANIFEST), \
41460
4d20b8cc49d4 8158181: Stop adding missing newline to manifest files
ihse
parents: 33438
diff changeset
   245
	    $(CP) $$($1_MANIFEST) $$($1_MANIFEST_FILE) $$(NEWLINE) \
28600
09dd1740f176 8069261: Create make dependencies on make variable values
erikj
parents: 28360
diff changeset
   246
	  , \
09dd1740f176 8069261: Create make dependencies on make variable values
erikj
parents: 28360
diff changeset
   247
	    $(RM) $$($1_MANIFEST_FILE) && $(TOUCH) $$($1_MANIFEST_FILE) $$(NEWLINE)) \
09dd1740f176 8069261: Create make dependencies on make variable values
erikj
parents: 28360
diff changeset
   248
	  $$(if $$($1_JARMAIN), \
09dd1740f176 8069261: Create make dependencies on make variable values
erikj
parents: 28360
diff changeset
   249
	    $(ECHO) "Main-Class: $$(strip $$($1_JARMAIN))" >> $$($1_MANIFEST_FILE) $$(NEWLINE)) \
09dd1740f176 8069261: Create make dependencies on make variable values
erikj
parents: 28360
diff changeset
   250
	  $$(if $$($1_EXTRA_MANIFEST_ATTR), \
09dd1740f176 8069261: Create make dependencies on make variable values
erikj
parents: 28360
diff changeset
   251
	    $(PRINTF) "$$($1_EXTRA_MANIFEST_ATTR)\n" >> $$($1_MANIFEST_FILE) $$(NEWLINE)) \
09dd1740f176 8069261: Create make dependencies on make variable values
erikj
parents: 28360
diff changeset
   252
	  $(ECHO) Creating $$($1_NAME) $$(NEWLINE) \
09dd1740f176 8069261: Create make dependencies on make variable values
erikj
parents: 28360
diff changeset
   253
	  $(JAR) $$($1_JAR_CREATE_OPTIONS) $$@ $$($1_MANIFEST_FILE) $$(NEWLINE) \
09dd1740f176 8069261: Create make dependencies on make variable values
erikj
parents: 28360
diff changeset
   254
	  $$($1_SCAPTURE_CONTENTS) \
09dd1740f176 8069261: Create make dependencies on make variable values
erikj
parents: 28360
diff changeset
   255
	  $$($1_SCAPTURE_METAINF) \
09dd1740f176 8069261: Create make dependencies on make variable values
erikj
parents: 28360
diff changeset
   256
	  $$($1_SUPDATE_CONTENTS) \
09dd1740f176 8069261: Create make dependencies on make variable values
erikj
parents: 28360
diff changeset
   257
	  $$($1_JARINDEX) && true \
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   258
	, \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   259
	  $(ECHO) Modifying $$($1_NAME) $$(NEWLINE) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   260
	  $$($1_CAPTURE_CONTENTS) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   261
	  $$($1_CAPTURE_METAINF) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   262
	  $(RM) $$($1_DELETES_FILE) $$(NEWLINE) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   263
	  $$($1_CAPTURE_DELETES) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   264
	  $(CAT) $$($1_DELETES_FILE) > $$($1_DELETESS_FILE) $$(NEWLINE) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   265
	  if [ -s $$($1_DELETESS_FILE) ]; then \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   266
	    $(ECHO) "  deleting" `$(WC) -l $$($1_DELETESS_FILE) | $(AWK) '{ print $$$$1 }'` files && \
42136
f872c8278074 8168037: Use ZIPEXE instead of ZIP to avoid clash with options for zip
ihse
parents: 41460
diff changeset
   267
	    $(ZIPEXE) -q -d $$@ `$(CAT) $$($1_DELETESS_FILE)` ; \
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   268
	  fi $$(NEWLINE) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   269
	  $$($1_UPDATE_CONTENTS) true $$(NEWLINE) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   270
	  $$($1_JARINDEX) && true )
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   271
22480
d1be923b168a 8026773: Failing compilation in Corba does not fail the build
erikj
parents: 22469
diff changeset
   272
  # Add jar to target list
d1be923b168a 8026773: Failing compilation in Corba does not fail the build
erikj
parents: 22469
diff changeset
   273
  $1 += $$($1_JAR)
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   274
endef
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   275
33438
35cd6a1619df 8141333: Rename SetupArchive to SetupJarArchive
ihse
parents: 33437
diff changeset
   276
endif # _JAR_ARCHIVE_GMK