2

My current project has a couple files in its include/tatoparser directory that I would like to distribute along with my library.

qdii@nomada ~/MyProject $ ls include/tatoparser/
dataset.h  interface_lib.h  linkset.h  sentence.h  tagset.h

I created a Makefile.am that references those files:

qdii@nomada ~/MyProject $ cat include/Makefile.am 
include_HEADERS = tatoparser/interface_lib.h tatoparser/sentence.h tatoparser/dataset.h tatoparser/tagset.h tatoparser/linkset.h

But when I run make install the referenced files get copied into /usr/include (or whatever $(includedir) was set to), and I want them copied in /usr/include/tatoparser.

How can I do that?

qdii
  • 12,505
  • 10
  • 59
  • 116
  • Possible duplicate of [placing header files in a subdirectory of /usr/include with automake?](http://stackoverflow.com/questions/5603902/placing-header-files-in-a-subdirectory-of-usr-include-with-automake) – Richard Hansen Oct 02 '15 at 08:12

1 Answers1

6

Use the nobase prefix to stop Automake from stripping the subdirectory path from the files:

nobase_include_HEADERS = tatoparser/interface_lib.h tatoparser/...
ptomato
  • 56,175
  • 13
  • 112
  • 165