1

If I were to write a library for a C-incompatible language (like D), where would be the best place to install my "header files" to?

usr/include seems like a bad idea, since the FHS says it's for "header files included by C programs."

2 Answers 2

2

You define your own conventions, but I'd indeed stay away from /usr/include.

/usr/lib/<lang> seems popular here for interpreted languages (I've at least /usr/lib/python, /usr/lib/perl and /usr/lib/ruby with variants for the handling of version specific stuff) I think that /usr/share/<lang> is more proper from the FHS (I've also /usr/share/tcl with a symbolic link from /usr/lib/tcl) if there is no binary data there (or at least only architecture independent binary data).

Still in the FHS spirit, I'd tend to use /opt/<lang>/share or /opt/<lang>/lib while providing the installer (or the distribution) an easy way to use /usr/share/<lang> or /usr/lib/<lang>.

1
  • 1
    I'd say '/usr/lib/<lang>/include'. 1+ Apr 17, 2012 at 13:38
0

I'd say /usr/local/include/ for your own additions. Linux Filesystem Hierarchy Standard

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .