diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-03-23 07:29:56 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-03-23 07:29:56 -0700 |
commit | 7f9133cd98879c7d8cee249b7433973b37c52832 (patch) | |
tree | b10d855968db7dc5d7e97c47a919c86534b9cafd /cppawk.1 | |
parent | 6c06f7c545b36585e890775c70f2c0e366f3e4b9 (diff) | |
download | cppawk-7f9133cd98879c7d8cee249b7433973b37c52832.tar.gz cppawk-7f9133cd98879c7d8cee249b7433973b37c52832.tar.bz2 cppawk-7f9133cd98879c7d8cee249b7433973b37c52832.zip |
Add options --prepro and --awk.
Diffstat (limited to 'cppawk.1')
-rw-r--r-- | cppawk.1 | 51 |
1 files changed, 46 insertions, 5 deletions
@@ -1,10 +1,13 @@ .TH cppawk 1 "18 March 2022" "Beta Version" "cppawk manual" + .SH NAME cppawk \- wrapper for awk, with C preprocessing + .SH SYNOPSIS -cppawk [cpp and awk options ] +cppawk [cpp, awk and cppawk options] [awk arguments] + +cppawk --prepro-only [cpp, awk and cppawk options] -cppawk --prepro-only [cpp and awk options] .SH DESCRIPTION .B cppawk is a shell script which passes awk code through the standalone @@ -42,18 +45,44 @@ When installation is configured to use GNU Awk, which is the default, the preprocessor symbol .BI __gawk__ -is predefined with a value of 1. +is predefined with a value of 1. See the +.BI --awk +option. .SH OPTIONS Any option not described here is assumed to be an Awk option which takes no argument, and is consequently passed through to the .B awk program. + .IP "\fB\-\-\fR" End of options: any subsequent argument is the first non-option argument, even if it looks like an option. + .IP "\fB\-\-prepro\-only\fR" Do not run the preprocessed Awk program; dump the preprocessed code to standard output. + +.IP "\fB\-\-awk=\fR\fIpath\fR" +Specify alternative Awk implementation. If it contains no slashes, then +.BI PATH +is searched to find the program. If the base name of the program is +.BI gawk +or +.BI mawk, +then, respectively, one of the preprocessor symbols +.BI __gawk__ +or +.BI __mawk__ +is predefined, with a value of 1. This happens immediately when this +option is processed, so can be counter-acted by a subsequent +.BI -U +option. + +.IP "\fB\-\-prepro=\fR\fIpath\fR" +Specify alternative preprocessor. If it contains no slashes, then +.BI PATH +is searched to find the program. + .IP "\fB\-f\fR \fIfilename\fR" Read the awk program from .I filename @@ -63,6 +92,7 @@ argument. The program is preprocessed to a temporary file, and is then invoked on this file. The file is deleted when .B awk terminates. + .IP "\fB\-M\fR, \fB\--bignum\fR" These two equivalent GNU Awk options are passed through to .BR awk , @@ -70,6 +100,7 @@ which will understand them if it is GNU Awk. Using either of them causes the preprocessor symbol .BI __bignum__ to be defined with the value 1. + .IP "\fB\-P\fR, \fB\--posix\fR" These two equivalent GNU Awk options are passed through to .BR awk , @@ -77,6 +108,7 @@ which will understand them if it is GNU Awk. Using either of them causes the preprocessor symbol .BI __posix__ to be defined with the value 1. + .IP "\fB\-M...\fR Any optional argument beginning with .BI -M @@ -85,12 +117,14 @@ message and failed termination. The intent is that the .BI -M family of options that are supported by GNU cpp are not supported by .BR cppawk . + .IP "\fB-F\fR, \fB-v\fR, \fB-E\fR, \fB-i\fR, \fB-l\fR, \fB-L\fR" These standard and GNU Awk options are recognizes by .B cppawk as requiring an argument. They are validated for the presence of the required argument, and passed to .BR awk . + .IP "\fB-U...\fR, \fB-D...\fR, \fB-I...\fR, \fB-iquote...\fR" Options which match these patterns are passed to the .B cpp @@ -143,6 +177,7 @@ contains: .SH "SEE ALSO" awk(1), cpp(6) + .SH BUGS The .BI -f @@ -177,13 +212,18 @@ which is why works at all; however, there may be corner cases where some issue arises because of this. -The choices of +The default choices of .B gawk and .B cpp are fixed in the source code; users must edit .B cppawk -to select alternative implementations or locations of these tools. +to select alternative implementations or locations of these tools, +if they don't wish to use the +.BI --awk +and +.BI --prepro +command line options. The C preprocessor's .BR "#include \(dq...\(dq" @@ -220,5 +260,6 @@ command line. .SH AUTHOR Kaz Kylheku <kaz@kylheku.com> + .SH COPYRIGHT Copyright 2022, BSD2 License. |