From e2fc8cbe9924dc52fc23e48e42fa57af76e4aef5 Mon Sep 17 00:00:00 2001 From: John Ankarstrom Date: Wed, 7 Jul 2021 12:45:26 +0200 Subject: build.1: Add another example --- build.1 | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/build.1 b/build.1 index b71df89..b3beb4e 100644 --- a/build.1 +++ b/build.1 @@ -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 -- cgit v1.2.3