2006-05-16 12:08  orrisroot

	* build/build.xml: fixed output JRE compatibility version to 1.4.

2006-02-14 20:52  orrisroot

	* build/: build.bat, build.sh: fixed foxtrot build script for
	  windows.

2006-02-14 16:26  orrisroot

	* build/build.sh: modified for relation ship of each libraries.

2006-02-14 02:35  orrisroot

	* build/build.sh: modified for samurai graph's tools directory.

2006-02-14 02:07  orrisroot

	* lib/.cvsignore: added lib directory.

2006-02-14 02:03  orrisroot

	* src/core/foxtrot/: AbstractWorkerThread.java, EventPump.java,
	  JREVersion.java, Job.java, Task.java, Worker.java,
	  WorkerThread.java, pumps/EventFilter.java,
	  pumps/EventFilterable.java, pumps/JDK13QueueEventPump.java,
	  pumps/SunJDK140ConditionalEventPump.java,
	  pumps/SunJDK141ConditionalEventPump.java,
	  pumps/SunJDK14ConditionalEventPump.java,
	  workers/DefaultWorkerThread.java: added missing files in core
	  directory.

2006-02-14 01:57  orrisroot

	* src/etc/LICENSE, src/etc/MANIFEST.MF, src/etc/README,
	  src/examples/foxtrot/examples/InterruptExample.java,
	  src/examples/foxtrot/examples/ProgressExample.java,
	  src/examples/foxtrot/examples/SimpleExample.java,
	  src/test/foxtrot/test/EventFilterableTest.java,
	  src/test/foxtrot/test/EventPumpTest.java,
	  src/test/foxtrot/test/FoxtrotTest.java,
	  src/test/foxtrot/test/FoxtrotTestCase.java,
	  src/test/foxtrot/test/MutableInteger.java, build/build.bat,
	  build/build.sh, build/build.xml: Initial revision

2006-02-14 01:57  orrisroot

	* src/etc/LICENSE, src/etc/MANIFEST.MF, src/etc/README,
	  src/examples/foxtrot/examples/InterruptExample.java,
	  src/examples/foxtrot/examples/ProgressExample.java,
	  src/examples/foxtrot/examples/SimpleExample.java,
	  src/test/foxtrot/test/EventFilterableTest.java,
	  src/test/foxtrot/test/EventPumpTest.java,
	  src/test/foxtrot/test/FoxtrotTest.java,
	  src/test/foxtrot/test/FoxtrotTestCase.java,
	  src/test/foxtrot/test/MutableInteger.java, build/build.bat,
	  build/build.sh, build/build.xml: import sources of Foxtrot 2.0
	  into Samurai Graph's CVS repository

Index: build/build.bat
===================================================================
RCS file: /cvsroot/samurai-graph/samurai-graph/contrib/foxtrot/build/build.bat,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- build/build.bat	13 Feb 2006 16:57:17 -0000	1.1.1.1
+++ build/build.bat	14 Feb 2006 11:52:29 -0000	1.2
@@ -1,21 +1,106 @@
-@echo off
-
-setlocal
-
-if not "%JAVA_HOME%"=="" goto start
-
-echo JAVA_HOME not set
-goto end
-
-:start
-
-set CP=ant.jar
-set CP=%CP%;optional.jar
-set CP=%CP%;jaxp.jar
-set CP=%CP%;crimson.jar
-set CP=%CP%;..\lib\junit.jar
-set CP=%CP%;%JAVA_HOME%\lib\tools.jar
-
-%JAVA_HOME%\bin\java -cp "%CP%" org.apache.tools.ant.Main %*
-
-:end
+@echo off
+
+setlocal
+
+set LOG_FILE=%cd%\samirai-graph.log
+
+rem set directory
+
+set CURRENT_PATH=%cd%\
+set SCRIPT_PATH=%~d0%~p0
+set CONTRIB_PATH=%SCRIPT_PATH%..\..
+set TOOLS_PATH=%SCRIPT_PATH%..\..\..\tools
+
+rem set absolute directory
+
+cd /d %SCRIPT_PATH%
+set SCRIPT_PATH=%cd%\
+cd /d %CONTRIB_PATH%
+set CONTRIB_PATH=%cd%\
+cd /d %TOOLS_PATH%
+set TOOLS_PATH=%cd%\
+cd /d %CURRENT_PATH%
+
+rem set done file
+
+set DONE_FILE=%CONTRIB_PATH%_build_foxtrot_done
+
+rem build depend jar files
+
+rem class path
+set CLASSPATH=
+
+rem ant command
+set ANT=%TOOLS_PATH%ant.bat
+
+goto check_arguments
+
+rem build functions
+
+:build_foxtrot
+set errcode=0
+cd /d "%SCRIPT_PATH%"
+if exist %DONE_FILE% goto build_foxtrot_done
+  echo [foxtrot] creating foxtrot.jar ...
+  call "%ANT%" > "%LOG_FILE%" 2>&1
+  if errorlevel 0 goto build_foxtrot_success
+  set errcode=1
+  echo error
+  type "%LOG_FILE%"
+  goto build_foxtrot_clean
+  :build_foxtrot_success
+  copy nul "%DONE_FILE%" > nul 2>&1
+  :build_foxtrot_clean
+  del /f "%LOG_FILE%"
+:build_foxtrot_done
+cd /d "%CURRENT_PATH%"
+goto %RETURN_LABEL%
+
+:clean_foxtrot
+set errcode=0
+cd /d "%SCRIPT_PATH%"
+if not exist %DONE_FILE% goto clean_foxtrot_done
+echo [foxtrot] deleting foxtrot.jar ...
+call "%ANT%" clean > "%LOG_FILE%" 2>&1
+if errorlevel 0 goto clean_foxtrot_success
+set errcode=1
+echo error
+type "%LOG_FILE%"
+goto clean_foxtrot_clean
+:clean_foxtrot_success
+del /f "%DONE_FILE%"
+:clean_foxtrot_clean
+del /f "%LOG_FILE%"
+:clean_foxtrot_done
+cd /d "%CURRENT_PATH%"
+goto %RETURN_LABEL%
+
+:check_arguments
+if "%1" == "" goto print_usage
+if "%1" == "build" goto do_build
+if "%1" == "rebuild" goto do_rebuild
+if "%1" == "clean" goto do_clean
+
+:print_usage
+echo Usage: %0 { build, rebuild, clean }
+goto finised
+
+:do_build
+set RETURN_LABEL=finised
+goto build_foxtrot
+
+:do_rebuild
+set RETURN_LABEL=do_rebuild2
+goto clean_foxtrot
+:do_rebuild2
+if %errcode% == 1 goto finised
+set RETURN_LABEL=finised
+goto build_foxtrot
+
+:do_clean
+set RETURN_LABEL=finised
+goto clean_foxtrot
+
+:finised
+
+endlocal
Index: build/build.sh
===================================================================
RCS file: /cvsroot/samurai-graph/samurai-graph/contrib/foxtrot/build/build.sh,v
retrieving revision 1.1.1.1
retrieving revision 1.4
diff -u -r1.1.1.1 -r1.4
--- build/build.sh	13 Feb 2006 16:57:17 -0000	1.1.1.1
+++ build/build.sh	14 Feb 2006 11:52:30 -0000	1.4
@@ -1,15 +1,90 @@
 #!/bin/sh
+LOGFILE=/tmp/samurai-graph-$$.log
 
-if test -z "${JAVA_HOME}" ; then
-    echo "ERROR: JAVA_HOME not found in your environment."
-    exit
-fi
-
-export CLASSPATH=ant.jar
-export CLASSPATH=$CLASSPATH:optional.jar
-export CLASSPATH=$CLASSPATH:jaxp.jar
-export CLASSPATH=$CLASSPATH:crimson.jar
-export CLASSPATH=$CLASSPATH:../lib/junit.jar
-export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/tools.jar
+# set directory
+CURRENT_PATH=`pwd`
+SCRIPT_PATH=`dirname $0`
+CONTRIB_PATH=$SCRIPT_PATH/../..
+TOOLS_PATH=$SCRIPT_PATH/../../../tools
 
-$JAVA_HOME/bin/java -classpath $CLASSPATH org.apache.tools.ant.Main $@
+# function for getting absolute directory
+get_absolute_dir() {
+    current_dir=`pwd`
+    cd "$1"
+    absolute_dir=`pwd`
+    cd $current_dir
+    echo "$absolute_dir"
+}
+
+# set absolute directory
+SCRIPT_PATH=`get_absolute_dir $SCRIPT_PATH`
+CONTRIB_PATH=`get_absolute_dir $CONTRIB_PATH`
+TOOLS_PATH=`get_absolute_dir $TOOLS_PATH`
+
+# set done file
+DONEFILE=$CONTRIB_PATH/_build_foxtrot_done
+
+# build depend jar files
+# class path
+CLASSPATH=
+export CLASSPATH
+
+# ant command
+ANT=$TOOLS_PATH/ant.sh
+
+# build functions
+build_foxtrot () {
+  cd $SCRIPT_PATH
+  if [ ! -f $DONEFILE ]; then
+    echo -n "[foxtrot] creating foxtrot.jar ... "
+    $ANT > $LOGFILE 2>&1
+    if [ $? != 0 ]; then
+      echo error
+      cat $LOGFILE
+      rm -f $LOGFILE
+      exit 1
+    else
+      echo "done"
+    fi
+    touch $DONEFILE
+    rm -f $LOGFILE
+  fi
+  cd $CURRENT_PATH
+}
+
+clean_foxtrot () {
+  cd $SCRIPT_PATH
+  rm -f $DONEFILE
+  echo -n "[foxtrot] deleting jar files ..."
+  $ANT clean > $LOGFILE 2>&1
+  if [ $? != 0 ]; then
+    echo error
+    cat $LOGFILE
+    rm -f $LOGFILE
+    exit 1
+  else
+    rm -f $LOGFILE
+    echo done
+  fi
+  cd $CURRENT_PATH
+}
+
+
+case "$1" in
+rebuild)
+  clean_foxtrot
+  build_foxtrot
+  ;;
+build)
+  build_foxtrot
+  ;;
+clean)
+  clean_foxtrot
+  ;;
+*)
+  echo "Usage: ${0##*/}: { build | rebuild | clean }" 2>&1
+  exit 65
+  ;;
+esac
+
+exit 0
Index: build/build.xml
===================================================================
RCS file: /cvsroot/samurai-graph/samurai-graph/contrib/foxtrot/build/build.xml,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- build/build.xml	13 Feb 2006 16:57:17 -0000	1.1.1.1
+++ build/build.xml	16 May 2006 03:08:00 -0000	1.2
@@ -67,6 +67,8 @@
       <javac srcdir="${core.src.dir}"
          destdir="${core.classes.dir}"
          debug="on"
+         target="1.4"
+         source="1.4"
          deprecation="on">
       </javac>
 
@@ -74,6 +76,8 @@
       <javac srcdir="${examples.src.dir}"
          destdir="${examples.classes.dir}"
          debug="on"
+         target="1.4"
+         source="1.4"
          deprecation="on"
          classpath="${core.classes.dir}">
       </javac>
@@ -82,6 +86,8 @@
       <javac srcdir="${test.src.dir}"
          destdir="${test.classes.dir}"
          debug="on"
+         target="1.4"
+         source="1.4"
          deprecation="on">
          <classpath>
             <pathelement location="${core.classes.dir}"/>
Index: makelog.sh
===================================================================
RCS file: makelog.sh
diff -N makelog.sh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ makelog.sh	13 Feb 2006 17:35:38 -0000	1.1
@@ -0,0 +1,82 @@
+#!/bin/sh
+
+original_tag=after_FOXTROT_2_0
+branche_tag=HEAD
+
+log_targets="src build lib"
+
+cvsroot=:ext:cvs.sourceforge.jp:/cvsroot/samurai-graph
+module=samurai-graph
+srcdir=contrib/foxtrot
+
+log=SAMURAIGRAPH-ChangeLog.txt
+log_newline=crlf
+
+# define which command
+cmd_which () {
+  COMMAND="$1"
+  OUTPUT=
+  IFS=:
+  for dir in $PATH
+  do
+    if test -x "$dir/$COMMAND" ; then
+      if test "x$OUTPUT" = "x" ; then
+        OUTPUT="$dir/$COMMAND"
+      fi
+    fi
+  done
+  echo "$OUTPUT"
+}
+cmd_error () {
+  COMMAND="$1"
+  OUTPUT="$2"
+  if test -z $OUTPUT; then
+    echo "Error: $COMMAND not fould."
+    exit
+  fi
+}
+
+cvs=`cmd_which cvs`
+cmd_error cvs $cvs
+cvs2cl=`cmd_which cvs2cl`
+cmd_error cvs2cl $cvs2cl
+diff=`cmd_which diff`
+cmd_error diff $diff
+cat=`cmd_which cat`
+cmd_error cat $cat
+unix2dos=`cmd_which unix2dos`
+cmd_error unix2dos $unix2dos
+dos2unix=`cmd_which dos2unix`
+cmd_error dos2unix $dos2unix
+
+# set working directory
+current_dir=`dirname $0`
+cd $current_dir
+
+# checkout current source
+$cvs -z3 -d $cvsroot co -P -r $branche_tag $module/$srcdir > /dev/null 2>&1
+
+tmp=output.diff
+files=`(cd $module/$srcdir && ls)`
+for i in $files; do
+  if test $i != $log && test $i != CVS; then
+    (cd $module/$srcdir && $cvs -z3 diff -uN -r $original_tag $i) >> $tmp 2> /dev/null
+  fi
+done
+$dos2unix $tmp
+
+# create change log
+(cd $module/$srcdir && $cvs2cl $log_targets) > /dev/null 2>&1
+
+# copy log file
+cp $module/$srcdir/ChangeLog $log
+
+# append diff to changelog
+$cat $tmp >> $log
+
+test $log_newline = crlf && $unix2dos $log
+
+# cleanup
+rm $tmp
+rm -rf $module
+
