RPM

Comment 2 for bug 638623

Revision history for this message
In , Jeff (jeff-redhat-bugs) wrote :

Yes.

Macros that are undefined are passed through literally. The
original reason was so that section markers like %prep could
be overloaded with identically named macros.

(aside) The two lines that need to be added to
make an undefined macro expansion an error have been in
the code, either under an #ifdef or commented out, since 1998.

There is a %{!?foo:...} ("if not defined") construct and a %error primitive that
can be combined to produce an error msg when a macro is undefined.
But that's hardly "easy".