From 3a4d5ff7a326298e664e876f660c20170ca9f4a5 Mon Sep 17 00:00:00 2001 From: Magnus Ihse Bursie Date: Mon, 20 Jan 2025 16:29:00 +0000 Subject: [PATCH] 8347996: JavaCompilation.gmk should not include ZipArchive.gmk Reviewed-by: erikj --- make/CompileDemos.gmk | 11 +++++++++-- make/common/JavaCompilation.gmk | 20 ++------------------ 2 files changed, 11 insertions(+), 20 deletions(-) diff --git a/make/CompileDemos.gmk b/make/CompileDemos.gmk index 6c751552e5042..6c95aa08c2b00 100644 --- a/make/CompileDemos.gmk +++ b/make/CompileDemos.gmk @@ -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 @@ -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. diff --git a/make/common/JavaCompilation.gmk b/make/common/JavaCompilation.gmk index 59ea23d359b6a..c56217b9f33c2 100644 --- a/make/common/JavaCompilation.gmk +++ b/make/common/JavaCompilation.gmk @@ -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 @@ -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 @@ -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. @@ -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