rpmbuild --define 'distribution FooLinux' macros file contains: %distribution %{?distribution}%{!?distribution:Red Hat Linux} This caused an infinite loop in macro expansion for your build of rpm.
The loop was not infinite, recursion was detected and stopped at 16 levels. There's little reason to test for macro being set within the macro expansion: Doing %distribution Red Hat Linux should override naturally with --define 'distribution FooLinux'