JDK-8217269 : jpackage Makefile improvments
  • Type: Bug
  • Component: tools
  • Sub-Component: jpackage
  • Affected Version: internal
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-01-16
  • Updated: 2019-03-22
  • Resolved: 2019-01-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
internalFixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
Feedback from build team on EA2:
Just a few minor nits:

* In Launcher-jdk.jpackage.gmk, please indent the else clause ("$(eval $(call SetupBuildLauncher, jpackage ....") two spaces.

* In Lib-jdk.jpackage.gmk, I think there's still room to prune some more unnecessary compiler flags and parameters to SetupJdkExecutable:

  65     CFLAGS_linux := -fPIC, \
  66     CFLAGS_solaris := -KPIC, \
  67     CFLAGS_macosx := -fPIC, \

 I wonder if these really are needed. Normally, only shared libraries neeed PIC code. (And for those we set it automatically.)

  69     LDFLAGS_windows := -nologo, \

This should not be needed, it's incorporated in CXXFLAGS_JDKEXE. (Also in the second block, for jpackageapplauncherw).

  72     LIBS_solaris :=  -lc, \

Same here; this should not be needed. It's in GLOBAL_LIBS on Solaris, and is always included.

  75     VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \

This is setup by default by SetupJdkExecutable, so you can remove it. (Also in the second block, for jpackageapplauncherw).

Finally, I do believe that the setups of jpackageapplauncher and jpackageapplauncherw should be done in Launcher-jdk.jpackage.gmk, not Lib-jdk.jpackage.gmk. Since they are to be shipped as resources, they are not "really" launchers in our normal sense, but they are at least more launchers than they are libraries.

As we've talked about privately, in the future I'd like to see Windows too use the SetupBuildLauncher method for creating the launcher, but this is clearly good enough for inclusion in the mainline.

Comments
Proposed fix also adresses removing trailing whitespaces from JDK-8216521 proposed fix: http://cr.openjdk.java.net/~herrick/8217269/webrev.01/
18-01-2019

note - also fix type in test license file test/jdk/tools/jpackage/resources/license.txt
17-01-2019

The final point is dependent on creating a native library (at least on windows) with methods to implement the functionality in jpackageapplauncher for the --icon-swap and --version-swap arguments. That is covered by JDK-8217317
17-01-2019