100 lines
2.7 KiB
HTML
100 lines
2.7 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of MAKE-FIRST-EXISTING-TARGET</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>MAKE-FIRST-EXISTING-TARGET</H1>
|
|
Section: User Contributed Perl Documentation (1)<BR>Updated: 2014-05-13<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
make-first-existing-target - runs make on one of several targets
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
|
|
|
|
make-first-existing-target [-c cmd] target1 [target2 ...] --- [make-options]
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
|
|
|
|
The design of <I><A HREF="/cgi-bin/man/man2html?1+make">make</A></I>(1) causes difficulty when you know that a Makefile
|
|
probably has one of several standardized target names, and want build
|
|
machinery to run exactly one of them, propagating any errors. <I><A HREF="/cgi-bin/man/man2html?1+make">make</A></I>(1)
|
|
will exit 2 if a target does not exist, but an existing target may also
|
|
exit 2 due to some other failure. Makefiles cannot be reliably parsed
|
|
to find targets by anything less Turing-complete than make, and make itself
|
|
does not provide a way to enumerate the targets in a Makefile. It may not
|
|
even be possible to enumerate the targets in a Makefile without executing
|
|
part of it. (Proof of this is left as an exercise for the reader.)
|
|
<P>
|
|
|
|
This program avoids the problems described above, by attempting to call
|
|
each specified target in turn, until it observes make actually doing
|
|
something for one of them.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="1">-c cmd<DD>
|
|
|
|
|
|
This can be used to specify the make command to run. Default is ``make''.
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>EXIT STATUS</H2>
|
|
|
|
|
|
|
|
The exit status is 0 if at least one target existed and was successfully
|
|
run, and nonzero otherwise.
|
|
<A NAME="lbAG"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
|
|
|
|
Joey Hess <<A HREF="mailto:joey@kitenet.net">joey@kitenet.net</A>>
|
|
<A NAME="lbAH"> </A>
|
|
<H2>LICENSE</H2>
|
|
|
|
|
|
|
|
Same as <FONT SIZE="-1">GNU</FONT> make.
|
|
<A NAME="lbAI"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
|
|
|
|
<I><A HREF="/cgi-bin/man/man2html?1+make">make</A></I>(1)
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="2"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="3"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="4"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="5"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DT id="6"><A HREF="#lbAF">EXIT STATUS</A><DD>
|
|
<DT id="7"><A HREF="#lbAG">AUTHOR</A><DD>
|
|
<DT id="8"><A HREF="#lbAH">LICENSE</A><DD>
|
|
<DT id="9"><A HREF="#lbAI">SEE ALSO</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:18 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|