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

Fix PACKAGE/PKGDIR oddness in Makefiles

XMLWordPrintable

    • b29
    • generic
    • generic

      The PKGDIR Makefile variable can be programmatically derived from
      the PACKAGE variable, and it is universally so derived....
      except in 2 Makefiles, where it is explicitly assigned,
      for example,

       PACKAGE = com.sun.java.util.jar.pack
       PKGDIR = com/sun/java/util/jar/pack

      But if you remove those PKGDIR assignments, the build fails!!
      Why??

      Ahhhh, it's those !@#$ trailing spaces on the PACKAGE assigment
      (grrrrrr).

      After removing the trailing spaces from all the PACKAGE assignments,
      it is possible to remove all the PKGDIR assignments, except for the
      generic one.

      And the generic one can be improved in an obvious way,
      removing two process creations and avoiding another chance
      for SED to go wrong.

      --- /u/martin/ws/mustang/make/common/Defs.gmk 2005-03-04 20:54:53.626794000 -0800
      +++ /u/martin/ws/cyg/make/common/Defs.gmk 2005-03-07 00:03:03.253967000 -0800
      @@ -452,7 +452,7 @@
       #
       SOURCEPATH = $(VPATH.java)
       PKG = $(shell $(EXPR) $(PACKAGE) : '\([a-z]*\)')
      -PKGDIR = $(shell $(ECHO) $(PACKAGE) | $(SED) 's:\.:/:g')
      +PKGDIR = $(subst .,/,$(PACKAGE))
       
       #
       # Suffixes for various VARIANTs

      ###@###.### 2005-03-07 18:24:40 GMT

            martin Martin Buchholz
            martin Martin Buchholz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: