install.html #3

  • //
  • guest/
  • julian_hyde/
  • saffron/
  • doc/
  • install.html
  • View
  • Commits
  • Open Download .zip Download (8 KB)
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Saffron installation guide</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css" />
</head>

<body bgcolor="#ffffff">

<table border="1" class="clsStd" width="795" height="136">
  <tr>
    <td colspan="2"><a href="index.html">Top</a> | <a href="http://public.perforce.com/guest/julian_hyde/saffron/doc/index.html">Web home</a> |
      <a href="http://sourceforge.net/projects/saffron/">SourceForge home</a>
    <div align="right">
       <a href="http://sourceforge.net">
	       <img src="http://sourceforge.net/sflogo.php?group_id=46646&type=1" border="0" alt="SourceForge.net Logo">
	    </a>
    </div>
	 </td>
  </tr>
  <tr>
    <td colspan="2"><em>$Id: //guest/julian_hyde/saffron/doc/install.html#3 $</em></td>
  </tr>
  <tr>
    <td colspan="2"><em>(C) Copyright 2002, Julian Hyde</em></td>
  </tr>
  <tr>
    <th align="right">Author</th>
    <td>Julian Hyde (<a href="mailto:julian.hyde@mail.com">julian.hyde@mail.com</a>)</td>
  </tr>
  <tr>
    <th align="right">Created</th>
    <td>February 15<sup>th</sup>, 2002</td>
  </tr>
</table>

<h1>How to build and install Saffron</h1>

<h2><a name="1_Contents">1. Contents</a></h2>
<ol>
  <li><a href="#1_Contents">Contents</a>
  <li><a href="#2_Modification_history">Modification history</a>
  <li><a href="#3_Setup_build_environment">Setup build environment</a>
  <li><a href="#4_Build">Build</a><li><a href="#5_Run_the_demo">Run the demo</a>
  <li><a href="#Appendix_A_Product_installation_instructions">Appendix A: Product installation instructions</a>
  <li><a href="#Appendix_B_Coding_guidelines">Appendix B: Coding guidelines</a>
</ol>

<h2><a name="2_Modification_history">2. Modification history</a></h2>
<table border="1" class="clsStd" width="100%">
  <tr>
    <th>Date</th>
    <th>Revision</th>
    <th>Author</th>
    <th>Comment</th>
  </tr>
  <tr>
    <td><I>February 15<SUP>th</SUP>, 2002</I></td>
    <td><em>1</em></td>
    <td><i>Julian Hyde</i></td>
    <td><em>Created</em></td>
  </tr>
  </table>

<h2><a name="3_Setup_build_environment">3. Setup build environment</a></h2>

<p>Here are the steps to setup a build environment.</p>

<ol>
  <li>Install <a href="#JDK">JDK 1.3.1</a>.</li>
  <li>Install <a href="#Ant">Ant</a>.</li>
  <li>Install <a href="#JUnit">JUnit</a>.</li>
  <li>Install <a href="#JavaCC">JavaCC</a>.</li>
  <li>Modify <code>build.bat</code>, setting <code>JAVACC_HOME</code>, <code>ANT_HOME</code>, <code>
  JUNIT_HOME</code>. (It may be sufficient to just change <code>HOME_DRIVE</code>.)</li>
</ol>

<p>Optional:</p>
<ol>
  <li>Install <a href="#Jikes">Jikes</a>.</li>
</ol>

<h2><a name="4_Build">4. Build</a></h2>
<p>As follows:</p>
<blockquote>
<pre>cd <i>${project.location}</i>
build</pre>
</blockquote>

<h2><a name="5_Run_the_demo">5. Run it</a></h2>
<p>To run the JUnit regression test:</p>
<blockquote>
<pre>build test</pre>
</blockquote>
<p>Or you can run <a href="api/saffron/test/Main.html">class <code>
saffron.test.Main</code></a> using any JUnit test harness. You can control the 
behavior of the test by creating a file called <code>saffron.properties</code>. 
Here is an example:</p>
<blockquote>
  <pre>saffron.Statement.printBeforeCompile=false
saffron.debug.level=0
saffron.package.name=saffron.runtime
saffron.java.dir=D:/saffron/src/examples
saffron.class.dir=D:/saffron/classes
saffron.java.compiler.args=-classpath D:/saffron/classes -d D:/saffron/classes -verbose
saffron.test.Class=sales.InMemorySalesTestCase
saffron.test.Name=testIteratorJoin
#saffron.test.Suite=saffron.runtime.ThreadIterator$Test</pre>
</blockquote>
<p>You'll need an ODBC datasource called <code>empdept</code> in order to run 
the JDBC flavor of the tests.</p>
<p>To generate <code>Sales2.java</code> from <code>Sales2.oj</code> and compile 
it to <code>Sales2.class</code>; and to compile <code>Test.java</code> to <code>
Test.class</code>:</p>
<blockquote>
<pre>cd <i>${project.location}</i>
build compile.examples</pre>
</blockquote>
<p>(There is a bug in the <code>ojavac</code> Ant task. If you get an 
IOException, remove <code>Sales2.java</code> and try again.)</p>
<p>To run <code>Sales2</code>:</p>
<blockquote>
<pre>build run.sales.Sales2</pre>
</blockquote>

<h2><a name="Appendix_A_Product_installation_instructions">Appendix A. Product 
installation instructions</a></h2>

<p>These are the products I used to build saffron. Install all of the products
marked 'required'. (I use <code>/</code>-es in paths because I am run MKS on
Windows 2000, and it makes things simpler.)</p>

<p>In the following, the symbol <code><i>${project.location}</i></code> means the root of your
source tree.</p>

<p>Where the instructions suggest setting an environment variable, it is often 
sufficient to edit the corresponding line in <code><i>${project.location}</i>/build.bat</code>.</p>

<table border="1" class="clsStd" width="100%">
  <tr>
    <th>Product</th>
    <th>Required?</th>
    <th>Version</th>
    <th>Comment</th>
  </tr>
  <tr>
    <td><a name="JDK">JDK</a></td>
    <td>Yes</td>
    <td>1.1 or later (I use version 1.3.1.)</td>
    <td>Available from <a href="http://developer.java.sun.com/" target="_blank">http://developer.java.sun.com/</a>.
      I downloaded <code>j2sdk-1_3_1_02-win.exe</code>, and extracted to <code>E:/jdk1.3.1_02</code>. Set
      <code> JAVA_HOME</code> to same, and <code> CLASS_PATH</code> to <code>%JAVA_HOME%/lib/dt.jar</code>.</td>
  </tr>
  <tr>
    <td><a name="Ant">Ant</a></td>
    <td>Yes</td>
    <td>1.4.1 or later&nbsp;</td>
    <td>I downloaded
<a href="http://jakarta.apache.org/builds/jakarta-ant/release/v1.4.1/bin/jakarta-ant-1.4.1-bin.zip">
jakarta-ant-1.4.1-bin.zip</a>,  extracted to <code>E:/jakarta-ant-1.4.1</code>, 
    and set <code>ANT_HOME</code> to the same.</td>
  </tr>
  <tr>
    <td><a name="Jikes">Jikes</a></td>
    <td>No</td>
    <td>&nbsp;</td>
    <td>Available from <a href="http://oss.software.ibm.com/developerworks/opensource/jikes/" target="_blank">http://oss.software.ibm.com/developerworks/opensource/jikes/</a>.
      I <code>downloaded jikes-1.15-windows.zip</code>, and extracted <code>jikes.exe</code>
      to <code>C:/winnt/system32</code>. Then uncomment the relevant lines of <code><i>${project.location}</i>/build.properties</code>.</td>
  </tr>
  <tr>
    <td><a name="JUnit">JUnit</a></td>
    <td>Yes</td>
    <td>3.7 or later</td>
    <td>Available from <a href="http://www.junit.org/">http://www.junit.org/</a>. I downloaded <code>
    junit3.7.zip</code>, 
    extracted to <code>E:/junit3.7</code>, and set <code>JUNIT_HOME</code> 
    to the same.</td>
  </tr>
  <tr>
    <td><a name="JavaCC">JavaCC</a> (parser generator)</td>
    <td>Yes</td>
    <td>JavaCC2.1</td>
    <td>Available from <a href="http://www.webgain.com/products/java_cc/">http://www.webgain.com/products/java_cc/</a>.
      Install in <code>E:/JavaCC2.1</code> or similar. Edit <code>${project.home}/build.bat</code>.
      Edit <code>${project.home}/build.properties</code>.</td>
  </tr>
  <tr>
    <td>Intellij IDEA (a Java IDE)</td>
    <td>No</td>
    <td>2.5.1</td>
    <td>You can download a 30-day evaluation copy from <a href="http://www.intellij.com/idea/" target="_blank">http://www.intellij.com/idea/</a>.
      Follow the instructions in <code>Install.txt</code> in <code>idea-2_5_1.zip</code>
      to there.</td>
  </tr>
  </table>

<p>&nbsp;</p>

<h2><a name="Appendix_B_Coding_guidelines">Appendix B: Coding guidelines</a></h2>
<ul>
  <li>Indentation 4.</li>
  <li>Tab stop 4 (except openjava source code, whose tab stop is 8).</li>
  <li>Use tabs, not space.</li>
  <li>K&R bracing
convention (that is, open braces on the same line as the preceding 'if', 'else', 'while' statement or 'class' declaration).</li>
  <li>Use braces even for single-line blocks.</li>
  <li>Declare variables as near to
their first use as possible.</li>
  <li>Don't initialize variables with 'dummy' values just
to shut up the compiler.</li>
  <li>Try to keep lines shorter than 80 characters.</li>
  <li>Javadoc comments on
methods are written in the active ('Collects garbage.') not imperative ('Collect
garbage.')</li>
  <li>When editing HTML documents, don't use an editor which reformats the
HTML source (such as Word).</li>
</ul>

<b>
  <table border="1" width="100%" class="clsStd">
    <tr>
      <td>End <i>$Id: //guest/julian_hyde/saffron/doc/install.html#3 $</i></td>
    </tr>
  </table>
  <p>&nbsp;&nbsp;&nbsp; </p>
</b>

</body>

</html>
# Change User Description Committed
#3 1748 Julian Hyde saffron:
convert unit tests to JUnit;
add CallingConvention.ITERABLE;
lots of other stuff;
release 0.1.
#2 1485 Julian Hyde Saffron/Mondrian: John Sichi's feedback.
#1 1461 Julian Hyde saffron: First check in.
Just documents, and the unmodified OpenJava  20001010 source files.