summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@epfl.ch>2008-06-09 13:11:17 +0000
committerLukas Rytz <lukas.rytz@epfl.ch>2008-06-09 13:11:17 +0000
commitd6b6402e4cfc42757df3113beb1302e400c6cb26 (patch)
treedb4d31b40c5142bf7b085a5c841eba63bdac2362
parent3e7f5eaa1f5719d723406d2367cb351db16bdcd8 (diff)
downloadscala-d6b6402e4cfc42757df3113beb1302e400c6cb26.tar.gz
scala-d6b6402e4cfc42757df3113beb1302e400c6cb26.tar.bz2
scala-d6b6402e4cfc42757df3113beb1302e400c6cb26.zip
let supersabbus genarte man pages.
-rw-r--r--build.xml97
-rw-r--r--docs/man/man1/fsc.1148
-rw-r--r--docs/man/man1/sbaz.1188
-rw-r--r--docs/man/man1/scala.1190
-rw-r--r--docs/man/man1/scalac.1340
-rw-r--r--docs/man/man1/scaladoc.1157
-rw-r--r--docs/man/man1/scalap.1107
-rw-r--r--src/manual/scala/tools/docutil/EmitHtml.scala5
-rw-r--r--src/manual/scala/tools/docutil/EmitManPage.scala4
-rw-r--r--src/manual/scala/tools/docutil/ManMaker.scala53
10 files changed, 133 insertions, 1156 deletions
diff --git a/build.xml b/build.xml
index dd0446a839..c089f961d2 100644
--- a/build.xml
+++ b/build.xml
@@ -95,7 +95,7 @@ PROPERTIES
<property name="build-pack.dir" value="${build.dir}/pack"/>
<property name="build-strap.dir" value="${build.dir}/strap"/>
<property name="build-docs.dir" value="${build.dir}/scaladoc"/>
-
+
<property name="dists.dir" value="${basedir}/dists"/>
<property name="copyright.string" value="Copyright 2002-2008, LAMP/EPFL"/>
@@ -416,7 +416,7 @@ QUICK BUILD (QUICK)
<sabmake id="locker.partest.scalac"
destdir="${build-quick.dir}/classes/partest"
compilerpathref="locker.classpath"
- srcpath="${src.dir}/paartest"
+ srcpath="${src.dir}/partest"
target="jvm-1.5">
<compilationpath>
<pathelement location="${build-quick.dir}/classes/library"/>
@@ -512,26 +512,8 @@ PACKED QUICK BUILD (PACK)
</fileset>
</jar>
</target>
-
- <target name="pack.pre-libsrc" depends="pack.start">
- <uptodate
- property="pack.libsrc.available"
- targetfile="${build-pack.dir}/lib/scala-library-src.jar"
- srcfile="${build-quick.dir}/librarysrc.complete"/>
- </target>
- <target name="pack.libsrc" depends="pack.pre-libsrc">
- <mkdir dir="${build-pack.dir}/src"/>
- <jar destfile="${build-pack.dir}/src/scala-library-src.jar">
- <fileset dir="${src.dir}/library"/>
- <fileset dir="${src.dir}/actors"/>
- </jar>
- <jar destfile="${build-pack.dir}/src/scala-dbc-src.jar">
- <fileset dir="${src.dir}/dbc"/>
- </jar>
- </target>
-
- <target name="pack.pre-comp" depends="pack.lib">
+ <target name="pack.pre-comp" depends="pack.lib">
<uptodate
property="pack.comp.available"
targetfile="${build-pack.dir}/lib/scala-compiler.jar"
@@ -621,9 +603,27 @@ PACKED QUICK BUILD (PACK)
</target>
<!-- ===========================================================================
-PACKED QUICK BUILD FOR ECLIPSE PLUGIN DEVELOPMENT (PLUGIN)
+PACKED QUICK BUILD FOR ECLIPSE PLUGINDEVELOPMENT (PLUGIN)
============================================================================ -->
+ <target name="pack.pre-libsrc" depends="pack.start">
+ <uptodate
+ property="pack.libsrc.available"
+ targetfile="${build-pack.dir}/lib/scala-library-src.jar"
+ srcfile="${build-quick.dir}/librarysrc.complete"/>
+ </target>
+
+ <target name="pack.libsrc" depends="pack.pre-libsrc">
+ <mkdir dir="${build-pack.dir}/src"/>
+ <jar destfile="${build-pack.dir}/src/scala-library-src.jar">
+ <fileset dir="${src.dir}/library"/>
+ <fileset dir="${src.dir}/actors"/>
+ </jar>
+ <jar destfile="${build-pack.dir}/src/scala-dbc-src.jar">
+ <fileset dir="${src.dir}/dbc"/>
+ </jar>
+ </target>
+
<target name="plugin.quick" depends="pack.lib, pack.libsrc"/>
<!-- ===========================================================================
@@ -834,8 +834,48 @@ DOCUMENTATION
<touch file="${build-docs.dir}/library.complete" verbose="no"/>
<stopwatch name="docs.lib.timer" action="total"/>
</target>
-
- <target name="docs.pre-comp" depends="docs.lib">
+
+ <target name="docs.pre-man" depends="docs.lib">
+ <uptodate property="docs.man.available" targetfile="${build-docs.dir}/manual.complete">
+ <srcfiles dir="${src.dir}/manual"/>
+ </uptodate>
+ </target>
+
+ <target name="docs.manmaker" depends="docs.pre-man" unless="docs.man.available">
+ <mkdir dir="${build.dir}/manmaker/classes"/>
+ <scalac
+ destdir="${build.dir}/manmaker/classes"
+ classpathref="pack.classpath"
+ srcdir="${src.dir}/manual"
+ includes="**/*.scala"/>
+ <path id="manual.classpath">
+ <pathelement location="${build-pack.dir}/lib/scala-library.jar"/>
+ <pathelement location="${build.dir}/manmaker/classes"/>
+ </path>
+ </target>
+
+ <target name="docs.man" depends="docs.manmaker" unless="docs.man.available">
+ <mkdir dir="${build-docs.dir}/manual/man/man1"/>
+ <mkdir dir="${build-docs.dir}/manual/html"/>
+ <taskdef name="genman"
+ classname="scala.tools.docutil.ManMaker"
+ classpathref="manual.classpath"/>
+ <genman command="fsc, sbaz, scala, scalac, scaladoc, scalap"
+ htmlout="${build-docs.dir}/manual/html"
+ manout="${build-docs.dir}/manual/man"/>
+ <fixcrlf srcdir="${build-docs.dir}/manual" eol="unix" includes="**/*.1"/>
+ <copy todir="${build-docs.dir}/manual/html">
+ <fileset dir="${src.dir}/manual/scala/tools/docutil/resources">
+ <include name="**/*.html"/>
+ <include name="**/*.css"/>
+ <include name="**/*.gif"/>
+ <include name="**/*.png"/>
+ </fileset>
+ </copy>
+ <touch file="${build-docs.dir}/manual.complete" verbose="no"/>
+ </target>
+
+ <target name="docs.pre-comp" depends="docs.man">
<uptodate property="docs.comp.available" targetfile="${build-docs.dir}/compiler.complete">
<srcfiles dir="${src.dir}/compiler"/>
</uptodate>
@@ -856,10 +896,11 @@ DOCUMENTATION
<stopwatch name="docs.comp.timer" action="total"/>
</target>
- <target name="docs.done" depends="docs.lib"/>
+ <target name="docs.done" depends="docs.man"/>
<target name="docs.clean">
<delete dir="${build-docs.dir}" includeemptydirs="yes" quiet="yes" failonerror="no"/>
+ <delete dir="${build.dir}/manmaker" includeemptydirs="yes" quiet="yes" failonerror="no"/>
</target>
<!-- ===========================================================================
@@ -932,12 +973,16 @@ DISTRIBUTION
<copy toDir="${dist.dir}/doc/scala/examples">
<fileset dir="${docs.dir}/examples"/>
</copy>
+ <mkdir dir="${dist.dir}/doc/scala/tools"/>
+ <copy toDir="${dist.dir}/doc/scala/tools">
+ <fileset dir="${build-docs.dir}/manual/html"/>
+ </copy>
</target>
<target name="dist.man" depends="dist.doc">
<mkdir dir="${dist.dir}/man"/>
<copy toDir="${dist.dir}/man">
- <fileset dir="${docs.dir}/man"/>
+ <fileset dir="${build-docs.dir}/manual/man"/>
</copy>
</target>
diff --git a/docs/man/man1/fsc.1 b/docs/man/man1/fsc.1
deleted file mode 100644
index 8b42952a6b..0000000000
--- a/docs/man/man1/fsc.1
+++ /dev/null
@@ -1,148 +0,0 @@
-.\" ##########################################################################
-.\" # __ #
-.\" # ________ ___ / / ___ Scala 2 On-line Manual Pages #
-.\" # / __/ __// _ | / / / _ | (c) 2002-2007, LAMP/EPFL #
-.\" # __\ \/ /__/ __ |/ /__/ __ | #
-.\" # /____/\___/_/ |_/____/_/ | | http://scala-lang.org/ #
-.\" # |/ #
-.\" ##########################################################################
-.\"
-.\" Process this file with nroff -man scala.1
-.\"
-.TH fsc 1 "January 18, 2007" "version 0.4" "USER COMMANDS"
-.\"
-.\" ############################## NAME ###############################
-.\"
-.SH NAME
-.PP
-\fBfsc\fR \- Fast offline compiler for the Scala 2 language
-.\"
-.\" ############################## SYNOPSIS ###############################
-.\"
-.SH SYNOPSIS
-.PP
-\fBfsc\fR [ <\fIoptions\fR> ] <\fIsource files\fR>
-.\"
-.\" ############################## PARAMETERS ###############################
-.\"
-.SH PARAMETERS
-.PP
-.TP
-<\fIoptions\fR>
-Command line options. See \fBOPTIONS\fR below.
-.TP
-<\fIsource files\fR>
-One or more source files to be compiled (such as MyClass.scala).
-.\"
-.\" ############################## OPTIONS ###############################
-.\"
-.SH OPTIONS
-.PP
-The offline compiler supports all options of \fBscalac\fR plus the following:
-.PP
-.TP
-\fB\-reset\fR
-Reset compile server caches.
-.TP
-\fB\-shutdown\fR
-Shut down the compilation daemon. The daemon attempts to restart itself as necessary, but sometimes an explicit shutdown is required. A common example is if jars on the class path have changed.
-.TP
-\fB\-server\fR <\fIhostname:portnumber\fR>
-Specify compile server host at port number. Usually this option is not needed. Note that the hostname must be for a host that shares the same filesystem.
-.TP
-\fB\-J\fR <\fIflag\fR>
-Pass <flag> directly to the Java VM for the compilation daemon.
-.\"
-.\" ############################## DESCRIPTION ###############################
-.\"
-.SH DESCRIPTION
-.PP
-The \fBfsc\fR tool submits Scala compilation jobs to a compilation daemon. The first time it is executed, the daemon is started automatically. On subsequent runs, the same daemon can be reused, thus resulting in a faster compilation. The tool is especially effective when repeatedly compiling with the same class paths, because the compilation daemon can reuse a compiler instance.
-.PP
-The compilation daemon is smart enough to flush its cached compiler when the class path changes. However, if the contents of the class path change, for example due to upgrading a library, then the daemon should be explicitly shut down with \fB-shutdown\fR.
-.PP
-Note that the \fBscala\fR script runner will also use the offline compiler by default, with the same advantages and caveats.
-.\"
-.\" ############################## EXAMPLE ###############################
-.\"
-.SH EXAMPLE
-.PP
-The following session shows a typical speed up due to using the offline compiler.
-
-.nf
-> fsc -verbose -d /tmp test.scala
-...
-[Port number: 32834]
-[Starting new Scala compile server instance]
-[Classpath = ...]
-[loaded directory path ... in 692ms]
-...
-[parsing test.scala]
-...
-[total in 943ms]
-
-> fsc -verbose -d /tmp test.scala
-...
-[Port number: 32834]
-[parsing test.scala]
-...
-[total in 60ms]
-
-> fsc -verbose -d /tmp test.scala
-...
-[Port number: 32834]
-[parsing test.scala]
-...
-[total in 42ms]
-
-> fsc -verbose -shutdown
-[Scala compile server exited]
-
-.fi
-.\"
-.\" ############################## ENVIRONMENT ###############################
-.\"
-.SH ENVIRONMENT
-.PP
-.TP
-\fBJAVACMD\fR
-Specify the \fBjava\fR command to be used for running the Scala code. Arguments may be specified as part of the environment variable; spaces, quotation marks, etc., will be passed directly to the shell for expansion.
-.TP
-\fBJAVA_OPTS\fR
-Specify the options to be passed to the \fBjava\fR command defined by \fBJAVACMD\fR.
-.IP
-With Java 1.5 (or newer) one may for example configure the memory usage of the JVM as follows: JAVA_OPTS="-Xmx512M -Xms16M -Xss16M"
-.IP
-With GNU Java one may configure the memory usage of the GIJ as follows: JAVA_OPTS="--mx512m --ms16m"
-.IP
-
-.\"
-.\" ############################## EXIT STATUS ###############################
-.\"
-.SH "EXIT STATUS"
-.PP
-\fBfsc\fR returns a zero exit status if it succeeds to compile the specified input files. Non zero is returned in case of failure.
-.\"
-.\" ############################## AUTHOR ###############################
-.\"
-.SH AUTHOR
-.PP
-Written by Martin Odersky and other members of the Scala team.
-.\"
-.\" ############################## REPORTING BUGS ###############################
-.\"
-.SH "REPORTING BUGS"
-.PP
-Report bugs to <scala@listes.epfl.ch>.
-.\"
-.\" ############################## COPYRIGHT ###############################
-.\"
-.SH COPYRIGHT
-.PP
-This is open-source software, available to you under a BSD-like license. See accomponying "copyright" or "LICENSE" file for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-.\"
-.\" ############################## SEE ALSO ###############################
-.\"
-.SH "SEE ALSO"
-.PP
-\fBsbaz\fR(1), \fBscala\fR(1), \fBscalac\fR(1), \fBscaladoc\fR(1), \fBscalap\fR(1)
diff --git a/docs/man/man1/sbaz.1 b/docs/man/man1/sbaz.1
deleted file mode 100644
index 90e01376f0..0000000000
--- a/docs/man/man1/sbaz.1
+++ /dev/null
@@ -1,188 +0,0 @@
-.\" ##########################################################################
-.\" # __ #
-.\" # ________ ___ / / ___ Scala 2 On-line Manual Pages #
-.\" # / __/ __// _ | / / / _ | (c) 2002-2007, LAMP/EPFL #
-.\" # __\ \/ /__/ __ |/ /__/ __ | #
-.\" # /____/\___/_/ |_/____/_/ | | http://scala-lang.org/ #
-.\" # |/ #
-.\" ##########################################################################
-.\"
-.\" Process this file with nroff -man scala.1
-.\"
-.TH sbaz 1 "August 24, 2006" "version 0.3" "USER COMMANDS"
-.\"
-.\" ############################## NAME ###############################
-.\"
-.SH NAME
-.PP
-\fBsbaz\fR \- Scala package sharing tool for the Scala 2 language
-.\"
-.\" ############################## SYNOPSIS ###############################
-.\"
-.SH SYNOPSIS
-.PP
-\fBsbaz\fR [ <\fIglobal_options\fR> ] <\fIcommand\fR> [ <\fIcommand_options\fR> ]
-.\"
-.\" ############################## PARAMETERS ###############################
-.\"
-.SH PARAMETERS
-.PP
-.TP
-<\fIglobal_options\fR>
-Command line options. See \fBOPTIONS\fR below.
-.TP
-<\fIcommand\fR>
-Internal \fBsbaz\fR command.
-.TP
-<\fIcommand_options\fR>
-\fBsbaz\fR command options.
-.\"
-.\" ############################## DESCRIPTION ###############################
-.\"
-.SH DESCRIPTION
-.PP
-The \fBsbaz\fR tool is a system used by Scala enthusiasts to share computer files with each other. In particular, it makes it easy to share libraries and applications.
-.\"
-.\" ############################## OPTIONS ###############################
-.\"
-.SH OPTIONS
-.PP
-The \fBsbaz\fR tool has a set of standard options that are supported on the current development environment and will be supported in future releases.
-.\"
-.\" ############################## Global Options ###############################
-.\"
-.SS "Global Options"
-.PP
-.TP
-\fB\-d\fR <\fIdir\fR>
-Operate on dir as the local managed directory.
-.TP
-\fB\-n\fR | \fB\-\-dryrun\fR
-Do not actually do anything. Only print out what tool would normally do with the following arguments.
-.TP
-\fB\-v\fR | \fB\-\-verbose\fR
-Output messages about what the \fBsbaz\fR tool is doing
-.TP
-\fB\-version\fR
-Display the version information
-.TP
-\fB\--univ\fR <\fIname\fR>
-Operate on the named remote universe, selected from those in the local managed directory's universe. Affects the \fBshare\fR and \fBretract\fR commands.
-.TP
-\fB\--univ-url\fR <\fIurl\fR>
-Operate on the universe at the specified URL. Affects the \fBshare\fR and \fBretract\fR commands.
-.\"
-.\" ############################## Available Commands ###############################
-.\"
-.SS "Available Commands"
-.PP
-.TP
-\fBavailable\fR
-List the available packages for installation; only display the three most recent versions of each package.
-.TP
-\fBavailable\fR \fB\-a\fR
-List the available packages for installation; display all shared versions of each package.
-.TP
-\fBcompact\fR
-Clear the download cache to save space.
-.TP
-\fBhelp\fR
-Display a help message.
-.TP
-\fBinstall\fR
-Install a package.
-.TP
-\fBinstalled\fR
-List the packages that are installed.
-.TP
-\fBkeycreate\fR
-Request that a new key be created.
-.TP
-\fBkeyforget\fR
-Forget the specified key.
-.TP
-\fBkeyknown\fR
-List all known keys.
-.TP
-\fBkeyremember\fR
-Remember the specified key for future use.
-.TP
-\fBkeyremoteknown\fR
-List all keys known to the bazaar server.
-.TP
-\fBkeyrevoke\fR
-Request that a specified key be revoked.
-.TP
-\fBpack\fR <\fIname\fR> <\fIdirectory\fR> [ <\fIoptions\fR> ]
-Create an sbaz package and, if a link base is specified, an advertisement file. The package file is named name-version.sbp. The advertisement file is named name-version.advert. The URL is the advertisement file is the URL base with the package filename appended.
-.TP
-\fBremove\fR
-Remove a package.
-.TP
-\fBretract\fR
-Retract a previously shared package.
-.TP
-\fBsetuniverse\fR
-Set the universe for a directory.
-.TP
-\fBsetup\fR
-Initialize a directory to be managed.
-.TP
-\fBshare\fR <\fIfilename\fR>
-Share a package advertisement on a bazaar.
-.TP
-\fBshare\fR \fB\-i\fR <\fIdescriptor\fR>
-The package advertisement is usually specified in a file, but it may also be specified on the command line with the \fB\-i\fR option.
-.TP
-\fBshare\fR \fB\-\-template\fR
-If \fB\-\-template\fR is specified, then instead of uploading a description, the command prints out a template of a package advertisement.
-.TP
-\fBshow\fR
-Show information about one package.
-.TP
-\fBupdate\fR
-Update the list of available packages.
-.TP
-\fBupgrade\fR
-Upgrade all possible packages.
-.\"
-.\" ############################## EXAMPLES ###############################
-.\"
-.SH EXAMPLES
-.PP
-.TP
-Update the list of available packages.
-\fBsbaz\fR \fBupdate\fR
-.TP
-Upload package description for scala-devel-2.5.1 to the universe
-\fBsbaz\fR \fBshare\fR scala-devel-2.5.1.advert
-.\"
-.\" ############################## EXIT STATUS ###############################
-.\"
-.SH "EXIT STATUS"
-.PP
-\fBsbaz\fR returns a zero exist status if it succeeds to process the specified input files. Non zero is returned in case of failure.
-.\"
-.\" ############################## AUTHOR ###############################
-.\"
-.SH AUTHOR
-.PP
-Written by Lex Spoon.
-.\"
-.\" ############################## REPORTING BUGS ###############################
-.\"
-.SH "REPORTING BUGS"
-.PP
-Report bugs to <scala@listes.epfl.ch>.
-.\"
-.\" ############################## COPYRIGHT ###############################
-.\"
-.SH COPYRIGHT
-.PP
-This is open-source software, available to you under a BSD-like license. See accomponying "copyright" or "LICENSE" file for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-.\"
-.\" ############################## SEE ALSO ###############################
-.\"
-.SH "SEE ALSO"
-.PP
-\fBfsc\fR(1), \fBscala\fR(1), \fBscalac\fR(1), \fBscaladoc\fR(1), \fBscalap\fR(1)
diff --git a/docs/man/man1/scala.1 b/docs/man/man1/scala.1
deleted file mode 100644
index 10ada81ef3..0000000000
--- a/docs/man/man1/scala.1
+++ /dev/null
@@ -1,190 +0,0 @@
-.\" ##########################################################################
-.\" # __ #
-.\" # ________ ___ / / ___ Scala 2 On-line Manual Pages #
-.\" # / __/ __// _ | / / / _ | (c) 2002-2007, LAMP/EPFL #
-.\" # __\ \/ /__/ __ |/ /__/ __ | #
-.\" # /____/\___/_/ |_/____/_/ | | http://scala-lang.org/ #
-.\" # |/ #
-.\" ##########################################################################
-.\"
-.\" Process this file with nroff -man scala.1
-.\"
-.TH scala 1 "April 18, 2007" "version 0.5" "USER COMMANDS"
-.\"
-.\" ############################## NAME ###############################
-.\"
-.SH NAME
-.PP
-\fBscala\fR \- Run code in the Scala 2 language
-.\"
-.\" ############################## SYNOPSIS ###############################
-.\"
-.SH SYNOPSIS
-.PP
-\fBscala\fR [ <\fIoption\fR> ]... [ <\fItorun\fR> <\fIargument\fR>... ]
-.\"
-.\" ############################## PARAMETERS ###############################
-.\"
-.SH PARAMETERS
-.PP
-.TP
-<\fIcompiler-option\fR>
-Any scalac option. See \fBscalac\fR(1).
-.TP
--howtorun:<\fIhow\fR>
-How to execute <\fItorun\fR>, if it is present. Options for <\fIhow\fR> are guess (the default), script, and object.
-.TP
--i
-Requests that a file be pre-loaded. It is only meaningful for interactive shells.
-.TP
--e
-Requests that its argument be executed as Scala code.
-.TP
--savecompiled
-Save this compiled version of scripts in order to speed up later executions of the same script. When running a script, save the compiled version of in a file with the same name as the script but with an extension of .jar. On subsequent runs of the same script, the pre-compiled .jar file will be used if it is newer than the script file.
-.TP
--nocompdaemon
-Do not use the \fBfsc\fR offline compiler.
-.TP
--D<\fIproperty=value\fR>
-Set a Java system property. If no value is specified, then the property is set to the empty string.
-.TP
-<\fItorun\fR>
-A top-level object or a script file to run.
-.TP
-<\fIargument\fR>
-An arguments to pass to <\fItorun\fR>.
-.\"
-.\" ############################## DESCRIPTION ###############################
-.\"
-.SH DESCRIPTION
-.PP
-The \fBscala\fR utility runs Scala code using a Java runtime environment. The Scala code to run is specified in one of three ways:
-.IP " 1."
-With no arguments specified, a Scala shell starts and reads commands interactively.
-.IP " 2."
-With -howtorun:object specified, the fully qualified name of a top-level Scala object may be specified. The object should previously have been compiled using \fBscalac\fR(1).
-.IP " 3."
-With -howtorun:script specified, a file containing Scala code may be specified.
-.PP
-If -howtorun: is left as the default (guess), then the \fBscala\fR command will check whether a file of the specified name exists. If it does, then it will treat it as a script file; if it does not, then it will treat it as the name of an object.
-.PP
-In all three cases, arbitrary scalac options may be specified. The most common option is to specify a classpath with -classpath, but see the \fBscalac\fR(1) page for full details.
-.PP
-If an object is specified to run, then that object must be a top-level Scala object with the specified name. The object must define a method \fBmain\fR with the following signature:
-.TP
-\fBdef\fR main(args: Array[String]): Unit
-.PP
-The method must return a \fBUnit\fR value, and it must accept a \fBString\fR array as a parameter. All arguments specified on the command line will be passed as arguments to the \fBmain\fR method.
-.PP
-If a script file is specified to run, then the file is read and all Scala statements and declarations in the file are processed in order. Any arguments specified will be available via the argsvariable.
-.PP
-Script files may have an optional header fthat is ignored if present. There are two ways to format the header: either beginning with #! and ending with !#, or beginning with ::#! and ending with ::!#.
-.PP
-Such a header must have each header boundary start at the beginning of a line. Headers can be used to make stand-alone script files, as shown in the examples below.
-.PP
-If scala is run from an sbaz(1) directory, then it will add to its classpath any jars installed in the lib directory of the sbaz directory. Additionally, if no -classpath option is specified, then scala will add ".", the current directory, to the end of the classpath.
-.\"
-.\" ############################## OPTIONS ###############################
-.\"
-.SH OPTIONS
-.PP
-If any compiler options are specified, they must be first in the command line and must be followed by a bare hypen ("-") character. If no arguments are specified after the optional compiler arguments, then an interactive Scala shell is started. Otherwise, either a script file is run, or a pre-compiled Scala object is run. It is possible to distinguish the last two cases by using an explicit -object or -script flag, but usually the program can guess correctly.
-.\"
-.\" ############################## ENVIRONMENT ###############################
-.\"
-.SH ENVIRONMENT
-.PP
-.TP
-\fBJAVACMD\fR
-Specify the \fBjava\fR command to be used for running the Scala code. Arguments may be specified as part of the environment variable; spaces, quotation marks, etc., will be passed directly to the shell for expansion.
-.TP
-\fBJAVA_OPTS\fR
-Specify the options to be passed to the \fBjava\fR command defined by \fBJAVACMD\fR.
-.IP
-With Java 1.5 (or newer) one may for example configure the memory usage of the JVM as follows: JAVA_OPTS="-Xmx512M -Xms16M -Xss16M"
-.IP
-With GNU Java one may configure the memory usage of the GIJ as follows: JAVA_OPTS="--mx512m --ms16m"
-.IP
-
-.\"
-.\" ############################## EXAMPLES ###############################
-.\"
-.SH EXAMPLES
-.PP
-Here are some examples of running Scala code:
-.PP
-.TP
-Execute a Scala program generated in the current directory
-\fBscala\fR hello.HelloWorld
-.TP
-Execute a Scala program generated in a user-defined directory \fBclasses\fR
-\fBscala\fR \fB\-classpath\fR classes hello.HelloWorld
-.TP
-Execute a Scala program using a user-defined \fBjava\fR command
-\fBenv JAVACMD\fR=/usr/local/bin/cacao \fBscala\fR \fB\-classpath\fR classes hello.HelloWorld
-.TP
-Execute a Scala program using JVM options
-\fBenv JAVACMD\fR=java \fBJAVA_OPTS\fR="-Dmsg=hello -enableassertions" \fBscala\fR \fB\-classpath\fR classes hello.HelloWorld
-.PP
-Here is a complete Scala script for Unix:
-
-.nf
-#!/bin/sh
-exec scala "$0" "$@"
-!#
-Console.println("Hello, world!")
-argv.toList foreach Console.println
-.fi
-.PP
-Here is a complete Scala script for MS Windows:
-
-.nf
-::#!
-@echo off
-call scala %0 %*
-goto :eof
-::!#
-Console.println("Hello, world!")
-argv.toList foreach Console.println
-.fi
-.PP
-If you want to use the compilation cache to speed up multiple executions of the script, then add -savecompiled to the scala command:
-
-.nf
-#!/bin/sh
-exec scala -savecompiled "$0" "$@"
-!#
-Console.println("Hello, world!")
-argv.toList foreach Console.println
-.fi
-.\"
-.\" ############################## EXIT STATUS ###############################
-.\"
-.SH "EXIT STATUS"
-.PP
-The \fBscala\fR command returns a zero exit status if it succeeds. Non zero is returned in case of any error. If a script or top-level object is executed and returns a value, then that return value is passed on to \fBscala\fR.
-.\"
-.\" ############################## AUTHOR ###############################
-.\"
-.SH AUTHOR
-.PP
-Written by Martin Odersky and other members of the Scala team.
-.\"
-.\" ############################## REPORTING BUGS ###############################
-.\"
-.SH "REPORTING BUGS"
-.PP
-Report bugs to <scala@listes.epfl.ch>.
-.\"
-.\" ############################## COPYRIGHT ###############################
-.\"
-.SH COPYRIGHT
-.PP
-This is open-source software, available to you under a BSD-like license. See accomponying "copyright" or "LICENSE" file for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-.\"
-.\" ############################## SEE ALSO ###############################
-.\"
-.SH "SEE ALSO"
-.PP
-\fBfsc\fR(1), \fBsbaz\fR(1), \fBscalac\fR(1), \fBscaladoc\fR(1), \fBscalap\fR(1)
diff --git a/docs/man/man1/scalac.1 b/docs/man/man1/scalac.1
deleted file mode 100644
index 7ed9c909b2..0000000000
--- a/docs/man/man1/scalac.1
+++ /dev/null
@@ -1,340 +0,0 @@
-.\" ##########################################################################
-.\" # __ #
-.\" # ________ ___ / / ___ Scala 2 On-line Manual Pages #
-.\" # / __/ __// _ | / / / _ | (c) 2002-2007, LAMP/EPFL #
-.\" # __\ \/ /__/ __ |/ /__/ __ | #
-.\" # /____/\___/_/ |_/____/_/ | | http://scala-lang.org/ #
-.\" # |/ #
-.\" ##########################################################################
-.\"
-.\" Process this file with nroff -man scala.1
-.\"
-.TH scalac 1 "April 18, 2007" "version 0.4" "USER COMMANDS"
-.\"
-.\" ############################## NAME ###############################
-.\"
-.SH NAME
-.PP
-\fBscalac\fR \- Compiler for the Scala 2 language
-.\"
-.\" ############################## SYNOPSIS ###############################
-.\"
-.SH SYNOPSIS
-.PP
-\fBscalac\fR [ <\fIoptions\fR> ] <\fIsource files\fR>
-.\"
-.\" ############################## PARAMETERS ###############################
-.\"
-.SH PARAMETERS
-.PP
-.TP
-<\fIoptions\fR>
-Command line options. See \fBOPTIONS\fR below.
-.TP
-<\fIsource files\fR>
-One or more source files to be compiled (such as MyClass.scala).
-.\"
-.\" ############################## OPTIONS ###############################
-.\"
-.SH OPTIONS
-.PP
-The compiler has a set of standard options that are supported on the current development environment and will be supported in future releases. An additional set of non-standard options are specific to the current virtual machine implementation and are subject to change in the future. Non-standard options begin with \fB-X\fR.
-.\"
-.\" ############################## Standard Options ###############################
-.\"
-.SS "Standard Options"
-.PP
-.TP
-\fB\-g:{none,source,line,vars,notc}\fR
-"none" generates no debugging info,
-.IP
-"source" generates only the source file attribute,
-.IP
-"line" generates source and line number information,
-.IP
-"vars" generates source, line number and local variable information,
-.IP
-"notc" generates all of the above and \fIwill not\fR perform tail call optimization.
-.IP
-
-.TP
-\fB\-nowarn\fR
-Generate no warnings
-.TP
-\fB\-verbose\fR
-Output messages about what the compiler is doing
-.TP
-\fB\-deprecation\fR
-Indicate whether source should be compiled with deprecation information; defaults to off (accepted values are: on, off, yes and no)
-.IP
-Available since Scala version 2.2.1
-.IP
-
-.TP
-\fB\-unchecked\fR
-Enable detailed unchecked warnings
-.IP
-Non variable type-arguments in type patterns are unchecked since they are eliminated by erasure
-.IP
-Available since Scala version 2.3.0
-.IP
-
-.TP
-\fB\-classpath\fR <\fIpath\fR>
-Specify where to find user class files (on Unix-based systems a colon-separated list of paths, on Windows-based systems, a semicolon-separate list of paths). This does not override the built-in ("boot") search path.
-.IP
-The default class path is the current directory. Setting the CLASSPATH variable or using the -classpath command-line option overrides that default, so if you want to include the current directory in the search path, you must include "." in the new settings.
-.IP
-
-.TP
-\fB\-sourcepath\fR <\fIpath\fR>
-Specify where to find input source files.
-.TP
-\fB\-bootclasspath\fR <\fIpath\fR>
-Override location of bootstrap class files (where to find the standard built-in classes, such as "scala.List").
-.TP
-\fB\-extdirs\fR <\fIdirs\fR>
-Override location of installed extensions.
-.TP
-\fB\-d\fR <\fIdirectory\fR>
-Specify where to place generated class files.
-.TP
-\fB\-encoding\fR <\fIencoding\fR>
-Specify character encoding used by source files.
-.IP
-The default value is platform-specific (Linux: "UTF8", Windows: "Cp1252"). Executing the following code in the Scala interpreter will return the default value on your system:
-.IP
-\fB scala> \fRnew java.io.InputStreamReader(System.in).getEncoding
-.IP
-
-.TP
-\fB\-target:\fR <\fItarget\fR>
-Specify which backend to use (jvm-1.5,jvm-1.4,msil,cldc).
-.IP
-The default value is "jvm-1.5" (was "jvm-1.4" up to Scala version 2.6.1).
-.IP
-
-.TP
-\fB\-print\fR
-Print program with all Scala-specific features removed
-.TP
-\fB\-optimise\fR
-Generates faster bytecode by applying optimisations to the program
-.TP
-\fB\-explaintypes\fR
-Explain type errors in more detail.
-.TP
-\fB\-uniqid\fR
-Print identifiers with unique names (debugging option).
-.TP
-\fB\-version\fR
-Print product version and exit.
-.TP
-\fB\-help\fR
-Print a synopsis of standard options.
-.\"
-.\" ############################## Advanced Options ###############################
-.\"
-.SS "Advanced Options"
-.PP
-.TP
-\fB\-Xassem\fR <\fIfile\fR>
-Name of the output assembly (only relevant with -target:msil)
-.TP
-\fB\-Xassem-path\fR <\fIpath\fR>
-List of assemblies referenced by the program (only relevant with -target:msil)
-.TP
-\fB\-Xcheck-null\fR
-Emit warning on selection of nullable reference
-.TP
-\fB\-Xdisable-assertions\fR
-Generate no assertions and assumptions
-.TP
-\fB\-Xexperimental\fR
-enable experimental extensions
-.TP
-\fB\-Xno-uescape\fR
-Disable handling of \eu unicode escapes
-.TP
-\fB\-Xplug-types\fR
-Parse but ignore annotations in more locations
-.TP
-\fB\-Xplugin:\fR <\fIfile\fR>
-Load a plugin from a file
-.TP
-\fB\-Xplugin-disable:\fR <\fIplugin\fR>
-Disable a plugin
-.TP
-\fB\-Xplugin-list\fR
-Print a synopsis of loaded plugins
-.TP
-\fB\-Xplugin-opt:\fR <\fIplugin:opt\fR>
-Pass an option to a plugin
-.TP
-\fB\-Xplugin-require:\fR <\fIplugin\fR>
-Abort unless a plugin is available
-.TP
-\fB\-Xprint:\fR <\fIphases\fR>
-Print out program after <\fIphases\fR> (see below).
-.TP
-\fB\-Xprint-pos\fR
-Print tree positions (as offsets)
-.TP
-\fB\-Xprint-types\fR
-Print tree types (debugging option).
-.TP
-\fB\-Xprompt\fR
-Display a prompt after each error (debugging option).
-.TP
-\fB\-Xresident\fR
-Compiler stays resident, files to compile are read from standard input.
-.TP
-\fB\-Xshow-class\fR <\fIclass\fR>
-Show class info.
-.TP
-\fB\-Xshow-object\fR <\fIobject\fR>
-Show object info.
-.TP
-\fB\-Xshow-phases\fR
-Print a synopsis of compiler phases.
-.TP
-\fB\-Xsource-reader\fR <\fIclassname\fR>
-Specify a custom method for reading source files.
-.TP
-\fB\-Xscript\fR <\fIobject\fR>
-Compile as a script, wrapping the code into object.main().
-.\"
-.\" ############################## Compilation Phases ###############################
-.\"
-.SS "Compilation Phases"
-.PP
-.TP
-\fIinitial\fR
-initializing compiler
-.TP
-\fIparse\fR
-parse source files
-.TP
-\fInamer\fR
-create symbols
-.TP
-\fIanalyze\fR
-name and type analysis
-.TP
-\fIrefcheck\fR
-reference checking
-.TP
-\fIuncurry\fR
-uncurry function types and applications
-.TP
-\fItransmatch\fR
-translate match expressions
-.TP
-\fIlambdalift\fR
-lambda lifter
-.TP
-\fItypesasvalues\fR
-represent types as values
-.TP
-\fIaddaccessors\fR
-add accessors for constructor arguments
-.TP
-\fIexplicitouterclasses\fR
-make links from inner classes to enclosing one explicit
-.TP
-\fIaddconstructors\fR
-add explicit constructor for each class
-.TP
-\fItailcall\fR
-add tail-calls
-.TP
-\fIwholeprog\fR
-perform whole program analysis
-.TP
-\fIaddinterfaces\fR
-add one interface per class
-.TP
-\fIexpandmixins\fR
-expand mixins by code copying
-.TP
-\fIboxing\fR
-makes boxing explicit
-.TP
-\fIerasure\fR
-type eraser
-.TP
-\fIicode\fR
-generate icode
-.TP
-\fIcodegen\fR
-enable code generation
-.TP
-\fIterminal\fR
-compilation terminated
-.TP
-\fIall\fR
-matches all phases
-.\"
-.\" ############################## ENVIRONMENT ###############################
-.\"
-.SH ENVIRONMENT
-.PP
-.TP
-\fBJAVACMD\fR
-Specify the \fBjava\fR command to be used for running the Scala code. Arguments may be specified as part of the environment variable; spaces, quotation marks, etc., will be passed directly to the shell for expansion.
-.TP
-\fBJAVA_OPTS\fR
-Specify the options to be passed to the \fBjava\fR command defined by \fBJAVACMD\fR.
-.IP
-With Java 1.5 (or newer) one may for example configure the memory usage of the JVM as follows: JAVA_OPTS="-Xmx512M -Xms16M -Xss16M"
-.IP
-With GNU Java one may configure the memory usage of the GIJ as follows: JAVA_OPTS="--mx512m --ms16m"
-.IP
-
-.\"
-.\" ############################## EXAMPLES ###############################
-.\"
-.SH EXAMPLES
-.PP
-.TP
-Compile a Scala program to the current directory
-\fBscalac\fR HelloWorld
-.TP
-Compile a Scala program to the destination directory \fBclasses\fR
-\fBscalac\fR \fB\-d\fR classes HelloWorld.scala
-.TP
-Compile a Scala program using a user-defined \fBjava\fR command
-\fBenv JAVACMD\fR=/usr/local/bin/cacao \fBscalac\fR \fB\-d\fR classes HelloWorld.scala
-.TP
-Compile all Scala files found in the source directory \fBsrc\fR to the destination directory \fBclasses\fR
-\fBscalac\fR \fB\-d\fR classes src/*.scala
-.\"
-.\" ############################## EXIT STATUS ###############################
-.\"
-.SH "EXIT STATUS"
-.PP
-\fBscalac\fR returns a zero exist status if it succeeds to compile the specified input files. Non zero is returned in case of failure.
-.\"
-.\" ############################## AUTHOR ###############################
-.\"
-.SH AUTHOR
-.PP
-Written by Martin Odersky and other members of the Scala team.
-.\"
-.\" ############################## REPORTING BUGS ###############################
-.\"
-.SH "REPORTING BUGS"
-.PP
-Report bugs to <scala@listes.epfl.ch>.
-.\"
-.\" ############################## COPYRIGHT ###############################
-.\"
-.SH COPYRIGHT
-.PP
-This is open-source software, available to you under a BSD-like license. See accomponying "copyright" or "LICENSE" file for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-.\"
-.\" ############################## SEE ALSO ###############################
-.\"
-.SH "SEE ALSO"
-.PP
-\fBfsc\fR(1), \fBsbaz\fR(1), \fBscala\fR(1), \fBscaladoc\fR(1), \fBscalap\fR(1)
diff --git a/docs/man/man1/scaladoc.1 b/docs/man/man1/scaladoc.1
deleted file mode 100644
index de71b78e98..0000000000
--- a/docs/man/man1/scaladoc.1
+++ /dev/null
@@ -1,157 +0,0 @@
-.\" ##########################################################################
-.\" # __ #
-.\" # ________ ___ / / ___ Scala 2 On-line Manual Pages #
-.\" # / __/ __// _ | / / / _ | (c) 2002-2007, LAMP/EPFL #
-.\" # __\ \/ /__/ __ |/ /__/ __ | #
-.\" # /____/\___/_/ |_/____/_/ | | http://scala-lang.org/ #
-.\" # |/ #
-.\" ##########################################################################
-.\"
-.\" Process this file with nroff -man scala.1
-.\"
-.TH scaladoc 1 "May 1, 2007" "version 0.4" "USER COMMANDS"
-.\"
-.\" ############################## NAME ###############################
-.\"
-.SH NAME
-.PP
-\fBscaladoc\fR \- Documentation generator for the Scala 2 language
-.\"
-.\" ############################## SYNOPSIS ###############################
-.\"
-.SH SYNOPSIS
-.PP
-\fBscaladoc\fR [ <\fIoptions\fR> ] <\fIsource files\fR>
-.\"
-.\" ############################## PARAMETERS ###############################
-.\"
-.SH PARAMETERS
-.PP
-.TP
-<\fIoptions\fR>
-Command line options. See \fBOPTIONS\fR below.
-.TP
-<\fIsource files\fR>
-One or more source files to be compiled (such as MyClass.scala).
-.\"
-.\" ############################## DESCRIPTION ###############################
-.\"
-.SH DESCRIPTION
-.PP
-The \fBscaladoc\fR tool reads class and object definitions, written in the Scala 2 programming language, and generates their API as HTML files.
-.PP
-By default, the generator puts each HTML file in the same directory as its source file. You can specify a separate destination directory with \fB\-d\fR (see \fBOPTIONS\fR, below).
-.PP
-Supported tag comments are:
-.IP
-@author
-.IP
-@deprecated
-.IP
-@exception (two arguments)
-.IP
-@param (two arguments)
-.IP
-@pre
-.IP
-@return
-.IP
-@see
-.IP
-@since
-.IP
-@throws (two arguments)
-.IP
-@todo
-.IP
-@version
-.PP
-See also online document "How to Write Doc Comments for the Javadoc Tool" from Sun.
-.\"
-.\" ############################## OPTIONS ###############################
-.\"
-.SH OPTIONS
-.PP
-The generator has a set of standard options that are supported on the current development environment and will be supported in future releases.
-.\"
-.\" ############################## Standard Options ###############################
-.\"
-.SS "Standard Options"
-.PP
-.TP
-\fB\-d\fR <\fIdirectory\fR>
-Specify where to place generated class files.
-.TP
-\fB\-access:<access>\fR
-Show only public, protected/public (default) or all classes and members (public,protected,private)
-.TP
-\fB\-windowtitle\fR <\fIwindowtitle\fR>
-Specify window title of generated HTML documentation
-.TP
-\fB\-doctitle\fR <\fIdoctitle\fR>
-Include title for the overview page
-.TP
-\fB\-stylesheetfile\fR <\fIstylesheetfile\fR>
-File to change style of the generated documentation
-.TP
-\fB\-header\fR <\fIpageheader\fR>
-Include header text for each page
-.TP
-\fB\-footer\fR <\fIpagefooter\fR>
-Include footer text for each page
-.TP
-\fB\-top\fR <\fIpagetop\fR>
-Include top text for each page
-.TP
-\fB\-bottom\fR <\fIpagebottom\fR>
-Include bottom text for each page
-.TP
-\fB\-version\fR
-Print product version and exit.
-.TP
-\fB\-help\fR
-Print a synopsis of standard options.
-.\"
-.\" ############################## EXAMPLES ###############################
-.\"
-.SH EXAMPLES
-.PP
-.TP
-Generate documentation for a Scala program
-\fBscaladoc\fR HelloWorld.scala
-.TP
-Generation documentation for a Scala program to the destination directory \fBclasses\fR
-\fBscaladoc\fR \fB\-d\fR api HelloWorld.scala
-.TP
-Generate documentation for all Scala files found in the source directory \fBsrc\fR to the destination directory \fBapi\fR
-\fBscaladoc\fR \fB\-d\fR api src/*.scala
-.\"
-.\" ############################## EXIT STATUS ###############################
-.\"
-.SH "EXIT STATUS"
-.PP
-\fBscaladoc\fR returns a zero exist status if it succeeds to process the specified input files. Non zero is returned in case of failure.
-.\"
-.\" ############################## AUTHOR ###############################
-.\"
-.SH AUTHOR
-.PP
-Written by Martin Odersky and other members of the Scala team.
-.\"
-.\" ############################## REPORTING BUGS ###############################
-.\"
-.SH "REPORTING BUGS"
-.PP
-Report bugs to <scala@listes.epfl.ch>.
-.\"
-.\" ############################## COPYRIGHT ###############################
-.\"
-.SH COPYRIGHT
-.PP
-This is open-source software, available to you under a BSD-like license. See accomponying "copyright" or "LICENSE" file for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-.\"
-.\" ############################## SEE ALSO ###############################
-.\"
-.SH "SEE ALSO"
-.PP
-\fBfsc\fR(1), \fBsbaz\fR(1), \fBscala\fR(1), \fBscalac\fR(1), \fBscalap\fR(1)
diff --git a/docs/man/man1/scalap.1 b/docs/man/man1/scalap.1
deleted file mode 100644
index a1e5fcc298..0000000000
--- a/docs/man/man1/scalap.1
+++ /dev/null
@@ -1,107 +0,0 @@
-.\" ##########################################################################
-.\" # __ #
-.\" # ________ ___ / / ___ Scala 2 On-line Manual Pages #
-.\" # / __/ __// _ | / / / _ | (c) 2002-2007, LAMP/EPFL #
-.\" # __\ \/ /__/ __ |/ /__/ __ | #
-.\" # /____/\___/_/ |_/____/_/ | | http://scala-lang.org/ #
-.\" # |/ #
-.\" ##########################################################################
-.\"
-.\" Process this file with nroff -man scala.1
-.\"
-.TH scalap 1 "June 8, 2006" "version 0.2" "USER COMMANDS"
-.\"
-.\" ############################## NAME ###############################
-.\"
-.SH NAME
-.PP
-\fBscalap\fR \- Scala class file decoder for the Scala 2 language
-.\"
-.\" ############################## SYNOPSIS ###############################
-.\"
-.SH SYNOPSIS
-.PP
-\fBscalap\fR [ <\fIoptions\fR> ] <\fIsource file\fR>
-.\"
-.\" ############################## PARAMETERS ###############################
-.\"
-.SH PARAMETERS
-.PP
-.TP
-<\fIoptions\fR>
-Command line options. See \fBOPTIONS\fR below.
-.TP
-<\fIsource file\fR>
-One class file to be decoded (such as hello.HelloWorld).
-.\"
-.\" ############################## DESCRIPTION ###############################
-.\"
-.SH DESCRIPTION
-.PP
-The \fBscalap\fR tool reads a class file generated by theScala compiler, and displays object and class definitions.
-.PP
-By default, \fBscalap\fR looks for the given class file in the current directory. You can specify a separate classpath with \fB\-classpath\fR (see \fBOPTIONS\fR, below).
-.\"
-.\" ############################## OPTIONS ###############################
-.\"
-.SH OPTIONS
-.PP
-The decoder has a set of standard options that are supported on the current development environment and will be supported in future releases.
-.\"
-.\" ############################## Standard Options ###############################
-.\"
-.SS "Standard Options"
-.PP
-.TP
-\fB\-help\fR
-Display this usage message.
-.TP
-\fB\-private\fR
-Print private definitions.
-.TP
-\fB\-verbose\fR
-Print out additional information.
-.TP
-\fB\-version\fR
-Print product version and exit.
-.TP
-\fB\-cp\fR | \fB\-classpath\fR
-Specify where to find user class files.
-.\"
-.\" ############################## EXAMPLES ###############################
-.\"
-.SH EXAMPLES
-.PP
-.TP
-Display definitions for a generated class file
-\fBscalap\fR hello.HelloWorld
-.\"
-.\" ############################## EXIT STATUS ###############################
-.\"
-.SH "EXIT STATUS"
-.PP
-\fBscalap\fR returns a zero exist status if it succeeds to process the specified input files. Non zero is returned in case of failure.
-.\"
-.\" ############################## AUTHOR ###############################
-.\"
-.SH AUTHOR
-.PP
-Written by Matthias Zenger.
-.\"
-.\" ############################## REPORTING BUGS ###############################
-.\"
-.SH "REPORTING BUGS"
-.PP
-Report bugs to <scala@listes.epfl.ch>.
-.\"
-.\" ############################## COPYRIGHT ###############################
-.\"
-.SH COPYRIGHT
-.PP
-This is open-source software, available to you under a BSD-like license. See accomponying "copyright" or "LICENSE" file for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-.\"
-.\" ############################## SEE ALSO ###############################
-.\"
-.SH "SEE ALSO"
-.PP
-\fBfsc\fR(1), \fBsbaz\fR(1), \fBscala\fR(1), \fBscalac\fR(1), \fBscaladoc\fR(1)
diff --git a/src/manual/scala/tools/docutil/EmitHtml.scala b/src/manual/scala/tools/docutil/EmitHtml.scala
index 7db4523696..a16190804a 100644
--- a/src/manual/scala/tools/docutil/EmitHtml.scala
+++ b/src/manual/scala/tools/docutil/EmitHtml.scala
@@ -356,4 +356,9 @@ object EmitHtml {
exit(1)
}
}
+
+ def emitHtml(classname: String, outStream: java.io.OutputStream) {
+ out.setOut(outStream)
+ main(Array(classname))
+ }
}
diff --git a/src/manual/scala/tools/docutil/EmitManPage.scala b/src/manual/scala/tools/docutil/EmitManPage.scala
index 72ed289b1c..c9108a891e 100644
--- a/src/manual/scala/tools/docutil/EmitManPage.scala
+++ b/src/manual/scala/tools/docutil/EmitManPage.scala
@@ -177,4 +177,8 @@ object EmitManPage {
exit(1)
}
+ def emitManPage(classname: String, outStream: java.io.OutputStream) {
+ out.setOut(outStream)
+ main(Array(classname))
+ }
}
diff --git a/src/manual/scala/tools/docutil/ManMaker.scala b/src/manual/scala/tools/docutil/ManMaker.scala
new file mode 100644
index 0000000000..2ef87fb7ec
--- /dev/null
+++ b/src/manual/scala/tools/docutil/ManMaker.scala
@@ -0,0 +1,53 @@
+package scala.tools.docutil
+
+import org.apache.tools.ant.Task
+
+import java.io.{File, FileOutputStream}
+
+class ManMaker extends Task {
+
+ /** The command for which to generate the man page */
+ private var command: List[String] = Nil
+
+ /** The directory to put html pages in */
+ private var htmlout: Option[File] = None
+
+ /** The directory to put man pags in */
+ private var manout: Option[File] = None
+
+
+ def setCommand(input: String) {
+ command = List.fromArray(input.split(",")).flatMap { s =>
+ val st = s.trim()
+ if (st != "") List(st) else Nil
+ }
+ }
+
+ def setHtmlout(input: File) {
+ htmlout = Some(input)
+ }
+
+ def setManout(input: File) {
+ manout = Some(input)
+ }
+
+ override def execute() {
+ if (command.isEmpty) error("Attribute 'command' is not set.")
+ if (htmlout.isEmpty) error("Attribute 'htmlout' is not set.")
+ if (manout.isEmpty) error("Attribute 'manout' is not set.")
+
+ command foreach (cmd => {
+ val classname = "scala.man1."+ cmd
+
+ val htmlFileName = htmlout.get.getPath + File.separator +
+ cmd + ".html"
+ val htmlFile = new java.io.FileOutputStream(htmlFileName)
+ EmitHtml.emitHtml(classname, htmlFile)
+
+ val manFileName = manout.get.getPath + File.separator +
+ "man1" + File.separator + cmd + ".1"
+ val manFile = new FileOutputStream(manFileName)
+ EmitManPage.emitManPage(classname, manFile)
+ })
+ }
+}