0

Is there anyway I can modify the path for pkginclude_ without actually changing the structure of my project? Heres the directory stucture I have.

My_Project >
       include >
             banana.h
             apple.h
             pear.h
Makefile.am
configure

In the Makefile.am I have..

pkginclude_HEADERS=include/*.h

Running make install places the files in..

/usr/include/My_Project/

What I would like to happen is have includes installed in..

/usr/include/My_Project/fruits/

I would like to do this without passing any flags into configure or make and without changing the directory structure on my machine. Is there a way to specifiy this as the default behaviour?

Digging around the ineterweb. Couldn't find the answer, although I may have missed it. I rather dislike autotools docs.

bgura
  • 860
  • 15
  • 33

3 Answers3

4

how about:

fruitsdir=$(pkgincludedir)/fruits
fruits_HEADERS=include/*.h

the more orthodox way would be to restructure your project to have the fruits/ directory:

My_Project > 
   includes > 
      fruits > 
         apple.h
         banana.h
         pear.h

and then add to My_Project/includes/Makefile.am

nobase_pkginclude_HEADERS = fruits/apple.h fruits/banana.h fruits/pear.h
umläute
  • 28,885
  • 9
  • 68
  • 122
  • Thanks. I also understand the orthodox way, just didnt want to change my dir structure at this point. Thanks for the tip and answer – bgura Aug 16 '12 at 21:53
1

In Makefile.am:

pkgincludedir = $(includedir)/$(PACKAGE)/fruits
William Pursell
  • 204,365
  • 48
  • 270
  • 300
  • Thanks for sharing your solution. I solved it the way I answered below however this also works – bgura Aug 16 '12 at 21:52
0

I solved it using this method,

In Makefile.am

nobase_pkginclude_HEADERS=fruits/*.h
bgura
  • 860
  • 15
  • 33