scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit 006b1a57e901d4977423bdeb39c2880798886d71
parent 236b1b713730516ce6f9c2a95a6228667c55c5ed
Author: Roberto E. Vargas Caballero <k0ga@shike2.net>
Date:   Thu, 19 Mar 2026 09:22:07 +0100

doc: Add mna page for the scc wrapper

Diffstat:
Mdoc/man1/Makefile | 1+
Adoc/man1/scc.man | 155+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 156 insertions(+), 0 deletions(-)

diff --git a/doc/man1/Makefile b/doc/man1/Makefile @@ -4,6 +4,7 @@ PROJECTDIR = ../.. include $(PROJECTDIR)/scripts/rules.mk PAGES =\ + scc.1\ scc-addr2line.1\ scc-ar.1\ scc-cc.1\ diff --git a/doc/man1/scc.man b/doc/man1/scc.man @@ -0,0 +1,155 @@ +.TH SCC 1 scc\-VERSION +.SH NAME +scc \- wrapper to dispatch scc suite tools +.SH SYNOPSIS +.B scc +.RI [ tool ] +.RI [ arguments ...] +.SH DESCRIPTION +.B scc +is a shell wrapper that dispatches to the appropriate tool in the scc suite. +The first argument selects which tool to invoke. The remaining arguments are +passed unchanged to the selected tool. +If no +.I tool +argument is given, or if the first argument does not match any known tool name, +.B scc +defaults to invoking +.BR scc\-cc (1) +with all provided arguments. +.PP +The tool is resolved under the directory pointed to by +.BR SCCPREFIX . +.SH TOOLS +The following tool names are recognized as the first argument: +.TP +.B cc +Invoke +.BR scc\-cc (1), +the C compiler driver. +.TP +.B cpp +Invoke +.BR scc\-cpp (1), +the C preprocessor wrapper. +.TP +.B as +Invoke +.BR scc\-as (1), +the assembler. +.TP +.B ar +Invoke +.BR scc\-ar (1), +the archive utility. +.TP +.B addr2line +Invoke +.BR scc\-addr2line (1), +the address to source line mapper. +.TP +.B ld +Invoke +.BR scc\-ld (1), +the linker. +.TP +.B make +Invoke +.BR scc\-make (1), +the POSIX make implementation. +.TP +.B nm +Invoke +.BR scc\-nm (1), +the symbol table lister. +.TP +.B objcopy +Invoke +.BR scc\-objcopy (1), +the object file copy and translate utility. +.TP +.B dump +Invoke +.BR scc\-dump (1), +the object file dump utility. +.TP +.B objdump +Invoke +.BR scc\-objdump (1), +the object file dump utility. +.TP +.B size +Invoke +.BR scc\-size (1), +the section size lister. +.TP +.B strip +Invoke +.BR scc\-strip (1), +the symbol stripper. +.PP +If the first argument is not one of the above tool names, it is treated as an +argument to +.B scc\-cc +and all arguments (including the first) are forwarded to it. +.SH ENVIRONMENT VARIABLES +.TP +.B SCCPREFIX +Defines the path prefix under which the scc suite is installed. +All tools are looked up as +.IB $SCCPREFIX /bin/scc\- tool\fR. +If not set, +.B scc +sets it to the parent directory of its own location, +which is supposed to be $SCCPREFIX/bin. +.TP +.B SCCLIBPREFIX +Defines the path prefix for scc libraries. +If not set, +.B scc +sets it to the parent directory of its own location, +which is supposed to be $SCCPREFIX/lib. +.SH EXAMPLES +Compile a C source file (default, invokes +.BR scc\-cc ): +.IP +.EX +scc hello.c +.EE +.PP +Explicitly invoke the compiler driver: +.IP +.EX +scc cc \-o hello hello.c +.EE +.PP +Invoke the assembler: +.IP +.EX +scc as \-o hello.o hello.s +.EE +.PP +Invoke the archiver: +.IP +.EX +scc ar \-r libfoo.a foo.o bar.o +.EE +.PP +Use a custom installation prefix: +.IP +.EX +SCCPREFIX=/opt/scc scc cc \-o hello hello.c +.EE +.SH SEE ALSO +.BR scc\-cc (1), +.BR scc\-cpp (1), +.BR scc\-as (1), +.BR scc\-ar (1), +.BR scc\-ld (1), +.BR scc\-make (1), +.BR scc\-nm (1), +.BR scc\-size (1), +.BR scc\-strip (1), +.BR scc\-objcopy (1), +.BR scc\-objdump (1), +.BR scc\-addr2line (1)