Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8102617

rt-closed/javafx-font-native/Makefile clean up



      See the patch for some clean up for rt-closed/javafx-font-native/Makefile

      description of the changes
      1) INCLUDES var only includes t2k.h
      I would think it should include all .h files inside src/

      2) OBJS var includes MacFontFinder.o twice

      3) OBJS var includes t2k.o 3 times

      4) Simplify handling of .m

      5) Remove useless rule (no .c in the current directory):
      $(CC) $(CC_PARAMS) $(OUTPUT_FLAG)$@ $<

      6) JNI_INCLUDES (personally, the most complicated part of this makefile)

      Currently a javafx-font-native/build/com_sun_t2k_%.h depends on a javafx-font/build/classes/com/sun/t2k/%.class

      This does not work because javafx-font/build/classes/com/sun/t2k/%.class includes files such as
      CMap$CMapFormat10.class, and never there will be a com_sun_t2k_CMap$CMapFormat10.h for that
      (only com_sun_t2k_CMap.h).
      This case makes JNI_INCLUDES to always be rebuilt. Since everything depends on JNI_INCLUDES
      everything builds every time.

      The proposed patch changes the dependency as follow
      javafx-font-native/build/com_sun_t2k_%.h depends on a javafx-font/src/com/sun/t2k/%.java

      That means: every time a .java changes the respective .h has to be rebuild.

      With the changes above the time to build the fonts library goes from > 1 minute to almost zero.

      There is still one problem left, the above does not check if the .class were updated after .java were changed.
      I believe this check should be done by javafx-font/build.xml

      In short, the user always calls javafx-font/build.xml
      javafx-font/build.xml builds, if needed, the java code and always call javafx-font-native/Makefile
      javafx-font-native/Makefile builds, if needed, the native code.

      Related bug: http://javafx-jira.kenai.com/browse/RT-21453

      Note: Not sure if marking JNI_INCLUDES as PRECIOUS helps anything...




            • Assignee:
              fheidric Felipe Heidrich (Inactive)
              fheidric Felipe Heidrich (Inactive)
            • Votes:
              0 Vote for this issue
              4 Start watching this issue


              • Created: