8005635: build-infra: Support building install in jprt

Thu, 03 Jan 2013 20:54:38 +0100

author
erikj
date
Thu, 03 Jan 2013 20:54:38 +0100
changeset 564
befbad2e4d87
parent 563
348a881c6da0
child 565
39194e004ade

8005635: build-infra: Support building install in jprt
Reviewed-by: ohair
Contributed-by: tim.bell@oracle.com, erik.joelsson@oracle.com

common/autoconf/generated-configure.sh file | annotate | diff | comparison | revisions
common/autoconf/spec.gmk.in file | annotate | diff | comparison | revisions
common/bin/compare.sh file | annotate | diff | comparison | revisions
common/bin/compare_exceptions.sh.incl file | annotate | diff | comparison | revisions
common/makefiles/Jprt.gmk file | annotate | diff | comparison | revisions
common/src/fixpath.c file | annotate | diff | comparison | revisions
     1.1 --- a/common/autoconf/generated-configure.sh	Wed Jan 02 15:36:00 2013 +0100
     1.2 +++ b/common/autoconf/generated-configure.sh	Thu Jan 03 20:54:38 2013 +0100
     1.3 @@ -3686,7 +3686,7 @@
     1.4  #CUSTOM_AUTOCONF_INCLUDE
     1.5  
     1.6  # Do not change or remove the following line, it is needed for consistency checks:
     1.7 -DATE_WHEN_GENERATED=1357120071
     1.8 +DATE_WHEN_GENERATED=1357219413
     1.9  
    1.10  ###############################################################################
    1.11  #
     2.1 --- a/common/autoconf/spec.gmk.in	Wed Jan 02 15:36:00 2013 +0100
     2.2 +++ b/common/autoconf/spec.gmk.in	Thu Jan 03 20:54:38 2013 +0100
     2.3 @@ -618,5 +618,21 @@
     2.4  OS_VERSION_MINOR:=@OS_VERSION_MINOR@
     2.5  OS_VERSION_MICRO:=@OS_VERSION_MICRO@
     2.6  
     2.7 +# Images directory definitions
     2.8 +JDK_IMAGE_SUBDIR:=j2sdk-image
     2.9 +JRE_IMAGE_SUBDIR:=j2re-image
    2.10 +JDK_OVERLAY_IMAGE_SUBDIR:=j2sdk-overlay-image
    2.11 +JRE_OVERLAY_IMAGE_SUBDIR:=j2re-overlay-image
    2.12 +JDK_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/$(JDK_IMAGE_SUBDIR)
    2.13 +JRE_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/$(JRE_IMAGE_SUBDIR)
    2.14 +JDK_OVERLAY_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/$(JDK_OVERLAY_IMAGE_SUBDIR)
    2.15 +JRE_OVERLAY_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/$(JRE_OVERLAY_IMAGE_SUBDIR)
    2.16 +
    2.17 +# Macosx bundles directory definitions
    2.18 +JDK_BUNDLE_SUBDIR:=j2sdk-bundle/jdk$(JDK_VERSION).jdk/Contents
    2.19 +JRE_BUNDLE_SUBDIR:=j2re-bundle/jre$(JDK_VERSION).jre/Contents
    2.20 +JDK_BUNDLE_DIR:=$(IMAGES_OUTPUTDIR)/$(JDK_BUNDLE_SUBDIR)
    2.21 +JRE_BUNDLE_DIR:=$(IMAGES_OUTPUTDIR)/$(JRE_BUNDLE_SUBDIR)
    2.22 +
    2.23  # Include the custom-spec.gmk file if it exists
    2.24  -include $(dir @SPEC@)/custom-spec.gmk
     3.1 --- a/common/bin/compare.sh	Wed Jan 02 15:36:00 2013 +0100
     3.2 +++ b/common/bin/compare.sh	Thu Jan 03 20:54:38 2013 +0100
     3.3 @@ -98,12 +98,15 @@
     3.4      if test "x$SUFFIX" = "xclass"; then
     3.5          # To improve performance when large diffs are found, do a rough filtering of classes
     3.6          # elibeble for these exceptions
     3.7 -        if $GREP -R -e '[0-9]\{4\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}-b[0-9]\{2\}' -e thePoint -e aPoint -e setItemsPtr ${THIS_FILE} > /dev/null; then
     3.8 +        if $GREP -R -e '[0-9]\{4\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}-b[0-9]\{2\}' \
     3.9 +	        -e '[0-9]\{2\}/[0-9]\{2\}/[0-9]\{4\}' \
    3.10 +	        -e thePoint -e aPoint -e setItemsPtr ${THIS_FILE} > /dev/null; then
    3.11              $JAVAP -c -constants -l -p ${OTHER_FILE} >  ${OTHER_FILE}.javap
    3.12              $JAVAP -c -constants -l -p ${THIS_FILE} > ${THIS_FILE}.javap
    3.13              TMP=$($DIFF ${OTHER_FILE}.javap ${THIS_FILE}.javap | \
    3.14                  $GREP '^[<>]' | \
    3.15                  $SED -e '/[<>].*[0-9]\{4\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}-b[0-9]\{2\}.*/d' \
    3.16 +		     -e '/[0-9]\{2\}\/[0-9]\{2\}\/[0-9]\{4\}/d' \
    3.17   	             -e '/[<>].*Point   Lcom\/apple\/jobjc\/foundation\/NSPoint;/d' \
    3.18  	             -e '/[<>].*public com\.apple\.jobjc\.Pointer<com\.apple\.jobjc\..*itemsPtr();/d' \
    3.19  	             -e '/[<>].*public void setItemsPtr(com\.apple\.jobjc\.Pointer<com\.apple\.jobjc\..*);/d')
    3.20 @@ -305,14 +308,17 @@
    3.21                  THIS_FILE=$WORK_DIR/$f.this
    3.22                  $MKDIR -p $(dirname $OTHER_FILE)
    3.23                  $MKDIR -p $(dirname $THIS_FILE)
    3.24 +                #Note that | doesn't work on mac sed.
    3.25                  $CAT $OTHER_DIR/$f | $SED -e 's/\(-- Generated by javadoc \).*\( --\)/\1(removed)\2/' \
    3.26                                            -e 's/\(<meta name="date" content="\).*\(">\)/\1(removed)\2/' \
    3.27 -                                          -e 's/\(Monday\|Tuesday\|Wednesday\|Thursday\|Friday\|Saturday\|Sunday\), [A-Z][a-z]* [0-9][0-9]*, [12][0-9]* [0-9][0-9:]* \(AM\|PM\) [A-Z][A-Z]*/(removed)/' \
    3.28 +                                          -e 's/[A-Z][a-z]*, [A-Z][a-z]* [0-9][0-9]*, [12][0-9]* [0-9][0-9:]* [AMP]\{2,2\} [A-Z][A-Z]*/(removed)/' \
    3.29 +                                          -e 's/[A-Z][a-z]* [A-Z][a-z]* [0-9][0-9] [0-9][0-9:]* [A-Z][A-Z]* [12][0-9]*/(removed)/' \
    3.30                                            -e 's/^\( from \).*\(\.idl\)$/\1(removed)\2/' \
    3.31                      > $OTHER_FILE
    3.32                  $CAT $THIS_DIR/$f  | $SED -e 's/\(-- Generated by javadoc \).*\( --\)/\1(removed)\2/' \
    3.33                                            -e 's/\(<meta name="date" content="\).*\(">\)/\1(removed)\2/' \
    3.34 -                                          -e 's/\(Monday\|Tuesday\|Wednesday\|Thursday\|Friday\|Saturday\|Sunday\), [A-Z][a-z]* [0-9][0-9]*, [12][0-9]* [0-9][0-9:]* \(AM\|PM\) [A-Z][A-Z]*/(removed)/' \
    3.35 +                                          -e 's/[A-Z][a-z]*, [A-Z][a-z]* [0-9][0-9]*, [12][0-9]* [0-9][0-9:]* [AMP]\{2,2\} [A-Z][A-Z]*/(removed)/' \
    3.36 +                                          -e 's/[A-Z][a-z]* [A-Z][a-z]* [0-9][0-9] [0-9][0-9:]* [A-Z][A-Z]* [12][0-9]*/(removed)/' \
    3.37                                            -e 's/^\( from \).*\(\.idl\)$/\1(removed)\2/' \
    3.38                      > $THIS_FILE
    3.39              else
    3.40 @@ -370,14 +376,14 @@
    3.41      (cd $OTHER_UNZIPDIR && $UNARCHIVE $OTHER_ZIP)
    3.42  
    3.43      # Find all archives inside and unzip them as well to compare the contents rather than
    3.44 -    # the archives.
    3.45 -    EXCEPTIONS=""
    3.46 -    for pack in $($FIND $THIS_UNZIPDIR -name "*.pack" -o -name "*.pack.gz"); do
    3.47 +    # the archives. pie.jar.pack.gz i app3.war is corrupt, skip it.
    3.48 +    EXCEPTIONS="pie.jar.pack.gz"
    3.49 +    for pack in $($FIND $THIS_UNZIPDIR \( -name "*.pack" -o -name "*.pack.gz" \) -a ! -name pie.jar.pack.gz); do
    3.50          ($UNPACK200 $pack $pack.jar)
    3.51          # Filter out the unzipped archives from the diff below.
    3.52          EXCEPTIONS="$EXCEPTIONS $pack $pack.jar"
    3.53      done
    3.54 -    for pack in $($FIND $OTHER_UNZIPDIR -name "*.pack" -o -name "*.pack.gz"); do
    3.55 +    for pack in $($FIND $OTHER_UNZIPDIR \( -name "*.pack" -o -name "*.pack.gz" \) -a ! -name pie.jar.pack.gz); do
    3.56          ($UNPACK200 $pack $pack.jar)
    3.57          EXCEPTIONS="$EXCEPTIONS $pack $pack.jar"
    3.58      done
    3.59 @@ -1073,7 +1079,11 @@
    3.60  
    3.61  
    3.62  # Figure out the layout of the this build. Which kinds of images have been produced
    3.63 -if [ -d "$THIS/deploy/j2sdk-image" ]; then
    3.64 +if [ -d "$THIS/install/j2sdk-image" ]; then
    3.65 +    THIS_J2SDK="$THIS/install/j2sdk-image"
    3.66 +    THIS_J2RE="$THIS/install/j2re-image"
    3.67 +    echo "Comparing install images"
    3.68 +elif [ -d "$THIS/deploy/j2sdk-image" ]; then
    3.69      THIS_J2SDK="$THIS/deploy/j2sdk-image"
    3.70      THIS_J2RE="$THIS/deploy/j2re-image"
    3.71      echo "Comparing deploy images"
    3.72 @@ -1081,9 +1091,16 @@
    3.73      THIS_J2SDK="$THIS/images/j2sdk-image"
    3.74      THIS_J2RE="$THIS/images/j2re-image"
    3.75  fi
    3.76 +
    3.77  if [ -d "$THIS/images/j2sdk-overlay-image" ]; then
    3.78 -    THIS_J2SDK_OVERLAY="$THIS/images/j2sdk-overlay-image"
    3.79 -    THIS_J2RE_OVERLAY="$THIS/images/j2re-overlay-image"
    3.80 +    if [ -d "$THIS/install/j2sdk-image" ]; then
    3.81 +        # If there is an install image, prefer that, it's also overlay
    3.82 +        THIS_J2SDK_OVERLAY="$THIS/install/j2sdk-image"
    3.83 +        THIS_J2RE_OVERLAY="$THIS/install/j2re-image"
    3.84 +    else
    3.85 +        THIS_J2SDK_OVERLAY="$THIS/images/j2sdk-overlay-image"
    3.86 +        THIS_J2RE_OVERLAY="$THIS/images/j2re-overlay-image"
    3.87 +    fi
    3.88  fi
    3.89  
    3.90  if [ -d "$THIS/images/j2sdk-bundle" ]; then
    3.91 @@ -1100,7 +1117,9 @@
    3.92          OTHER_J2SDK_OVERLAY="$OTHER/j2sdk-image"
    3.93          OTHER_J2RE_OVERLAY="$OTHER/j2re-image"
    3.94      fi
    3.95 -
    3.96 +elif [ -d "$OTHER/images/j2sdk-image" ]; then
    3.97 +    OTHER_J2SDK="$OTHER/images/j2sdk-image"
    3.98 +    OTHER_J2RE="$OTHER/images/j2re-image"
    3.99  fi
   3.100  
   3.101  if [ -d "$OTHER/j2sdk-bundle" ]; then
     4.1 --- a/common/bin/compare_exceptions.sh.incl	Wed Jan 02 15:36:00 2013 +0100
     4.2 +++ b/common/bin/compare_exceptions.sh.incl	Thu Jan 03 20:54:38 2013 +0100
     4.3 @@ -815,6 +815,7 @@
     4.4  ./jre/bin/attach.dll
     4.5  ./jre/bin/java_crw_demo.dll
     4.6  ./jre/bin/jsoundds.dll
     4.7 +./jre/bin/server/jvm.dll
     4.8  ./bin/appletviewer.exe
     4.9  ./bin/extcheck.exe
    4.10  ./bin/idlj.exe
     5.1 --- a/common/makefiles/Jprt.gmk	Wed Jan 02 15:36:00 2013 +0100
     5.2 +++ b/common/makefiles/Jprt.gmk	Thu Jan 03 20:54:38 2013 +0100
     5.3 @@ -97,6 +97,15 @@
     5.4  ifdef ANT_HOME
     5.5  	@$(ECHO) " --with-ant-home=$(call UnixPath,$(ANT_HOME)) " >> $@.tmp
     5.6  endif
     5.7 +ifdef ALT_JAVAFX_ZIP_DIR
     5.8 +	@$(ECHO) " --with-javafx-zip-dir=$(call UnixPath,$(ALT_JAVAFX_ZIP_DIR)) " >> $@.tmp
     5.9 +endif
    5.10 +ifdef ALT_WIXDIR
    5.11 +	@$(ECHO) " --with-wix=$(call UnixPath,$(ALT_WIXDIR)) " >> $@.tmp
    5.12 +endif
    5.13 +ifdef ALT_CCSS_SIGNING_DIR
    5.14 +	@$(ECHO) " --with-ccss-signing=$(call UnixPath,$(ALT_CCSS_SIGNING_DIR)) " >> $@.tmp
    5.15 +endif
    5.16  ifdef ALT_SLASH_JAVA
    5.17  	@$(ECHO) " --with-java-devtools=$(call UnixPath,$(ALT_SLASH_JAVA)/devtools) " >> $@.tmp
    5.18  endif
     6.1 --- a/common/src/fixpath.c	Wed Jan 02 15:36:00 2013 +0100
     6.2 +++ b/common/src/fixpath.c	Thu Jan 03 20:54:38 2013 +0100
     6.3 @@ -29,6 +29,29 @@
     6.4  #include <string.h>
     6.5  #include <malloc.h>
     6.6  
     6.7 +void report_error()
     6.8 +{
     6.9 +  LPVOID lpMsgBuf;
    6.10 +  DWORD dw = GetLastError();
    6.11 +
    6.12 +  FormatMessage(
    6.13 +      FORMAT_MESSAGE_ALLOCATE_BUFFER |
    6.14 +      FORMAT_MESSAGE_FROM_SYSTEM |
    6.15 +      FORMAT_MESSAGE_IGNORE_INSERTS,
    6.16 +      NULL,
    6.17 +      dw,
    6.18 +      MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
    6.19 +      (LPTSTR) &lpMsgBuf,
    6.20 +      0,
    6.21 +      NULL);
    6.22 +
    6.23 +  fprintf(stderr,
    6.24 +          "Could not start process!  Failed with error %d: %s\n",
    6.25 +          dw, lpMsgBuf);
    6.26 +
    6.27 +  LocalFree(lpMsgBuf);
    6.28 +}
    6.29 +
    6.30  /*
    6.31   * Test if pos points to /cygdrive/_/ where _ can
    6.32   * be any character.
    6.33 @@ -256,7 +279,7 @@
    6.34      DWORD exitCode;
    6.35  
    6.36      if (argc<3 || argv[1][0] != '-' || (argv[1][1] != 'c' && argv[1][1] != 'm')) {
    6.37 -        fprintf(stderr, "Usage: fixpath -c|m<path@path@...> /cygdrive/c/WINDOWS/notepad.exe /cygdrive/c/x/test.txt");
    6.38 +        fprintf(stderr, "Usage: fixpath -c|m<path@path@...> /cygdrive/c/WINDOWS/notepad.exe /cygdrive/c/x/test.txt\n");
    6.39          exit(0);
    6.40      }
    6.41  
    6.42 @@ -308,11 +331,10 @@
    6.43                         0,
    6.44                         &si,
    6.45                         &pi);
    6.46 -    if(!rc)
    6.47 -    {
    6.48 -      //Could not start process;
    6.49 -      fprintf(stderr, "Could not start process!\n");
    6.50 -      exit(-1);
    6.51 +    if(!rc) {
    6.52 +      // Could not start process for some reason.  Try to report why:
    6.53 +      report_error();
    6.54 +      exit(rc);
    6.55      }
    6.56  
    6.57      WaitForSingleObject(pi.hProcess,INFINITE);

mercurial