simple 'install of png file' question

2009-08-11 Thread David Liebman
Hello,

This is a newbie question.

I have a simple project that I'm using automake and autoconf on. It
involves a simple c program, but uses a png image. The png image is in a
directory called 'pics' and I want it copied to a certain directory on
the system when the user calls the 'install' target.

I suspect the proper thing to do is to make a Makefile in the 'pics'
directory and have that makefile install the png. How do I go about
doing that? Does anyone have a link to a good example of how this is
done? If I am creating a Makefile in the pics directory I would like the
Makefile to be auto-generated.

Thanks for your time and consideration.





Re: simple 'install of png file' question

2009-08-11 Thread John Calcote

Hi David,

On 8/11/2009 7:28 AM, David Liebman wrote:

Hello,

This is a newbie question.

I have a simple project that I'm using automake and autoconf on. It
involves a simple c program, but uses a png image. The png image is in a
directory called 'pics' and I want it copied to a certain directory on
the system when the user calls the 'install' target.

I suspect the proper thing to do is to make a Makefile in the 'pics'
directory and have that makefile install the png. How do I go about
doing that? Does anyone have a link to a good example of how this is
done? If I am creating a Makefile in the pics directory I would like the
Makefile to be auto-generated.
   


You may create a new Makefile.am file in the pics directory if you wish, 
or you don't have to. Here's how to do this if you don't create a new 
Makefile.am. Add this code to the parent directory's Makefile.am:


picdir = $(datadir)/pics # assuming you want png's installed in 
/usr/local/share/pics

pic_DATA = mypicture.png

That's it! Regarding the location where you want to install - try to use 
standard places if you can, but if you can't then try to build on 
standard places defined in the automake provided environment variables.


Regards,
John