Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

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

share|improve this answer
$ rpm -E '%{_includedir}'
/usr/include   # The actual location may vary
share|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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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