Michael Schwendt wrote:
Agreed. It's a trade-off. Guards aren't bad, but in this case
their
benefit is questionable. It probably doesn't work completely anyway, since
if the build framework uses Autotools, there likely are no pregenerated
Makefiles, and only a successful run on the configure script will generate
them.
Well, the "exit" in the guard would fail the build even before that, whereas
the "%configure || :" would just succeed if %configure succeeds, and then
the subsequent "make" would run too. (That said, that's not necessarily a
problem, it just makes the "|| :" redundant. Failing %configure would fail
"make" too anyway, for the reason you describe.)
What the guard does not catch is if the package only ships configure.ac and
expects you to run autoconf yourself, or if it uses CMake or some other
configury tool. But then the "make" will likely fail anyway for the reason
you describe.
Kevin Kofler