make-first-existing-target (1) - Linux Man Pages
make-first-existing-target: runs make on one of several targets
make-first-existing-target - runs make on one of several targets
SYNOPSISmake-first-existing-target [-c cmd] target1 [target2 ...] --- [make-options]
DESCRIPTIONThe design of make(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. make(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.)
- -c cmd
- This can be used to specify the make command to run. Default is ``make''.
EXIT STATUSThe exit status is 0 if at least one target existed and was successfully run, and nonzero otherwise.
AUTHORJoey Hess <joey [at] kitenet.net>
LICENSESame as GNU make.
Linux man pages generated by: SysTutorials
Linux Man Pages Copyright Respective Owners. Site Copyright © SysTutorials. All Rights Reserved.