2

I am trying to find out which path actually resolves to %{_includedir} in a Centos6 installation.

I understand that this is normally "/usr/include" but where can I find where it is actually set or somehow "echo" it?

Basically, a spec I am using has "%dir %{_includedir}/someFolder/someFile". Everything runs fine but I can't find "/usr/include/someFolder". I assume it has been created somewhere else and I am trying to find out where that is.

2

rpmbuild --showrc shows all marcos available, _includedir is one of them:

-14: _includedir        %{_prefix}/include

(no idea what -14 means).

Marcos are being set system-wide somewhere in /etc/rpmrc or /etc/rpm/ or similar (was not able to find actual location, never needed it), and you can override them in ~/.rpmmacros file.

See also: http://www.rpm.org/wiki/PackagerDocs/Macros

| improve this answer | |
5
$ rpm -E '%{_includedir}'
/usr/include   # The actual location may vary
| improve this answer | |
  • Just seeing this. Works better than the accepted answer so I have +1ed it. Keeping my acceptance on the previous since it came first and did get me the info I wanted. – Dayo Mar 27 '12 at 20:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.