diff options
author | John Ankarstrom <john@ankarstrom.se> | 2021-07-07 12:45:26 +0200 |
---|---|---|
committer | John Ankarstrom <john@ankarstrom.se> | 2021-07-07 12:45:26 +0200 |
commit | e2fc8cbe9924dc52fc23e48e42fa57af76e4aef5 (patch) | |
tree | 83710bf5383fef044e8404b963cb2df83a352910 | |
parent | e22fcfa6e0b048dc0e13a730609514a1b268991f (diff) | |
download | build-e2fc8cbe9924dc52fc23e48e42fa57af76e4aef5.tar.gz |
build.1: Add another example
-rw-r--r-- | build.1 | 35 |
1 files changed, 26 insertions, 9 deletions
@@ -64,16 +64,34 @@ regardless of the exit status of previous commands. .Sh EXAMPLES .Pp Assuming that the file +.Pa prg.c +starts with the following text, +.Bd -literal -offset indent +/** + * To build this program, use the following invocation: + * $ cc -O2 -o prg prg.c # > prg + */ +.Ed +.Pp +the invocation +.Bd -literal -offset indent +$ build prg.c +.Ed +.Pp +will build +.Pa prg . +.Pp +Assuming that the file .Pa doc.t starts with the following text, .Bd -literal -offset indent \&.\\" This document is built with the following shell commands: -\&.\\" $ refer -p refs doc.t | troff -ms | dpost > doc.ps && -\&.\\" $ ps2pdf doc.ps > doc.pdf && -\&.\\" $ rm doc.ps +\&.\\" $ refer -p refs doc.t | troff -ms | dpost > doc.ps && +\&.\\" $ ps2pdf doc.ps > doc.pdf && +\&.\\" $ rm doc.ps \&. \&.\\" Apart from this file, it depends on the following files: -\&.\\" % refs x.tmac +\&.\\" % refs x.tmac .Ed .Pp the invocation @@ -81,12 +99,11 @@ the invocation $ build doc.t .Ed .Pp -will generate -.Pa doc.pdf -by running the given commands, +will build +.Pa doc.pdf , depending on the relative modification times of -.Pa doc.t , -.Pa doc.pdf +.Pa doc.pdf , +.Pa doc.t and .Pa x.tmac . .\" .Sh DIAGNOSTICS |