commit 853fd59057aec284f2e51db4295afc7f236a5505
parent 7d91b92b663e060abf21b8d6602e786c33a2d6ae
Author: Christoph Lohmann <20h@r-36.net>
Date: Tue, 29 Aug 2017 14:42:15 +0200
Add a manpage for scc.
Diffstat:
M | Makefile | | | 4 | ++++ |
A | doc/scc.1 | | | 157 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
2 files changed, 161 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
@@ -38,9 +38,13 @@ install: all
cp -r rootdir/* $(DESTDIR)$(PREFIX)/
cd $(DESTDIR)$(PREFIX)/libexec/scc/ && chmod 755 cc* && strip cc*
cd $(DESTDIR)$(PREFIX)/bin && chmod 755 scpp scc && strip scc
+ mkdir -p $(DESTDIR)$(MANPREFIX)/man1
+ sed "s/VERSION/$(VERSION)/g" < doc/scc.1 > $(DESTDIR)$(MANPREFIX)/man1/scc.1
+ chmod 644 $(DESTDIR)$(MANPREFIX)/man1/scc.1
uninstall:
rm -rf $(DESTDIR)$(PREFIX)/libexec/scc/
rm -rf $(DESTDIR)$(PREFIX)/lib/scc/
rm -f $(DESTDIR)$(PREFIX)/bin/scc
rm -f $(DESTDIR)$(PREFIX)/bin/scpp
+ rm -f $(DESTDIR)$(MANPREFIX)/man1/scc.1
diff --git a/doc/scc.1 b/doc/scc.1
@@ -0,0 +1,157 @@
+.TH SCC 1 scc\-VERSION
+.SH NAME
+scc \- simple C compiler with magic
+.SH SYNOPSIS
+.B scc
+.RB [ \-cdgkqQsw ]
+.RB [ \-M | \-E | \-S ]
+.RB [ \-D
+.IR def[=val] ] ...
+.RB [ \-I
+.IR dir ] ...
+.RB [ \-L
+.IR dir ] ...
+.RB [ \-U
+.IR def ] ...
+.RB [ \-l
+.IR lib ]
+.RB [ \-m
+.IR arch ]
+.RB [ \-o
+.IR outfile ]
+.RB [ \-O
+.IR level ]
+.RB [ \-t
+.IR sys ]
+.RB [ \-W
+.IR warn ]
+.RB sourcefile ...
+.SH DESCRIPTION
+.B scc
+is a simple C compiler which takes several
+.I sourcefiles
+and compiles them to an executable. The default output file is
+.B a.out,
+which can be changed by defining some
+.I outfile.
+.SH OPTIONS
+.TP
+.B \-c
+Do not run the linker.
+.TP
+.B \-d
+Do output internal tool messages.
+.TP
+.BI \-D " define[=value]"
+Specify a
+.I define
+for the preprocessor.
+.TP
+.B \-E
+Stop after the preprocessing stage, do not run the compiler and output the then
+resulting source.
+.TP
+.B \-g
+Do generate debug information.
+.TP
+.BI \-I " directory"
+Define a include
+.I directory
+to get header files from. This directory is searched for before standard
+include directories.
+.TP
+.B \-k
+Do keep temporary objects.
+.TP
+.BI \-l " library"
+Link against this
+.I library.
+.TP
+.BI \-L " directory"
+Define a library
+.I directory
+to resolve dependencies from. This directory is used before the standard
+paths.
+.TP
+.BI \-m " architecture"
+Define the
+.I architecture
+to compile for (i.e. amd64, i386 ...).
+.TP
+.B \-M
+Output a rule for
+.B make
+describing the dependencies of the main source file.
+.TP
+.BI \-o " outfile"
+Define the name of the
+.I outfile.
+.TP
+.BI \-O " level"
+Define the optimisation
+.I level
+to compile with. (This is a stub for compatibility reasons.)
+.TP
+.B \-q
+Do not use
+.I QBE.
+.TP
+.B \-Q
+Do use the
+.I QBE.
+.TP
+.B \-s
+Strip all symbol tables and relocation information from the resulting executable.
+.TP
+.B \-S
+Stop after the compilation stage, do not assemble and output the assembler
+source.
+.TP
+.BI \-t " system"
+Define the
+.I system
+to compile for (i.e. linux, openbsd ...).
+.TP
+.BI \-U " define"
+Undefine a previously defined
+.I define
+by the -D parameter.
+.TP
+.B \-w
+Do show warning messages.
+.TP
+.BI \-W " warnings"
+This option only activates -w and is otherwise ignored for compatibility
+reasons.
+.SH ENVIRONMENT VARIABLES
+Certain environment variables control the behaviour of scc.
+.TP
+.B ARCH
+defines the
+.I architecture
+to compile for (i.e. amd64, i386 ...).
+.TP
+.B SYS
+defines the
+.I system
+to compile for (i.e. linux, openbsd ...).
+.TP
+.B ABI
+defines the
+.I application binary interface
+to compile for (i.e. sysv ...).
+.TP
+.B FORMAT
+defines the format of the output executable.
+.TP
+.B SCCPREFIX
+defines the path prefix scc will search the scc suite in.
+.SH AUTHORS
+See the LICENSE file for the authors.
+.SH LICENSE
+See the LICENSE file for the terms of redistribution.
+.SH SEE ALSO
+.BR scpp (1),
+.BR make (1)
+.SH BUGS
+See the TODO file in the distribution.