8217269: jpackage Makefile improvments JDK-8200758-branch
authorherrick
Tue, 22 Jan 2019 09:24:58 -0500
branchJDK-8200758-branch
changeset 57108 f1c13cb0e713
parent 57107 e754cf34b7a8
child 57109 b50715adf242
8217269: jpackage Makefile improvments Reviewed-by: almatvee, ihse
make/launcher/Launcher-jdk.jpackage.gmk
make/lib/Lib-jdk.jpackage.gmk
src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxAppBundler.java
src/jdk.jpackage/share/classes/jdk/jpackage/internal/AbstractAppImageBuilder.java
src/jdk.jpackage/share/classes/jdk/jpackage/internal/Arguments.java
src/jdk.jpackage/share/classes/jdk/jpackage/internal/BasicBundlers.java
src/jdk.jpackage/share/classes/jdk/jpackage/internal/StandardBundlerParam.java
src/jdk.jpackage/share/native/libapplauncher/FilePath.cpp
src/jdk.jpackage/share/native/libapplauncher/FilePath.h
test/jdk/tools/jpackage/resources/license.txt
--- a/make/launcher/Launcher-jdk.jpackage.gmk	Thu Jan 10 15:34:33 2019 -0500
+++ b/make/launcher/Launcher-jdk.jpackage.gmk	Tue Jan 22 09:24:58 2019 -0500
@@ -47,10 +47,53 @@
 
 else
 
-$(eval $(call SetupBuildLauncher, jpackage, \
-    MAIN_CLASS := jdk.jpackage.main.Main, \
-))
+  $(eval $(call SetupBuildLauncher, jpackage, \
+      MAIN_CLASS := jdk.jpackage.main.Main, \
+  ))
 
 endif
 
 ################################################################################
+
+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 ($(OPENJDK_TARGET_OS), windows)
+
+  $(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 Jan 10 15:34:33 2019 -0500
+++ b/make/lib/Lib-jdk.jpackage.gmk	Tue Jan 22 09:24:58 2019 -0500
@@ -50,51 +50,3 @@
 
 ################################################################################
 
-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_linux := -fPIC, \
-    CFLAGS_solaris := -KPIC, \
-    CFLAGS_macosx := -fPIC, \
-    CFLAGS_windows := -EHsc -DLAUNCHERC -DUNICODE -D_UNICODE, \
-    LDFLAGS_windows := -nologo, \
-    LIBS_macosx := -framework Cocoa, \
-    LIBS := $(LIBCXX), \
-    LIBS_solaris :=  -lc, \
-    LIBS_linux := -ldl, \
-    LIBS_windows :=  user32.lib shell32.lib advapi32.lib, \
-    VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
-))
-
-TARGETS += $(BUILD_JPACKAGE_APPLAUNCHEREXE)
-
-# Build non-console version of launcher
-ifeq ($(OPENJDK_TARGET_OS), windows)
-
-  $(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_windows := -nologo, \
-      LIBS := $(LIBCXX), \
-      LIBS_windows :=  user32.lib shell32.lib advapi32.lib, \
-      VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
-  ))
-
-  TARGETS += $(BUILD_JPACKAGE_APPLAUNCHERWEXE)
-endif
-
--- a/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxAppBundler.java	Thu Jan 10 15:34:33 2019 -0500
+++ b/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxAppBundler.java	Tue Jan 22 09:24:58 2019 -0500
@@ -77,7 +77,7 @@
              },
             (s, p) -> s
     );
-    
+
     public static final BundlerParamInfo<String> LINUX_PACKAGE_DEPENDENCIES =
             new StandardBundlerParam<>(
             I18N.getString("param.linux-package-dependencies.name"),
@@ -224,8 +224,8 @@
             File outputParentDir) {
         return doBundle(params, outputParentDir, false);
     }
-    
-    @Override    
+
+    @Override
     public boolean supported() {
         return (Platform.getPlatform() == Platform.LINUX);
     }
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/AbstractAppImageBuilder.java	Thu Jan 10 15:34:33 2019 -0500
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/AbstractAppImageBuilder.java	Tue Jan 22 09:24:58 2019 -0500
@@ -204,7 +204,7 @@
                 CLASSPATH.fetchFrom(params).split("[ :;]")));
 
         // The main app is required to be a jar, modular or unnamed.
-        if (mainModule != null && 
+        if (mainModule != null &&
                 (mainJarType == ModFile.ModType.Unknown ||
                 mainJarType == ModFile.ModType.ModularJar)) {
             out.println("app.mainmodule=" + mainModule);
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/Arguments.java	Thu Jan 10 15:34:33 2019 -0500
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/Arguments.java	Tue Jan 22 09:24:58 2019 -0500
@@ -127,7 +127,7 @@
     private boolean hasAppImage = false;
     private boolean retainBuildRoot = false;
 
-    private String buildRoot = null; 
+    private String buildRoot = null;
     private String mainJarPath = null;
 
     private static boolean jreInstaller = false;
@@ -569,7 +569,7 @@
                             args.add(qsplit[i]);
                         }
                     }
-                } 
+                }
             } else {
                Log.error("Can not find argument file: " + f);
             }
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/BasicBundlers.java	Thu Jan 10 15:34:33 2019 -0500
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/BasicBundlers.java	Tue Jan 22 09:24:58 2019 -0500
@@ -88,7 +88,7 @@
             bundlers.add(aLoader);
         }
     }
-    
+
     @Override
     public void loadBundler(Bundler bundler) {
         bundlers.add(bundler);
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/StandardBundlerParam.java	Thu Jan 10 15:34:33 2019 -0500
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/StandardBundlerParam.java	Tue Jan 22 09:24:58 2019 -0500
@@ -642,7 +642,7 @@
                 StandardBundlerParam.MODULE_PATH.fetchFrom(p);
         List<Path> defaultModulePath = getDefaultModulePath();
         Path dest = appBuilder.getAppModsDir();
-        
+
         if (dest != null) {
             for (Path mp : modulePath) {
                 if (!defaultModulePath.contains(mp)) {
--- a/src/jdk.jpackage/share/native/libapplauncher/FilePath.cpp	Thu Jan 10 15:34:33 2019 -0500
+++ b/src/jdk.jpackage/share/native/libapplauncher/FilePath.cpp	Tue Jan 22 09:24:58 2019 -0500
@@ -514,7 +514,7 @@
                 break;
             }
             default:
-  				break;
+                break;
         }
     }
 
--- a/src/jdk.jpackage/share/native/libapplauncher/FilePath.h	Thu Jan 10 15:34:33 2019 -0500
+++ b/src/jdk.jpackage/share/native/libapplauncher/FilePath.h	Tue Jan 22 09:24:58 2019 -0500
@@ -50,7 +50,7 @@
     faReadOnly = FILE_ATTRIBUTE_READONLY,
     faTemporary = FILE_ATTRIBUTE_TEMPORARY,
     faVirtual = FILE_ATTRIBUTE_VIRTUAL
-#endif //WINDOWS  
+#endif //WINDOWS
 #ifdef POSIX
     faBlockSpecial,
     faCharacterSpecial,
--- a/test/jdk/tools/jpackage/resources/license.txt	Thu Jan 10 15:34:33 2019 -0500
+++ b/test/jdk/tools/jpackage/resources/license.txt	Tue Jan 22 09:24:58 2019 -0500
@@ -1,1 +1,1 @@
-jpackage test lisense file.
+jpackage test license file (just some sample text).