Skip to content

Commit 3a4d5ff

Browse files
committedJan 20, 2025
8347996: JavaCompilation.gmk should not include ZipArchive.gmk
Reviewed-by: erikj
1 parent 0fbf10a commit 3a4d5ff

File tree

2 files changed

+11
-20
lines changed

2 files changed

+11
-20
lines changed
 

‎make/CompileDemos.gmk

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -132,12 +132,19 @@ define SetupBuildDemoBody
132132
JARMAIN := $$($1_MAIN_CLASS), \
133133
MANIFEST := $(DEMO_MANIFEST), \
134134
EXTRA_MANIFEST_ATTR := $$($1_EXTRA_MANIFEST_ATTR), \
135-
SRCZIP := $(SUPPORT_OUTPUTDIR)/demos/image/$$($1_DEMO_SUBDIR)/$1/src.zip, \
136135
EXCLUDE_FILES := $$($1_EXCLUDE_FILES), \
137136
DISABLED_WARNINGS := $$($1_DISABLED_WARNINGS), \
138137
))
139138

140139
$1 += $$(BUILD_DEMO_$1)
140+
141+
$$(eval $$(call SetupZipArchive, ZIP_SRC_DEMO_$1, \
142+
SRC := $$($1_MAIN_SRC) $$($1_EXTRA_SRC_DIR), \
143+
ZIP := $(SUPPORT_OUTPUTDIR)/demos/image/$$($1_DEMO_SUBDIR)/$1/src.zip, \
144+
EXCLUDE_FILES := $$($1_EXCLUDE_FILES), \
145+
))
146+
147+
$1 += $$(ZIP_SRC_DEMO_$1)
141148
endif
142149

143150
# Copy files. Sort is needed to remove duplicates.

‎make/common/JavaCompilation.gmk

+2-18
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -32,10 +32,8 @@ endif
3232

3333
include MakeIO.gmk
3434

35-
# Java compilation needs SetupJarArchive and/or SetupZipArchive, if we're
36-
# generating a jar file or a source zip.
35+
# Java compilation needs SetupJarArchive if we're generating a jar file
3736
include JarArchive.gmk
38-
include ZipArchive.gmk
3937

4038
###
4139
### Definitions for common release targets
@@ -156,7 +154,6 @@ endef
156154
# COPY_FILES myapp/foo/setting.txt means copy this file over to the package myapp/foo
157155
# CLEAN .properties means copy and clean all properties file to the corresponding package in BIN.
158156
# CLEAN_FILES myapp/foo/setting.txt means clean this file over to the package myapp/foo
159-
# SRCZIP Create a src.zip based on the found sources and copied files.
160157
# INCLUDE_FILES "com/sun/SolarisFoobar.java" means only compile this file!
161158
# EXCLUDE_FILES "com/sun/SolarisFoobar.java" means do not compile this particular file!
162159
# "SolarisFoobar.java" means do not compile SolarisFoobar, wherever it is found.
@@ -529,19 +526,6 @@ define SetupJavaCompilationBody
529526
# Add jar to target list
530527
$1 += $$($1_JAR)
531528
endif
532-
533-
# Check if a srczip was specified, then setup the rules for the srczip.
534-
ifneq ($$($1_SRCZIP), )
535-
$$(eval $$(call SetupZipArchive, ZIP_ARCHIVE_$1, \
536-
SRC := $$($1_SRC), \
537-
ZIP := $$($1_SRCZIP), \
538-
INCLUDES := $$($1_INCLUDES), \
539-
EXCLUDES := $$($1_EXCLUDES), \
540-
EXCLUDE_FILES := $$($1_EXCLUDE_FILES)))
541-
542-
# Add zip to target list
543-
$1 += $$($1_SRCZIP)
544-
endif
545529
endif # Source files found
546530
endef
547531

0 commit comments

Comments
 (0)
Please sign in to comment.