harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dlyd...@apache.org
Subject svn commit: r326448 - in /incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM: common.sh dist-doc.sh
Date Wed, 19 Oct 2005 08:03:24 GMT
Author: dlydick
Date: Wed Oct 19 01:03:14 2005
New Revision: 326448

URL: http://svn.apache.org/viewcvs?rev=326448&view=rev
Log:
Verify with user that the configured release level is the actual
release number target that should be built and recommend running
'config.sh' if this is not accurate.

Use symbolic link instead of directory rename for release path name.

Create distribution .tar.gz files at '..' instead of '../..' now that
the SVN repository is in use and its structure is known.

Minor functional adjustments visible only internal to the script.

Modified:
    incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/common.sh
    incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/dist-doc.sh

Modified: incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/common.sh
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/common.sh?rev=326448&r1=326447&r2=326448&view=diff
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/common.sh (original)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/common.sh Wed Oct 19
01:03:14 2005
@@ -1,7 +1,7 @@
 #!/bin/sh
 #
 #!
-# @file /home/dlydick/harmony/bootJVM/common.sh
+# @file /home/dlydick/harmony/bootjvm/bootJVM/common.sh
 #
 # @brief Common code for @link ./build.sh build.sh@endlink and
 # @link ./clean.sh clean.sh@endlink and
@@ -122,12 +122,15 @@
 #            jni/src/harmony/generic/0.0/common.sh@endlink
 #
 #
-# @todo  A Windows .BAT version of this script needs to be written
+# @todo  HARMONY-6-common.sh-1 A Windows .BAT version of this
+#        script needs to be written
 #
 #
 # @section Control
 #
-# \$URL$ \$Id$
+# \$URL$
+#
+# \$Id$
 #
 # Copyright 2005 The Apache Software Foundation
 # or its licensors, as applicable.
@@ -151,6 +154,7 @@
 # @date \$LastChangedDate$
 #
 # @author \$LastChangedBy$
+#
 #         Original code contributed by Daniel Lydick on 09/28/2005.
 #
 # @section Reference
@@ -333,20 +337,56 @@
 # 'tar' file.
 #
 
+DistChkReleaseLevel()
+{
+RELSPEC1="$CONFIG_RELEASE_LEVEL"
+RELSPEC2="$CONFIG_CPUTYPE-$CONFIG_OSNAME-$CONFIG_WORDWIDTH"
+    echo "$PGMNAME:  Ready to distribute release '$RELSPEC1-$RELSPEC2'"
+    echo ""
+    $echon "    Is this the correct release level?  [y,n] $echoc"
+    read readrelslvl
+    echo ""
+
+    case $readrelslvl in
+        y|ye|yes|Y|YE|YES)
+            ;;
+        *)  echo ""
+            echo \
+"$PGMNAME:  Please run 'config.sh' and set correct release level."
+            exit 1
+    esac
+
+}
+
 # Names of documentation tar file and source distribution tar file
 PREFMTDOCSTAR="bootJVM-docs.tar"
 
 # Can't add release level unless 'config.sh' can locate release level:
 #PREFMTDOCSTAR="bootJVM-docs-$CONFIG_RELEASE_LEVEL.tar"
 
-DISTBINTAR="bootJVM-bin-$CONFIG_RELEASE_LEVEL.tar"
+DISTBINTAR="bootJVM-bin-$CONFIG_RELEASE_LEVEL-$CONFIG_CPUTYPE-$CONFIG_OSNAME-$CONFIG_WORDWIDTH.tar"
 DISTDOCTAR="bootJVM-doc-$CONFIG_RELEASE_LEVEL.tar"
 DISTSRCTAR="bootJVM-src-$CONFIG_RELEASE_LEVEL.tar"
+DISTSRCDOCTAR="bootJVM-srcdoc-$CONFIG_RELEASE_LEVEL.tar"
 
 # Transient storage for keeping existing old configuration
 PGMTMP=../tmp.$$.$PGMNAME
 
 
+DistChkTarget()
+{
+    TARGET_BASENAME="bootJVM-$CONFIG_RELEASE_LEVEL"
+    TARGET_HOME="$TARGET_BASENAME"
+    if test -h ../$TARGET_HOME -o \
+            -d ../$TARGET_HOME -o \
+            -f ../$TARGET_HOME
+    then
+        echo ""
+        echo "$PGMNAME: Target ../$TARGET_HOME exists"
+        exit 2
+    fi
+}
+
 DistPrep()
 {
     # Keep existing configuration in temp area for later restoration
@@ -373,6 +413,7 @@
     #     exit 4
     # fi
 
+    chmod +w .
     if test -f $PREFMTDOCSTAR.gz
     then
         mv $PREFMTDOCSTAR.gz $PGMTMP
@@ -383,7 +424,6 @@
     fi
     if test -d doc.ORIG
     then
-        chmod +w doc.ORIG
         mv doc.ORIG $PGMTMP
     fi
     if test -d bootclasspath
@@ -395,24 +435,30 @@
 CDSD="config/config_dox_setup.dox"
 DistDocPrep ()
 {
-    echo ""
-    echo "$PGMNAME: Creating documentation set in _all_ formats"
-
     # Keep old doc cfg file, generate all-inclusive temporary one
+    # that overrides certain variable setings.
+    chmod +w config $CDSD
+    if test -f ${CDSD}.ORIG
+    then
+        chmod +w ${CDSD}.ORIG
+    fi
     rm -f ${CDSD}.ORIG
-    mv $CDSD ${CDSD}.ORIG
+    cp $CDSD ${CDSD}.ORIG
     (
         echo "GENERATE_HTML=YES"
         echo "GENERATE_LATEX=YES"
         echo "GENERATE_RTF=YES"
         echo "GENERATE_MAN=YES"
         echo "GENERATE_XML=YES"
-    ) > $CDSD
+    ) >> $CDSD
 }
 
 
 DistTargetBuild ()
 {
+    echo ""
+    echo \
+"$PGMNAME: Creating documentation in _all_ formats via 'build.sh $1'"
     # Make SURE the output area is clean
     SUPPRESS_DOXYGEN_VERYCLEAN=
     export SUPPRESS_DOXYGEN_VERYCLEAN

Modified: incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/dist-doc.sh
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/dist-doc.sh?rev=326448&r1=326447&r2=326448&view=diff
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/dist-doc.sh (original)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/dist-doc.sh Wed Oct
19 01:03:14 2005
@@ -25,12 +25,15 @@
 #             Eclipse users without having to change anything.
 #
 #
-# @todo A Windows .BAT version of this script needs to be written
+# @todo  HARMONY-6-dist-doc.sh-1 A Windows .BAT version of this
+#        script needs to be written
 #
 #
 # @section Control
 #
-# \$URL$ \$Id$
+# \$URL$
+#
+# \$Id$
 #
 # Copyright 2005 The Apache Software Foundation
 # or its licensors, as applicable.
@@ -54,6 +57,7 @@
 # @date \$LastChangedDate$
 #
 # @author \$LastChangedBy$
+#
 #         Original code contributed by Daniel Lydick on 09/28/2005.
 #
 # @section Reference
@@ -86,6 +90,10 @@
 #
 # Clean up everything and rebuild it.
 #
+DistChkReleaseLevel
+
+DistChkTarget
+
 ./clean.sh all
 
 DistPrep
@@ -94,8 +102,6 @@
 
 DistTargetBuild dox
 
-DistConfigPrep
-
 echo ""
 echo "$PGMNAME: Setting target directory permissions"
 umask 022
@@ -118,38 +124,38 @@
 cd doc.ORIG
 TMPTIMESTAMPFILE=${TMPDIR:-/tmp}/tmp.$PGMNAME.$$
 rm -f $TMPTIMESTAMPFILE
-touch TMPTIMESTAMPFILE
+touch $TMPTIMESTAMPFILE
 for f in `find . -type f -print`
 do
     chmod +w $f
-    touch -r TMPTIMESTAMPFILE $f
+    touch -r $TMPTIMESTAMPFILE $f
     chmod -w $f
 done
 rm -f $TMPTIMESTAMPFILE
 cd ..
 
-TARGET_HOME="harmony/bootJVM-$CONFIG_RELEASE_LEVEL"
-cd ../..
-mv harmony/bootJVM $TARGET_HOME
-
 echo ""
-echo "$PGMNAME: Creating distribution file '../../$DISTDOCTAR'"
+echo "$PGMNAME: Creating distribution file '../$DISTDOCTAR'"
+
+cd ..
+ln -s bootJVM $TARGET_HOME
 
 rm -f $DISTDOCTAR
 tar cf $DISTDOCTAR $TARGET_HOME/doc.ORIG
-mv $TARGET_HOME harmony/bootJVM
+rm $TARGET_HOME
 
 if test ! -r $DISTDOCTAR
 then
     echo ""
-    echo "$PGMNAME: Directory `cd ../..; pwd` is not writable."
+    echo "$PGMNAME: Cannot locate '../$DISTDOCTAR'."
+    echo "$PGMNAME: Directory `cd ..; pwd` is probably not writable."
     echo "$PGMNAME: Please make it writable and try again."
     exit 4
 fi
 
 echo ""
 echo \
-   "$PGMNAME: Compressing distribution file into '../../$DISTDOCTAR.gz'"
+   "$PGMNAME: Compressing distribution file into '../$DISTDOCTAR.gz'"
 rm -f $DISTDOCTAR.gz
 gzip $DISTDOCTAR
 if test ! -r $DISTDOCTAR.gz
@@ -160,13 +166,11 @@
 fi
 
 chmod 0444 $DISTDOCTAR.gz
-cd harmony/bootJVM
+cd bootJVM
 
 chmod -R +w doc.ORIG
 mv doc.ORIG doc
 
-DistConfigUnPrep
-
 DistDocUnPrep
 
 DistUnPrep
@@ -174,7 +178,7 @@
 echo ""
 echo "$PGMNAME: Documentation distribution tar file created:"
 echo ""
-ls -l ../../$DISTDOCTAR.gz
+ls -l ../$DISTDOCTAR.gz
 echo ""
 
 ###################################################################



Mime
View raw message