aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarstrom <john@ankarstrom.se>2021-07-07 12:45:26 +0200
committerJohn Ankarstrom <john@ankarstrom.se>2021-07-07 12:45:26 +0200
commite2fc8cbe9924dc52fc23e48e42fa57af76e4aef5 (patch)
tree83710bf5383fef044e8404b963cb2df83a352910
parente22fcfa6e0b048dc0e13a730609514a1b268991f (diff)
downloadbuild-e2fc8cbe9924dc52fc23e48e42fa57af76e4aef5.tar.gz
build.1: Add another example
-rw-r--r--build.135
1 files 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