X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=docs%2Fman%2Fgen_flags.xsl.pl;fp=docs%2Fman%2Fgen_flags.xsl.pl;h=a331792f0ddc4ad1812c91680fbcb97e17d757d6;hp=0000000000000000000000000000000000000000;hb=501f3c52a3fd0ce238d6be1bcc72a6c53c8e9d37;hpb=07be901da936ec4a503a514b02c6d247f533b963 diff --git a/docs/man/gen_flags.xsl.pl b/docs/man/gen_flags.xsl.pl new file mode 100644 index 0000000..a331792 --- /dev/null +++ b/docs/man/gen_flags.xsl.pl @@ -0,0 +1,284 @@ +#!/usr/bin/perl -w + +use strict; + +if ($#ARGV ne 1) { + die "Usage: $0 \n" +} + +my @ghc_commands = split / /, $ARGV[0]; +my $libdir = $ARGV[1]; + +print <<'EOF'; + + + + + + + +.\" +.\" This is a generated file. Changes might get clobbered. Edit at own's risk. +.\" +.TH GHC 1 "2002-10-25" "Glasgow FP Suite" "Glasgow Haskell Compiler" +.SH NAME +GHC \- the Glasgow Haskell Compiler + + +.SH SYNOPSIS +EOF + +my $started = 0; + +for my $ghc_command (@ghc_commands) { + print ".br\n" if $started; + $started = 1; + print <<"EOF"; +.B $ghc_command +.RI [ option | filename ]... +EOF +} + +print <<'EOF'; + +.SH DESCRIPTION +This manual page documents briefly the +.B ghc +and +.B ghci +commands. +Note that +.B ghci +is not yet available on all architectures. +Extensive documentation is available in various other formats +including DVI, PostScript and HTML; see below. + +.PP +Each of GHC's command line options is classified as either +.IR static " or " dynamic . +A static flag may only be specified on the command line, whereas a +dynamic flag may also be given in an \f(CROPTIONS\fP pragma in a +source file or set from the GHCi command-line with \f(CR:set\fP. + +As a rule of thumb, all the language options are dynamic, as are the +warning options and the debugging options. + +The rest are static, with the notable exceptions of +.BR \-v ", " \-cpp ", " \-fasm ", " \-fvia\-C ", and " \-#include . +The OPTIONS sections lists the status of each flag. + +.PP +Common suffixes of file names for Haskell are: +.TP +.B .hs +Haskell source code; preprocess, compile +.TP +.B .lhs +literate Haskell source; unlit, preprocess, compile +.TP +.B .hi +Interface file; contains information about exported +symbols +.TP +.B .hc +intermediate C files +.TP +.BI . x _o +way +.I x +object files; common ways are: +.BR p ", " u ", " s +.TP +.BI . x _hi +way +.I x +interface files + + +.SH OPTIONS + + + + + + +.SH FILES +EOF +print ".I $libdir"; +print <<'EOF'; + +.SH COPYRIGHT + +Copyright 2002, The University Court of the University of Glasgow. +.br +All rights reserved. + + +.SH AUTHOR + +This manual page was generated from the XML documentation of GHC with blood, +sweat, tears and a breaks-if-you-look-at-it-the-wrong-way XSL +stylesheet originally written by Michael Weber <michaelw@debian.org> +for the Debian GNU/Linux system (but may be used by others). + +.\" End + + + + + + +.SS + + +.SS + + +.nh + +.hy + + + + + + + +.SH + + + + +.SH + + + + + + + + + + + + + + +.TP + + + + + + +.rj +[] + + + + + + + + + + + + + + + + + + + + + + + + \fB + + \fP + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \fI + + \fP + + + + + \f(CR + + \fP + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +EOF +