ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@locus.apache.org
Subject cvs commit: jakarta-ant/src/bin ant
Date Thu, 13 Jul 2000 15:23:54 GMT
conor       00/07/13 08:23:50

  Modified:    .        bootstrap.bat bootstrap.sh build.sh build.xml
               src/bin  ant
  Log:
  New build procedure for Unix based systems
  
  This is the update for the Unix based build scripts. The changes are the
  following
  
  Automatic bootstrapping if lib/ant.jar is mising or the bin files
  are not present
  
  Removed inclusion of the $HOME/.antrc in the bootstrap.sh although
  it is still used in the ant shell script.
  
  Lined up Windows and Unix scripts, including echo statements so it is easier
  to make changes affecting both envionments in the future.
  
  Added chmod calls to the install targets so the ant shell scripts are
  executable.
  
  Revision  Changes    Path
  1.15      +15 -10    jakarta-ant/bootstrap.bat
  
  Index: bootstrap.bat
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/bootstrap.bat,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- bootstrap.bat	2000/07/12 22:30:39	1.14
  +++ bootstrap.bat	2000/07/13 15:23:41	1.15
  @@ -18,33 +18,38 @@
   echo.
   echo ... Bootstrapping Ant Distribution
   
  -SET LOCALCLASSPATH=classes;src\main
   if exist lib\ant.jar erase lib\ant.jar
  +
  +SET LOCALCLASSPATH=
   for %%i in (lib\*.jar) do call src\bin\lcp.bat %%i
  +
   if exist %JAVA_HOME%\lib\tools.jar call src\bin\lcp.bat %JAVA_HOME%\lib\tools.jar
   if exist %JAVA_HOME%\lib\classes.zip call src\bin\lcp.bat %JAVA_HOME%\lib\classes.zip
  -SET CLASSPATH=%CLASSPATH%;%LOCALCLASSPATH%
  +
  +set TOOLS=src\main\org\apache\tools
  +set CLASSDIR=classes
  +
  +SET CLASSPATH=%CLASSPATH%;%LOCALCLASSPATH%;%CLASSDIR%;src\main
   
   echo JAVA_HOME=%JAVA_HOME%
   echo JAVA=%JAVA%
   echo JAVAC=%JAVAC%
   echo CLASSPATH=%CLASSPATH%
   
  -if     "%OS%" == "Windows_NT" if exist classes\nul rmdir/s/q classes
  -if not "%OS%" == "Windows_NT" if exist classes\nul deltree/y classes
  -mkdir classes
  +if     "%OS%" == "Windows_NT" if exist %CLASSDIR%\nul rmdir/s/q %CLASSDIR%
  +if not "%OS%" == "Windows_NT" if exist %CLASSDIR%\nul deltree/y %CLASSDIR%
   
  -set TOOLS=src\main\org\apache\tools
  +mkdir %CLASSDIR%
   
   echo.
   echo ... Compiling Ant Classes
   
  -%JAVAC% -d classes %TOOLS%\tar\*.java %TOOLS%\ant\*.java %TOOLS%\ant\taskdefs\*.java
  +%JAVAC% -d %CLASSDIR% %TOOLS%\tar\*.java %TOOLS%\ant\*.java %TOOLS%\ant\taskdefs\*.java
   
   echo.
   echo ... Copying Required Files
   
  -copy %TOOLS%\ant\taskdefs\*.properties classes\org\apache\tools\ant\taskdefs
  +copy %TOOLS%\ant\taskdefs\*.properties %CLASSDIR%\org\apache\tools\ant\taskdefs
   
   echo.
   echo ... Building Ant Distribution
  @@ -54,8 +59,8 @@
   echo.
   echo ... Cleaning Up Build Directories
   
  -if     "%OS%" == "Windows_NT" if exist classes\nul rmdir/s/q classes
  -if not "%OS%" == "Windows_NT" if exist classes\nul deltree/y classes
  +if     "%OS%" == "Windows_NT" if exist %CLASSDIR%\nul rmdir/s/q %CLASSDIR%
  +if not "%OS%" == "Windows_NT" if exist %CLASSDIR%\nul deltree/y %CLASSDIR%
   
   echo.
   echo ... Done Bootstrapping Ant Distribution
  
  
  
  1.16      +19 -22    jakarta-ant/bootstrap.sh
  
  Index: bootstrap.sh
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/bootstrap.sh,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- bootstrap.sh	2000/07/12 16:29:44	1.15
  +++ bootstrap.sh	2000/07/13 15:23:41	1.16
  @@ -1,16 +1,9 @@
   #!/bin/sh
   
  -if [ -f $HOME/.antrc ] ; then 
  -  . $HOME/.antrc
  -fi
  -
  -if [ "$ANT_HOME" = "" ] ; then
  -  ANT_HOME=`pwd`
  -  export ANT_HOME
  -fi
  +ANT_HOME=.
  +export ANT_HOME
   
  -SRCDIR=src/main/org/apache/tools
  -CLASSDIR=classes
  +echo ... Bootstrapping Ant Distribution
   
   if test -f lib/ant.jar ; then
     rm lib/ant.jar
  @@ -32,28 +25,32 @@
     CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/classes.zip
   fi
   
  +TOOLS=src/main/org/apache/tools
  +CLASSDIR=classes
  +
   CLASSPATH=${CLASSPATH}:${CLASSDIR}:src/main
  +export CLASSPATH
   
   mkdir -p ${CLASSDIR}
   
  -export CLASSPATH
  +echo ... Compiling Ant Classes
  +
  +javac  -d ${CLASSDIR} ${TOOLS}/tar/*.java
  +javac  -d ${CLASSDIR} ${TOOLS}/ant/*.java
  +javac  -d ${CLASSDIR} ${TOOLS}/ant/taskdefs/*.java
   
  -echo
  -echo Building with classpath: $CLASSPATH
  -echo
  -
  -javac  -d ${CLASSDIR} ${SRCDIR}/tar/*.java
  -javac  -d ${CLASSDIR} ${SRCDIR}/ant/*.java
  -javac  -d ${CLASSDIR} ${SRCDIR}/ant/taskdefs/*.java
  +echo ... Copying Required Files
   
   cp src/main/org/apache/tools/ant/taskdefs/defaults.properties ${CLASSDIR}/org/apache/tools/ant/taskdefs
   
  +echo ... Building Ant Distribution
  +
   java org.apache.tools.ant.Main clean main bootstrap
  -java org.apache.tools.ant.Main clean 
  +
  +echo ... Cleaning Up Build Directories
   
  -if test ! -d bin; then mkdir bin; fi
  -cp src/bin/antRun bin
  -chmod +x bin/antRun
  +chmod +x bin/ant bin/antRun
   
   rm -rf ${CLASSDIR}
   
  +echo ... Done Bootstrapping Ant Distribution
  
  
  
  1.10      +8 -20     jakarta-ant/build.sh
  
  Index: build.sh
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/build.sh,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- build.sh	2000/07/01 23:33:54	1.9
  +++ build.sh	2000/07/13 15:23:42	1.10
  @@ -1,28 +1,16 @@
   #!/bin/sh
   
  -if [ "$ANT_HOME" = "" ] ; then
  -  ANT_HOME=`pwd`
  -fi
  +REALANTHOME=$ANT_HOME
  +ANT_HOME=.
   export ANT_HOME
  -
  -LOCALCLASSPATH=`echo $ANT_HOME/lib/*.jar | tr ' ' ':'`
  -
  -if [ "$CLASSPATH" != "" ] ; then
  -  LOCALCLASSPATH=$CLASSPATH:$LOCALCLASSPATH
  -fi
   
  -if test -f $JAVA_HOME/lib/tools.jar ; then
  -  LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/tools.jar
  -fi
  +if test ! -f lib/ant.jar -o  ! -x bin/ant -o ! -x bin/antRun ; then
  +  ./bootstrap.sh
  +fi    
   
  -if test -f $JAVA_HOME/lib/classes.zip ; then
  -  LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip
  +if [ "$REALANTHOME" != "" ] ; then
  +  ANT_INSTALL="-Dant.install $REALANTHOME"
   fi
  -
  -echo
  -echo Building with classpath: $LOCALCLASSPATH
  -echo
   
  -chmod 0755 $ANT_HOME/bin/antRun
  +bin/ant $ANT_INSTALL $*
   
  -java -Dant.home=$ANT_HOME -classpath $LOCALCLASSPATH $ANT_OPTS org.apache.tools.ant.Main
$*
  
  
  
  1.36      +4 -0      jakarta-ant/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/build.xml,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- build.xml	2000/07/12 15:54:10	1.35
  +++ build.xml	2000/07/13 15:23:43	1.36
  @@ -192,6 +192,8 @@
       <echo message="installing full copy of ant into ${ant.install}"/>
       <mkdir dir="${ant.install}"/>
       <copydir src="${ant.dist.dir}" dest="${ant.install}"/>
  +    <chmod perm="+x" file="${ant.install}/bin/ant"/>
  +    <chmod perm="+x" file="${ant.install}/bin/antRun"/>
     </target>     
     
     <target name="install" depends="main" if="ant.install">
  @@ -199,6 +201,8 @@
       <mkdir dir="${ant.install}"/>
       <copydir src="${lib.dir}" dest="${ant.install}/lib"/>
       <copydir src="${bin.dir}" dest="${ant.install}/bin"/>
  +    <chmod perm="+x" file="${ant.install}/bin/ant"/>
  +    <chmod perm="+x" file="${ant.install}/bin/antRun"/>
     </target>     
   
     <!-- =================================================================== -->
  
  
  
  1.3       +15 -7     jakarta-ant/src/bin/ant
  
  Index: ant
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/bin/ant,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ant	2000/07/12 16:04:56	1.2
  +++ ant	2000/07/13 15:23:48	1.3
  @@ -37,13 +37,21 @@
     JAVACMD=java
   fi
   
  -# Use the original tools.jar if available
  -if [ ! "$JAVA_HOME" = "" ] ; then
  -   CLASSPATH=${JAVA_HOME}/lib/tools.jar:$CLASSPATH
  -   CLASSPATH=${JAVA_HOME}/lib/classes.zip:$CLASSPATH
  +LOCALCLASSPATH=`echo $ANT_HOME/lib/*.jar | tr ' ' ':'`
  +
  +if [ "$CLASSPATH" != "" ] ; then
  +  LOCALCLASSPATH=$CLASSPATH:$LOCALCLASSPATH
  +fi
  +
  +if [ "$JAVA_HOME" != "" ] ; then
  +  if test -f $JAVA_HOME/lib/tools.jar ; then
  +    LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/tools.jar
  +  fi
  +
  +  if test -f $JAVA_HOME/lib/classes.zip ; then
  +    LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip
  +  fi
   fi
   
  -CLASSPATH=${ANT_HOME}/lib/ant.jar:$CLASSPATH
  -export CLASSPATH
  +$JAVACMD -classpath $LOCALCLASSPATH -Dant.home=${ANT_HOME} $ANT_OPTS org.apache.tools.ant.Main
$@
   
  -$JAVACMD -Dant.home=${ANT_HOME} org.apache.tools.ant.Main $@
  
  
  

Mime
View raw message