8223323: Adjust jpackage makefiles JDK-8200758-branch
authorherrick
Thu, 24 Oct 2019 17:14:42 -0400
branchJDK-8200758-branch
changeset 58792 72daf2e005cd
parent 58791 fca9cb5f4953
child 58818 a9316bb4c0e8
8223323: Adjust jpackage makefiles Submitted-by: asemenyuk Reviewed-by: aherrick, almatvee, erikj
make/launcher/Launcher-jdk.jpackage.gmk
make/lib/Lib-jdk.jpackage.gmk
--- a/make/launcher/Launcher-jdk.jpackage.gmk	Thu Oct 24 16:48:53 2019 -0400
+++ b/make/launcher/Launcher-jdk.jpackage.gmk	Thu Oct 24 17:14:42 2019 -0400
@@ -25,54 +25,6 @@
 
 include LauncherCommon.gmk
 
-
-################################################################################
-
 $(eval $(call SetupBuildLauncher, jpackage, \
     MAIN_CLASS := jdk.jpackage.main.Main, \
 ))
-
-################################################################################
-
-JPACKAGE_APPLAUNCHEREXE_SRC := \
-    $(TOPDIR)/src/jdk.jpackage/$(OPENJDK_TARGET_OS)/native/jpackageapplauncher
-
-# Output app launcher executable in resources dir, and symbols in the object dir
-$(eval $(call SetupJdkExecutable, BUILD_JPACKAGE_APPLAUNCHEREXE, \
-    NAME := jpackageapplauncher, \
-    OUTPUT_DIR := $(JDK_OUTPUTDIR)/modules/$(MODULE)/jdk/jpackage/internal/resources, \
-    SYMBOLS_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jpackageapplauncher, \
-    SRC := $(JPACKAGE_APPLAUNCHEREXE_SRC), \
-    TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
-    OPTIMIZATION := LOW, \
-    CFLAGS := $(CXXFLAGS_JDKEXE), \
-    CFLAGS_windows := -EHsc -DLAUNCHERC -DUNICODE -D_UNICODE, \
-    LDFLAGS := $(LDFLAGS_JDKEXE), \
-    LIBS_macosx := -framework Cocoa, \
-    LIBS := $(LIBCXX), \
-    LIBS_linux := -ldl, \
-    LIBS_windows :=  user32.lib shell32.lib advapi32.lib, \
-))
-
-TARGETS += $(BUILD_JPACKAGE_APPLAUNCHEREXE)
-
-# Build non-console version of launcher
-ifeq ($(call isTargetOs, windows), true)
-
-  $(eval $(call SetupJdkExecutable, BUILD_JPACKAGE_APPLAUNCHERWEXE, \
-      NAME := jpackageapplauncherw, \
-      OUTPUT_DIR := $(JDK_OUTPUTDIR)/modules/$(MODULE)/jdk/jpackage/internal/resources, \
-      SYMBOLS_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jpackageapplauncherw, \
-      SRC := $(JPACKAGE_APPLAUNCHEREXE_SRC), \
-      TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
-      OPTIMIZATION := LOW, \
-      CFLAGS := $(CXXFLAGS_JDKEXE), \
-      CFLAGS_windows := -EHsc -DUNICODE -D_UNICODE, \
-      LDFLAGS := $(LDFLAGS_JDKEXE), \
-      LIBS := $(LIBCXX), \
-      LIBS_windows :=  user32.lib shell32.lib advapi32.lib, \
-  ))
-
-  TARGETS += $(BUILD_JPACKAGE_APPLAUNCHERWEXE)
-endif
-
--- a/make/lib/Lib-jdk.jpackage.gmk	Thu Oct 24 16:48:53 2019 -0400
+++ b/make/lib/Lib-jdk.jpackage.gmk	Thu Oct 24 17:14:42 2019 -0400
@@ -48,6 +48,28 @@
 
 TARGETS += $(BUILD_LIB_APPLAUNCHER)
 
+JPACKAGE_APPLAUNCHER_SRC := \
+    $(TOPDIR)/src/jdk.jpackage/$(OPENJDK_TARGET_OS)/native/jpackageapplauncher
+
+# Output app launcher executable in resources dir, and symbols in the object dir
+$(eval $(call SetupJdkExecutable, BUILD_JPACKAGE_APPLAUNCHEREXE, \
+    NAME := jpackageapplauncher, \
+    OUTPUT_DIR := $(JDK_OUTPUTDIR)/modules/$(MODULE)/jdk/jpackage/internal/resources, \
+    SYMBOLS_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jpackageapplauncher, \
+    SRC := $(JPACKAGE_APPLAUNCHER_SRC), \
+    TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
+    OPTIMIZATION := LOW, \
+    CFLAGS := $(CXXFLAGS_JDKEXE), \
+    CFLAGS_windows := -EHsc -DLAUNCHERC -DUNICODE -D_UNICODE, \
+    LDFLAGS := $(LDFLAGS_JDKEXE), \
+    LIBS_macosx := -framework Cocoa, \
+    LIBS := $(LIBCXX), \
+    LIBS_linux := -ldl, \
+    LIBS_windows := user32.lib shell32.lib advapi32.lib, \
+))
+
+TARGETS += $(BUILD_JPACKAGE_APPLAUNCHEREXE)
+
 ################################################################################
 
 ifeq ($(call isTargetOs, windows), true)
@@ -81,6 +103,7 @@
 
   TARGETS += $(BUILD_LIB_WIXHELPER)
 
+  # Build exe installer wrapper for msi installer
   $(eval $(call SetupJdkExecutable, BUILD_JPACKAGE_MSIWRAPPER, \
       NAME := msiwrapper, \
       OUTPUT_DIR := $(JDK_OUTPUTDIR)/modules/$(MODULE)/jdk/jpackage/internal/resources, \
@@ -96,4 +119,22 @@
   ))
 
   TARGETS += $(BUILD_JPACKAGE_MSIWRAPPER)
+
+  # Build non-console version of launcher
+  $(eval $(call SetupJdkExecutable, BUILD_JPACKAGE_APPLAUNCHERWEXE, \
+      NAME := jpackageapplauncherw, \
+      OUTPUT_DIR := $(JDK_OUTPUTDIR)/modules/$(MODULE)/jdk/jpackage/internal/resources, \
+      SYMBOLS_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jpackageapplauncherw, \
+      SRC := $(JPACKAGE_APPLAUNCHER_SRC), \
+      TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
+      OPTIMIZATION := LOW, \
+      CFLAGS := $(CXXFLAGS_JDKEXE), \
+      CFLAGS_windows := -EHsc -DUNICODE -D_UNICODE, \
+      LDFLAGS := $(LDFLAGS_JDKEXE), \
+      LIBS := $(LIBCXX), \
+      LIBS_windows := user32.lib shell32.lib advapi32.lib, \
+  ))
+
+  TARGETS += $(BUILD_JPACKAGE_APPLAUNCHERWEXE)
+
 endif