On my Enterprise Linux installation, the default "macrofiles" setup is
/usr/lib/rpm/macros:/usr/lib/rpm/%{_target}/macros:/etc/rpm/macros.specspo:/etc/rpm/macros.prelink:/etc/rpm/macros.solve:/etc/rpm/macros.up2date:/etc/rpm/macros:/etc/rpm/%{_target}/macros:~/.rpmmacros
I thought this meant that if I did
rpmbuild --target <something>
then /usr/lib/rpm/<something>/macros and /etc/rpm/<something>/macros
would be loaded (among other things), but based on experiments I just
did, it looks like this is not the case. [ ... ]
You can always use --define.
Replace %{_target} on your macrofiles setup for, say: %{customtag},
then:
rpmbuild --define 'customtag XXXX'
Yeah, I know. I was just hoping I could do this without having to mess
around with rpmrc or special defines... And after all, I have done a
define already - implicitly via --target. And the macro path *will* be
expanded as I expect if I for instance mention it in the spec file (not
that this is very useful) - but it may seem like there is a problem with
the definition order (i.e. that _target is set *after* macro files are
searched.)
But actually, I don't think --define '_target <something>' helped,
either, so would --define 'customtag <something>'? (Not able to test
right now)
- T
_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list