jdk

Форк
0
/
Bundles.gmk 
522 строки · 19.2 Кб
1
#
2
# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
#
5
# This code is free software; you can redistribute it and/or modify it
6
# under the terms of the GNU General Public License version 2 only, as
7
# published by the Free Software Foundation.  Oracle designates this
8
# particular file as subject to the "Classpath" exception as provided
9
# by Oracle in the LICENSE file that accompanied this code.
10
#
11
# This code is distributed in the hope that it will be useful, but WITHOUT
12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14
# version 2 for more details (a copy is included in the LICENSE file that
15
# accompanied this code).
16
#
17
# You should have received a copy of the GNU General Public License version
18
# 2 along with this work; if not, write to the Free Software Foundation,
19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20
#
21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22
# or visit www.oracle.com if you need additional information or have any
23
# questions.
24
#
25

26
default: all
27

28
include $(SPEC)
29
include MakeBase.gmk
30

31
include CopyFiles.gmk
32
include MakeIO.gmk
33

34
PRODUCT_TARGETS :=
35
LEGACY_TARGETS :=
36
TEST_TARGETS :=
37
DOCS_TARGETS :=
38

39
# On Windows tar frequently complains that "file changed as we read it" for
40
# some random source files. This seems to be cause by anti virus scanners and
41
# is most likely safe to ignore. When it happens, tar returns '1'.
42
ifeq ($(call isBuildOs, windows), true)
43
  TAR_IGNORE_EXIT_VALUE := || test "$$$$?" = "1"
44
endif
45

46
# Hook to include the corresponding custom file, if present.
47
$(eval $(call IncludeCustomExtension, Bundles-pre.gmk))
48
################################################################################
49
# BUNDLE : Name of bundle to create
50
# FILES : Files in BASE_DIRS to add to bundle
51
# SPECIAL_INCLUDES : List of directories inside BASE_DIRS to look for additional
52
#     files in. These files will not get proper dependency handling. Use when
53
#     files or directories may contain spaces.
54
# BASE_DIRS : Base directories for the root dir in the bundle.
55
# SUBDIR : Optional name of root dir in bundle.
56
# OUTPUTDIR : Optionally override output dir
57
SetupBundleFile = $(NamedParamsMacroTemplate)
58
define SetupBundleFileBody
59

60
  $$(foreach d, $$($1_BASE_DIRS), \
61
    $$(eval $1_$$d_RELATIVE_FILES := $$$$(patsubst $$d/%, %, \
62
        $$$$(filter $$d/%, $$$$($1_FILES)))) \
63
    $$(eval $1_$$d_LIST_FILE := \
64
        $(SUPPORT_OUTPUTDIR)/bundles/_$1_$$$$(subst /,_,$$$$(patsubst $(OUTPUTDIR)/%,%,$$d)_files)) \
65
  )
66

67
  ifneq ($$(filter %.tar.gz, $$($1_BUNDLE_NAME)), )
68
    $1_TYPE := tar.gz
69
  else ifneq ($$(filter %.zip, $$($1_BUNDLE_NAME)), )
70
    $1_TYPE := zip
71
  else
72
    $$(error Unknown bundle type $$($1_BUNDLE_NAME))
73
  endif
74

75
  $$(call SetIfEmpty, $1_UNZIP_DEBUGINFO, false)
76

77
  $$(call SetIfEmpty, $1_OUTPUTDIR, $$(BUNDLES_OUTPUTDIR))
78

79
  $$($1_OUTPUTDIR)/$$($1_BUNDLE_NAME): $$($1_FILES)
80
	$$(call MakeTargetDir)
81
	$$(call LogWarn, Creating $$($1_BUNDLE_NAME))
82
        # If any of the files contain a space in the file name, FindFiles
83
        # will have replaced it with ?. Tar does not accept that so need to
84
        # switch it back.
85
	$$(foreach d, $$($1_BASE_DIRS), \
86
	  $$(eval $$(call ListPathsSafely, \
87
	      $1_$$d_RELATIVE_FILES, $$($1_$$d_LIST_FILE))) \
88
	  $$(CAT) $$($1_$$d_LIST_FILE) | $$(TR) '?' ' ' > $$($1_$$d_LIST_FILE).tmp \
89
	      && $(MV) $$($1_$$d_LIST_FILE).tmp $$($1_$$d_LIST_FILE) $$(NEWLINE) \
90
	)
91
        ifneq ($$($1_SPECIAL_INCLUDES), )
92
	  $$(foreach i, $$($1_SPECIAL_INCLUDES), \
93
	    $$(foreach d, $$($1_BASE_DIRS), \
94
	      ($(CD) $$d && $(FIND) $$i >> $$($1_$$d_LIST_FILE)) ; ))
95
        endif
96
        ifeq ($$($1_SUBDIR)-$$($1_TYPE)-$$($1_UNZIP_DEBUGINFO), .-zip-false)
97
          # If no subdir is specified, zip can be done directly from BASE_DIRS.
98
	  $$(foreach d, $$($1_BASE_DIRS), \
99
	    ( $(CD) $$d \
100
	    && $(ZIPEXE) -qru $$@ . -i@$$($1_$$d_LIST_FILE) \
101
	    || test "$$$$?" = "12" )$$(NEWLINE))
102
        else ifeq ($$($1_SUBDIR)-$$($1_TYPE)-$$($1_UNZIP_DEBUGINFO)-$$(words $$($1_BASE_DIRS)), \
103
            .-tar.gz-false-1)
104
          # If no subdir is specified and only one BASE_DIR, tar.gz can be done
105
          # directly from BASE_DIR.
106
	  $(CD) $$($1_BASE_DIRS) \
107
	      && ( $(TAR) cf - \
108
	          -$(TAR_INCLUDE_PARAM) $$($1_$$($1_BASE_DIRS)_LIST_FILE) \
109
	          $(TAR_IGNORE_EXIT_VALUE) ) \
110
	      | $(GZIP) > $$@
111
        else ifeq ($$($1_TYPE)-$(TAR_SUPPORTS_TRANSFORM)-$$($1_UNZIP_DEBUGINFO)-$$(words $$($1_BASE_DIRS)), \
112
            tar.gz-true-false-1)
113
          # If only one BASE_DIR, but with a SUBDIR set, tar.gz can use the
114
          # transform option to create bundle directly from the BASE_DIR.
115
	  $(CD) $$($1_BASE_DIRS) \
116
	      && ( $(TAR) cf - \
117
	          -$(TAR_INCLUDE_PARAM) $$($1_$$($1_BASE_DIRS)_LIST_FILE) \
118
	          $$(if $$($1_SUBDIR), --transform 's|^|$$($1_SUBDIR)/|S') \
119
	          $(TAR_IGNORE_EXIT_VALUE) ) \
120
	      | $(GZIP) > $$@
121
        else
122
          # In all other cases, need to copy all files into a temporary location
123
          # before creation bundle.
124
	  $(RM) -r $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR)
125
	  $(MKDIR) -p $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR)
126
	  $$(foreach d, $$($1_BASE_DIRS), \
127
	    ( $(CD) $$d \
128
	    && $(TAR) cf - -$(TAR_INCLUDE_PARAM) $$($1_$$d_LIST_FILE) \
129
	        $(TAR_IGNORE_EXIT_VALUE) ) \
130
	    | ( $(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) && $(TAR) xf - )$$(NEWLINE) )
131
          # Rename stripped pdb files
132
          ifeq ($(call isTargetOs, windows)+$(SHIP_DEBUG_SYMBOLS), true+public)
133
	    for f in `$(FIND) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) -name "*.stripped.pdb"`; do \
134
	      $(ECHO) Renaming $$$${f} to $$$${f%stripped.pdb}pdb $(LOG_INFO); \
135
	      $(MV) $$$${f} $$$${f%stripped.pdb}pdb; \
136
	    done
137
          endif
138
          # Unzip any zipped debuginfo files
139
          ifeq ($$($1_UNZIP_DEBUGINFO), true)
140
	    for f in `$(FIND) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) -name "*.diz"`; do \
141
	      $(CD) $$$${f%/*} && $(UNZIP) -q $$$${f} && $(RM) $$$${f}; \
142
	    done
143
          endif
144
          ifeq ($$($1_TYPE), tar.gz)
145
	    $(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1 && \
146
	    ( $(TAR) cf - \
147
	        $$(if $$($1_SUBDIR), $$($1_SUBDIR), .) $(TAR_IGNORE_EXIT_VALUE) ) \
148
	    | $(GZIP) > $$@
149
          else ifeq ($$($1_TYPE), zip)
150
	    $(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1 && $(ZIPEXE) -qr $$@ .
151
          endif
152
        endif
153

154
  $1 += $$($1_OUTPUTDIR)/$$($1_BUNDLE_NAME)
155

156
endef
157

158
################################################################################
159

160
# On Macosx, we bundle up the macosx specific images which already have the
161
# correct base directories.
162
ifeq ($(call isTargetOs, macosx)+$(DEBUG_LEVEL), true+release)
163
  JDK_IMAGE_DIR := $(JDK_MACOSX_BUNDLE_DIR)
164
  JRE_IMAGE_DIR := $(JRE_MACOSX_BUNDLE_DIR)
165
  JDK_IMAGE_HOMEDIR := $(JDK_MACOSX_CONTENTS_DIR)/Home
166
  JRE_IMAGE_HOMEDIR := $(JRE_MACOSX_CONTENTS_DIR)/Home
167
  JDK_BUNDLE_SUBDIR :=
168
  JRE_BUNDLE_SUBDIR :=
169
  # In certain situations, the JDK_IMAGE_DIR points to an image without the
170
  # the symbols and demos. If so, the symobls and demos can be found in a
171
  # separate image. These variables allow for overriding from a custom makefile.
172
  JDK_SYMBOLS_IMAGE_DIR ?= $(JDK_IMAGE_DIR)
173
  JDK_DEMOS_IMAGE_DIR ?= $(JDK_IMAGE_DIR)
174
  JDK_DEMOS_IMAGE_HOMEDIR ?= $(JDK_DEMOS_IMAGE_DIR)/$(JDK_MACOSX_CONTENTS_SUBDIR)/Home
175
else
176
  JDK_IMAGE_HOMEDIR := $(JDK_IMAGE_DIR)
177
  JRE_IMAGE_HOMEDIR := $(JRE_IMAGE_DIR)
178
  JDK_BUNDLE_SUBDIR := jdk-$(VERSION_NUMBER)
179
  JRE_BUNDLE_SUBDIR := jre-$(VERSION_NUMBER)
180
  ifneq ($(DEBUG_LEVEL), release)
181
    JDK_BUNDLE_SUBDIR := $(JDK_BUNDLE_SUBDIR)/$(DEBUG_LEVEL)
182
    JRE_BUNDLE_SUBDIR := $(JRE_BUNDLE_SUBDIR)/$(DEBUG_LEVEL)
183
  endif
184
  # In certain situations, the JDK_IMAGE_DIR points to an image without the
185
  # the symbols and demos. If so, the symobls and demos can be found in a
186
  # separate image. These variables allow for overriding from a custom makefile.
187
  JDK_SYMBOLS_IMAGE_DIR ?= $(JDK_IMAGE_DIR)
188
  JDK_DEMOS_IMAGE_DIR ?= $(JDK_IMAGE_DIR)
189
  JDK_DEMOS_IMAGE_HOMEDIR ?= $(JDK_DEMOS_IMAGE_DIR)
190
endif
191

192
################################################################################
193

194
ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
195

196
  SYMBOLS_EXCLUDE_PATTERN := %.debuginfo %.diz %.map
197

198
  # There may be files with spaces in the names, so use ShellFindFiles
199
  # explicitly.
200
  ALL_JDK_FILES := $(call ShellFindFiles, $(JDK_IMAGE_DIR))
201
  ifneq ($(JDK_IMAGE_DIR), $(JDK_SYMBOLS_IMAGE_DIR))
202
    ALL_JDK_SYMBOLS_FILES := $(call ShellFindFiles, $(JDK_SYMBOLS_IMAGE_DIR))
203
  else
204
    ALL_JDK_SYMBOLS_FILES := $(ALL_JDK_FILES)
205
  endif
206
  ifneq ($(JDK_IMAGE_DIR), $(JDK_DEMOS_IMAGE_DIR))
207
    ALL_JDK_DEMOS_FILES := $(call ShellFindFiles, $(JDK_DEMOS_IMAGE_DIR))
208
  else
209
    ALL_JDK_DEMOS_FILES := $(ALL_JDK_FILES)
210
  endif
211

212
  # Create special filter rules when dealing with unzipped .dSYM directories on
213
  # macosx
214
  ifeq ($(call isTargetOs, macosx), true)
215
    ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), false)
216
      JDK_SYMBOLS_EXCLUDE_PATTERN := $(addprefix %, \
217
          $(call containing, .dSYM/, $(patsubst $(JDK_IMAGE_DIR)/%, %, \
218
          $(ALL_JDK_SYMBOLS_FILES))))
219
    endif
220
  endif
221

222
  # Create special filter rules when dealing with debug symbols on windows
223
  ifeq ($(call isTargetOs, windows), true)
224
    ifeq ($(SHIP_DEBUG_SYMBOLS), )
225
      JDK_SYMBOLS_EXCLUDE_PATTERN := %.pdb
226
    else
227
      ifeq ($(SHIP_DEBUG_SYMBOLS), public)
228
        JDK_SYMBOLS_EXCLUDE_PATTERN := \
229
            $(filter-out \
230
                %.stripped.pdb, \
231
                $(filter %.pdb, $(ALL_JDK_FILES)) \
232
            )
233
      endif
234
    endif
235
  endif
236

237
  JDK_BUNDLE_FILES := \
238
      $(filter-out \
239
          $(JDK_SYMBOLS_EXCLUDE_PATTERN) \
240
          $(JDK_EXTRA_EXCLUDES) \
241
          $(SYMBOLS_EXCLUDE_PATTERN) \
242
          $(JDK_IMAGE_HOMEDIR)/demo/% \
243
          , \
244
          $(ALL_JDK_FILES) \
245
      )
246

247
  JDK_SYMBOLS_BUNDLE_FILES := \
248
      $(call FindFiles, $(SYMBOLS_IMAGE_DIR))
249

250
  TEST_DEMOS_BUNDLE_FILES := $(filter $(JDK_DEMOS_IMAGE_HOMEDIR)/demo/%, \
251
      $(ALL_JDK_DEMOS_FILES))
252

253
  ALL_JRE_FILES := $(call ShellFindFiles, $(JRE_IMAGE_DIR))
254

255
  # Create special filter rules when dealing with unzipped .dSYM directories on
256
  # macosx
257
  ifeq ($(OPENJDK_TARGET_OS), macosx)
258
    ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), false)
259
      JRE_SYMBOLS_EXCLUDE_PATTERN := $(addprefix %, \
260
          $(call containing, .dSYM/, $(patsubst $(JRE_IMAGE_DIR)/%, %, $(ALL_JRE_FILES))))
261
    endif
262
  endif
263

264
  # Create special filter rules when dealing with debug symbols on windows
265
  ifeq ($(call isTargetOs, windows), true)
266
    ifeq ($(SHIP_DEBUG_SYMBOLS), )
267
      JRE_SYMBOLS_EXCLUDE_PATTERN := %.pdb
268
    else
269
      ifeq ($(SHIP_DEBUG_SYMBOLS), public)
270
        JRE_SYMBOLS_EXCLUDE_PATTERN := \
271
            $(filter-out \
272
                %.stripped.pdb, \
273
                $(filter %.pdb, $(ALL_JRE_FILES)) \
274
            )
275
      endif
276
    endif
277
  endif
278

279
  JRE_BUNDLE_FILES := $(filter-out \
280
      $(JRE_SYMBOLS_EXCLUDE_PATTERN) \
281
      $(SYMBOLS_EXCLUDE_PATTERN), \
282
      $(ALL_JRE_FILES))
283

284
  ifeq ($(MACOSX_CODESIGN_MODE), hardened)
285
    # Macosx release build and code signing available.
286

287
    ################################################################################
288
    # JDK bundle
289
    $(eval $(call SetupCopyFiles, CREATE_JDK_BUNDLE_DIR_SIGNED, \
290
        SRC := $(JDK_IMAGE_DIR), \
291
        FILES := $(JDK_BUNDLE_FILES), \
292
        DEST := $(JDK_MACOSX_BUNDLE_DIR_SIGNED), \
293
    ))
294

295
    JDK_SIGNED_CODE_RESOURCES := \
296
        $(JDK_MACOSX_BUNDLE_DIR_SIGNED)/$(JDK_MACOSX_CONTENTS_SUBDIR)/_CodeSignature/CodeResources
297

298
    $(JDK_SIGNED_CODE_RESOURCES): $(CREATE_JDK_BUNDLE_DIR_SIGNED)
299
	$(call LogWarn, Signing $(JDK_BUNDLE_NAME))
300
	$(CODESIGN) -s "$(MACOSX_CODESIGN_IDENTITY)" \
301
	    --timestamp --options runtime --deep --force \
302
	    $(JDK_MACOSX_BUNDLE_DIR_SIGNED)/$(JDK_MACOSX_BUNDLE_TOP_DIR) $(LOG_DEBUG)
303
	$(TOUCH) $@
304

305
    $(eval $(call SetupBundleFile, BUILD_JDK_BUNDLE, \
306
        BUNDLE_NAME := $(JDK_BUNDLE_NAME), \
307
        FILES := \
308
            $(CREATE_JDK_BUNDLE_DIR_SIGNED) \
309
            $(JDK_SIGNED_CODE_RESOURCES), \
310
        BASE_DIRS := $(JDK_MACOSX_BUNDLE_DIR_SIGNED), \
311
        SUBDIR := $(JDK_BUNDLE_SUBDIR), \
312
    ))
313

314
    PRODUCT_TARGETS += $(BUILD_JDK_BUNDLE)
315

316
    ################################################################################
317
    # JRE bundle
318
    $(eval $(call SetupCopyFiles, CREATE_JRE_BUNDLE_DIR_SIGNED, \
319
        SRC := $(JRE_IMAGE_DIR), \
320
        FILES := $(JRE_BUNDLE_FILES), \
321
        DEST := $(JRE_MACOSX_BUNDLE_DIR_SIGNED), \
322
    ))
323

324
    JRE_SIGNED_CODE_RESOURCES := \
325
        $(JRE_MACOSX_BUNDLE_DIR_SIGNED)/$(JRE_MACOSX_CONTENTS_SUBDIR)/_CodeSignature/CodeResources
326

327
    $(JRE_SIGNED_CODE_RESOURCES): $(CREATE_JRE_BUNDLE_DIR_SIGNED)
328
	$(call LogWarn, Signing $(JRE_BUNDLE_NAME))
329
	$(CODESIGN) -s "$(MACOSX_CODESIGN_IDENTITY)" \
330
	    --timestamp --options runtime --deep --force \
331
	    $(JRE_MACOSX_BUNDLE_DIR_SIGNED)/$(JRE_MACOSX_BUNDLE_TOP_DIR) $(LOG_DEBUG)
332
	$(TOUCH) $@
333

334
    $(eval $(call SetupBundleFile, BUILD_JRE_BUNDLE, \
335
        BUNDLE_NAME := $(JRE_BUNDLE_NAME), \
336
        FILES := \
337
            $(CREATE_JRE_BUNDLE_DIR_SIGNED) \
338
            $(JRE_SIGNED_CODE_RESOURCES), \
339
        BASE_DIRS := $(JRE_MACOSX_BUNDLE_DIR_SIGNED), \
340
        SUBDIR := $(JRE_BUNDLE_SUBDIR), \
341
    ))
342

343
    LEGACY_TARGETS += $(BUILD_JRE_BUNDLE)
344
  else
345
    # Not a Macosx release build or code signing not available.
346
    $(eval $(call SetupBundleFile, BUILD_JDK_BUNDLE, \
347
        BUNDLE_NAME := $(JDK_BUNDLE_NAME), \
348
        FILES := $(JDK_BUNDLE_FILES), \
349
        SPECIAL_INCLUDES := $(JDK_SPECIAL_INCLUDES), \
350
        BASE_DIRS := $(JDK_IMAGE_DIR), \
351
        SUBDIR := $(JDK_BUNDLE_SUBDIR), \
352
    ))
353

354
    PRODUCT_TARGETS += $(BUILD_JDK_BUNDLE)
355

356
    $(eval $(call SetupBundleFile, BUILD_JRE_BUNDLE, \
357
        BUNDLE_NAME := $(JRE_BUNDLE_NAME), \
358
        FILES := $(JRE_BUNDLE_FILES), \
359
        BASE_DIRS := $(JRE_IMAGE_DIR), \
360
        SUBDIR := $(JRE_BUNDLE_SUBDIR), \
361
    ))
362

363
    LEGACY_TARGETS += $(BUILD_JRE_BUNDLE)
364
  endif
365

366
  ifeq ($(COPY_DEBUG_SYMBOLS), true)
367
    $(eval $(call SetupBundleFile, BUILD_JDK_SYMBOLS_BUNDLE, \
368
        BUNDLE_NAME := $(JDK_SYMBOLS_BUNDLE_NAME), \
369
        FILES := $(JDK_SYMBOLS_BUNDLE_FILES), \
370
        BASE_DIRS := $(SYMBOLS_IMAGE_DIR), \
371
        SUBDIR := $(JDK_BUNDLE_SUBDIR), \
372
        UNZIP_DEBUGINFO := true, \
373
    ))
374

375
    PRODUCT_TARGETS += $(BUILD_JDK_SYMBOLS_BUNDLE)
376
  endif
377

378
  # The demo bundle is only created to support client tests. Ideally it should
379
  # be built with the main test bundle, but since the prerequisites match
380
  # better with the product build, it makes more sense to keep it there for now.
381
  $(eval $(call SetupBundleFile, BUILD_TEST_DEMOS_BUNDLE, \
382
      BUNDLE_NAME := $(TEST_DEMOS_BUNDLE_NAME), \
383
      FILES := $(TEST_DEMOS_BUNDLE_FILES), \
384
      BASE_DIRS := $(JDK_DEMOS_IMAGE_DIR), \
385
      SUBDIR := $(JDK_BUNDLE_SUBDIR), \
386
  ))
387

388
  PRODUCT_TARGETS += $(BUILD_TEST_DEMOS_BUNDLE)
389
endif
390

391
################################################################################
392

393
ifneq ($(filter test-bundles, $(MAKECMDGOALS)), )
394
  TEST_BUNDLE_FILES := $(call FindFiles, $(TEST_IMAGE_DIR))
395

396
  $(eval $(call SetupBundleFile, BUILD_TEST_BUNDLE, \
397
      BUNDLE_NAME := $(TEST_BUNDLE_NAME), \
398
      FILES := $(TEST_BUNDLE_FILES), \
399
      BASE_DIRS := $(TEST_IMAGE_DIR), \
400
  ))
401

402
  TEST_TARGETS += $(BUILD_TEST_BUNDLE)
403
endif
404

405
################################################################################
406

407
ifneq ($(filter docs-jdk-bundles, $(MAKECMDGOALS)), )
408
  DOCS_JDK_BUNDLE_FILES := $(call FindFiles, $(DOCS_JDK_IMAGE_DIR))
409

410
  $(eval $(call SetupBundleFile, BUILD_DOCS_JDK_BUNDLE, \
411
      BUNDLE_NAME := $(DOCS_JDK_BUNDLE_NAME), \
412
      FILES := $(DOCS_JDK_BUNDLE_FILES), \
413
      BASE_DIRS := $(DOCS_JDK_IMAGE_DIR), \
414
      SUBDIR := docs, \
415
  ))
416

417
  DOCS_JDK_TARGETS += $(BUILD_DOCS_JDK_BUNDLE)
418
endif
419

420
ifneq ($(filter docs-javase-bundles, $(MAKECMDGOALS)), )
421
  DOCS_JAVASE_BUNDLE_FILES := $(call FindFiles, $(DOCS_JAVASE_IMAGE_DIR))
422

423
  $(eval $(call SetupBundleFile, BUILD_DOCS_JAVASE_BUNDLE, \
424
      BUNDLE_NAME := $(DOCS_JAVASE_BUNDLE_NAME), \
425
      FILES := $(DOCS_JAVASE_BUNDLE_FILES), \
426
      BASE_DIRS := $(DOCS_JAVASE_IMAGE_DIR), \
427
      SUBDIR := docs-javase, \
428
  ))
429

430
  DOCS_JAVASE_TARGETS += $(BUILD_DOCS_JAVASE_BUNDLE)
431
endif
432

433
ifneq ($(filter docs-reference-bundles, $(MAKECMDGOALS)), )
434
  DOCS_REFERENCE_BUNDLE_FILES := $(call FindFiles, $(DOCS_REFERENCE_IMAGE_DIR))
435

436
  $(eval $(call SetupBundleFile, BUILD_DOCS_REFERENCE_BUNDLE, \
437
      BUNDLE_NAME := $(DOCS_REFERENCE_BUNDLE_NAME), \
438
      FILES := $(DOCS_REFERENCE_BUNDLE_FILES), \
439
      BASE_DIRS := $(DOCS_REFERENCE_IMAGE_DIR), \
440
      SUBDIR := docs-reference, \
441
  ))
442

443
  DOCS_REFERENCE_TARGETS += $(BUILD_DOCS_REFERENCE_BUNDLE)
444
endif
445

446
################################################################################
447

448
ifneq ($(filter jcov-bundles, $(MAKECMDGOALS)), )
449
  JCOV_BUNDLE_FILES := $(call FindFiles, $(JCOV_IMAGE_DIR))
450

451
  $(eval $(call SetupBundleFile, BUILD_JCOV_BUNDLE, \
452
      BUNDLE_NAME := $(JCOV_BUNDLE_NAME), \
453
      FILES := $(JCOV_BUNDLE_FILES), \
454
      BASE_DIRS := $(JCOV_IMAGE_DIR), \
455
      SUBDIR := jdk-$(VERSION_NUMBER), \
456
  ))
457

458
  JCOV_TARGETS += $(BUILD_JCOV_BUNDLE)
459
endif
460

461
################################################################################
462

463
ifneq ($(filter static-libs-bundles, $(MAKECMDGOALS)), )
464
  STATIC_LIBS_BUNDLE_FILES := $(call FindFiles, $(STATIC_LIBS_IMAGE_DIR))
465

466
  ifeq ($(OPENJDK_TARGET_OS)-$(DEBUG_LEVEL), macosx-release)
467
    STATIC_LIBS_BUNDLE_SUBDIR := $(JDK_MACOSX_CONTENTS_SUBDIR)/Home
468
  else
469
    STATIC_LIBS_BUNDLE_SUBDIR := $(JDK_BUNDLE_SUBDIR)
470
  endif
471

472
  $(eval $(call SetupBundleFile, BUILD_STATIC_LIBS_BUNDLE, \
473
      BUNDLE_NAME := $(STATIC_LIBS_BUNDLE_NAME), \
474
      FILES := $(STATIC_LIBS_BUNDLE_FILES), \
475
      BASE_DIRS := $(STATIC_LIBS_IMAGE_DIR), \
476
      SUBDIR := $(STATIC_LIBS_BUNDLE_SUBDIR), \
477
  ))
478

479
  STATIC_LIBS_TARGETS += $(BUILD_STATIC_LIBS_BUNDLE)
480
endif
481

482
################################################################################
483

484
ifneq ($(filter static-libs-graal-bundles, $(MAKECMDGOALS)), )
485
  STATIC_LIBS_GRAAL_BUNDLE_FILES := $(call FindFiles, $(STATIC_LIBS_GRAAL_IMAGE_DIR))
486

487
  ifeq ($(OPENJDK_TARGET_OS)-$(DEBUG_LEVEL), macosx-release)
488
    STATIC_LIBS_GRAAL_BUNDLE_SUBDIR := $(JDK_MACOSX_CONTENTS_SUBDIR)/Home
489
  else
490
    STATIC_LIBS_GRAAL_BUNDLE_SUBDIR := $(JDK_BUNDLE_SUBDIR)
491
  endif
492

493
  $(eval $(call SetupBundleFile, BUILD_STATIC_LIBS_GRAAL_BUNDLE, \
494
      BUNDLE_NAME := $(STATIC_LIBS_GRAAL_BUNDLE_NAME), \
495
      FILES := $(STATIC_LIBS_GRAAL_BUNDLE_FILES), \
496
      BASE_DIRS := $(STATIC_LIBS_GRAAL_IMAGE_DIR), \
497
      SUBDIR := $(STATIC_LIBS_GRAAL_BUNDLE_SUBDIR), \
498
  ))
499

500
  STATIC_LIBS_GRAAL_TARGETS += $(BUILD_STATIC_LIBS_GRAAL_BUNDLE)
501
endif
502

503
################################################################################
504

505
# Hook to include the corresponding custom file, if present.
506
$(eval $(call IncludeCustomExtension, Bundles.gmk))
507

508
################################################################################
509

510
product-bundles: $(PRODUCT_TARGETS)
511
legacy-bundles: $(LEGACY_TARGETS)
512
test-bundles: $(TEST_TARGETS)
513
docs-jdk-bundles: $(DOCS_JDK_TARGETS)
514
docs-javase-bundles: $(DOCS_JAVASE_TARGETS)
515
docs-reference-bundles: $(DOCS_REFERENCE_TARGETS)
516
static-libs-bundles: $(STATIC_LIBS_TARGETS)
517
static-libs-graal-bundles: $(STATIC_LIBS_GRAAL_TARGETS)
518
jcov-bundles: $(JCOV_TARGETS)
519

520
.PHONY: all default product-bundles test-bundles \
521
    docs-jdk-bundles docs-javase-bundles docs-reference-bundles \
522
    static-libs-bundles static-libs-graal-bundles jcov-bundles
523

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.