MAKE-FI...-TARGET(1)
π NAME π
okay so the tool is called make-first-existing-target π and it runs make on whichever one of several targets actually exists β¨ β "runs make on one of several targets" is the whole vibe bestie π¦
πΈ SYNOPSIS πΈ
make-first-existing-target [-c cmd] target1 [target2 ...] --
[make-options]
β¨ DESCRIPTION β¨
okay so here's the tea π΅ make(1) is kinda difficult when you know a Makefile probably has one of several standard target names, and you want your build machinery to run exactly one of them and pass along any errors π the problem is make(1) will exit 2 if a target doesn't exist, but an existing target can also exit 2 because of some other failure π so you can't tell the difference!!
and it's not like you can just parse Makefiles to find the targets either. you'd need something at least as Turing-complete as make itself π€― make also doesn't give you any way to list the targets in a Makefile. it might not even be possible to enumerate targets without actually running part of the Makefile π (proof is left as an exercise for the reader, obviously π )
this program dodges all of that drama π«Ά it tries to call each specified target in turn, and stops as soon as it sees make actually doing something for one of them β¨ main character energy fr π
π OPTIONS π
-c cmdβ pick the make command to run π§ if you don't set it, it's just"make"π
π¦ EXIT STATUS π¦
ngl this one's simple π
the exit status is 0 if at least one target existed and ran successfully. otherwise you get a nonzero status π₯²
π§ AUTHOR π§
Joey Hess <joey@kitenet.net> π
π LICENSE π
same as GNU make, no cap π«Ά
β SEE ALSO β
make(1) π
bestie, that's the whole thing π this page came from the perl v5.18.2 docs, dated 2014-05-13, filed under MAKE-FI...-TARGET(1) π slay the build pipeline and go touch some grass πΈβ¨
π¦ where this page comes from
- debian bookworm: make 4.3-4.1 Β· GPL-3.0-or-later
- debian bookworm: make-guile 4.3-4.1 Β· GPL-3.0-or-later
- debian trixie: make 4.4.1-2 Β· GPL-3.0-or-later
- debian trixie: make-guile 4.4.1-2 Β· GPL-3.0-or-later
- ubuntu jammy: make 4.3-4.1build1 Β· GPL-3.0-or-later
- ubuntu jammy: make-guile 4.3-4.1build1 Β· GPL-3.0-or-later
- ubuntu noble: make 4.3-4.1build2 Β· GPL-3.0-or-later
- ubuntu noble: make-guile 4.3-4.1build2 Β· GPL-3.0-or-later
- ubuntu questing: make 4.4.1-2 Β· GPL-3.0-or-later
- ubuntu questing: make-guile 4.4.1-2
- ubuntu resolute: make 4.4.1-3 Β· GPL-3.0-or-later
- ubuntu resolute: make-guile 4.4.1-3 Β· GPL-3.0-or-later
- ubuntu stonking: make 4.4.1-3 Β· GPL-3.0-or-later
- ubuntu stonking: make-guile 4.4.1-3 Β· GPL-3.0-or-later
- π girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms