~ chicken-core (chicken-5) /chicken-do.mdoc
Trap1.\" Copyright (c) 2017-2022, The CHICKEN Team
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\" notice, this list of conditions and the following disclaimer in the
11.\" documentation and/or other materials provided with the distribution.
12.\" 3. The name of the authors may not be used to endorse or promote products
13.\" derived from this software without specific prior written permission.
14.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
16.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18.\" IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
19.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25.\"
26.\"
27.Dd Apr 26, 2017
28.Dt CHICKEN-DO 1
29.Os
30.Sh NAME
31.Nm chicken-do
32.Nd run a shell command unless the target exists and any dependency is
33not newer than the target
34.Sh SYNOPSIS
35.Nm
36.Op Fl q
37.Op Fl h
38.Op Fl -
39.Ar TARGET ...
40.Cm :
41.Ar DEPENDENCY ...
42.Cm :
43.Ar COMMAND ...
44.Sh DESCRIPTION
45If the files
46.Em TARGET ...
47do not exist, or if any of the files in
48.Em DEPENDENCY ...
49are newer than one of the target files, then execute the shell commands in
50.Em COMMAND ... .
51.Pp
52The program accepts the following options:
53.Bl -tag -width Ds
54.It Fl h
55Show usage and exit.
56.It Fl q
57Quiet operation - do not print shell commands when they are executed.
58.It Fl -
59Treat all following tokens as target filenames, even if they begin with a
60.Fl
61character.
62.El
63.Sh EXIT STATUS
64.Ex -std
65.Sh EXAMPLES
66Build a C program from sources:
67.Pp
68.Dl $ chicken-do prg : prg.c inc.h : gcc prg.c -o prg
69.Sh SEE ALSO
70.Xr chicken 1 ,
71.Xr chicken-status 1 ,
72.Xr chicken-install 1 ,
73.Xr chicken-uninstall 1 ,
74.Xr csc 1
75.Pp
76More information can be found in the
77.Lk http://wiki.call-cc.org/manual/index "CHICKEN User's Manual".
78.Sh AUTHORS
79.An The CHICKEN Team
80.Sh BUGS
81Submit bug reports by e-mail to
82.Mt chicken-janitors@nongnu.org