Skip to content

Commit

Permalink
8347996: JavaCompilation.gmk should not include ZipArchive.gmk
Browse files Browse the repository at this point in the history
Reviewed-by: erikj
  • Loading branch information
magicus committed Jan 20, 2025
1 parent 0fbf10a commit 3a4d5ff
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 20 deletions.
11 changes: 9 additions & 2 deletions make/CompileDemos.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -132,12 +132,19 @@ define SetupBuildDemoBody
JARMAIN := $$($1_MAIN_CLASS), \
MANIFEST := $(DEMO_MANIFEST), \
EXTRA_MANIFEST_ATTR := $$($1_EXTRA_MANIFEST_ATTR), \
SRCZIP := $(SUPPORT_OUTPUTDIR)/demos/image/$$($1_DEMO_SUBDIR)/$1/src.zip, \
EXCLUDE_FILES := $$($1_EXCLUDE_FILES), \
DISABLED_WARNINGS := $$($1_DISABLED_WARNINGS), \
))

$1 += $$(BUILD_DEMO_$1)

$$(eval $$(call SetupZipArchive, ZIP_SRC_DEMO_$1, \
SRC := $$($1_MAIN_SRC) $$($1_EXTRA_SRC_DIR), \
ZIP := $(SUPPORT_OUTPUTDIR)/demos/image/$$($1_DEMO_SUBDIR)/$1/src.zip, \
EXCLUDE_FILES := $$($1_EXCLUDE_FILES), \
))

$1 += $$(ZIP_SRC_DEMO_$1)
endif

# Copy files. Sort is needed to remove duplicates.
Expand Down
20 changes: 2 additions & 18 deletions make/common/JavaCompilation.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -32,10 +32,8 @@ endif

include MakeIO.gmk

# Java compilation needs SetupJarArchive and/or SetupZipArchive, if we're
# generating a jar file or a source zip.
# Java compilation needs SetupJarArchive if we're generating a jar file
include JarArchive.gmk
include ZipArchive.gmk

###
### Definitions for common release targets
Expand Down Expand Up @@ -156,7 +154,6 @@ endef
# COPY_FILES myapp/foo/setting.txt means copy this file over to the package myapp/foo
# CLEAN .properties means copy and clean all properties file to the corresponding package in BIN.
# CLEAN_FILES myapp/foo/setting.txt means clean this file over to the package myapp/foo
# SRCZIP Create a src.zip based on the found sources and copied files.
# INCLUDE_FILES "com/sun/SolarisFoobar.java" means only compile this file!
# EXCLUDE_FILES "com/sun/SolarisFoobar.java" means do not compile this particular file!
# "SolarisFoobar.java" means do not compile SolarisFoobar, wherever it is found.
Expand Down Expand Up @@ -529,19 +526,6 @@ define SetupJavaCompilationBody
# Add jar to target list
$1 += $$($1_JAR)
endif

# Check if a srczip was specified, then setup the rules for the srczip.
ifneq ($$($1_SRCZIP), )
$$(eval $$(call SetupZipArchive, ZIP_ARCHIVE_$1, \
SRC := $$($1_SRC), \
ZIP := $$($1_SRCZIP), \
INCLUDES := $$($1_INCLUDES), \
EXCLUDES := $$($1_EXCLUDES), \
EXCLUDE_FILES := $$($1_EXCLUDE_FILES)))

# Add zip to target list
$1 += $$($1_SRCZIP)
endif
endif # Source files found
endef

Expand Down

0 comments on commit 3a4d5ff

Please sign in to comment.