[lug] automake & make install

Tom Tromey tromey at redhat.com
Sat Jun 30 07:39:59 MDT 2001


>>>>> "David" == David Trowbridge <jupiter at flatirons.org> writes:

David> That being done, I can't seem to figure out how to do 'make
David> install' with this. I have several data files which need to be
David> put in configurable places. The configurable bit is easy. All
David> the other examples I've looked at don't have an evident method
David> for this. Am I just overlooking something obvious?

It's hard to understand exactly what you mean.
But here is how to do what I think you're asking.

First, introduce a new directory variable for each directory you want
to install in.  A directory variable is one whose name ends in "dir":

    data1dir = /some/location

The values can be configure substitutions or whatever.  I recommend
that they be relative to $(prefix).

If the files you will be installing are architecture-dependent, put
the string `exec' into the name:

    dataexecdir = /some/other/location

Then you can install your files to these locations like so:

    data1_DATA = files that go here
    dataexec_DATA = files that go there

Don't use _DATA for things like programs or scripts -- only plain
files.  If you use it for programs then they won't have the right
permission when installed.

`make install' will install all these files.
`make install-data' will install the `data1_DATA' files (and any other
platform-independent files).
`make install-exec' will install the `dataexec_DATA' files (and any
other platform-dependent files).

I think the above is already documented in the manual (which I agree
in advance is terrible; fixing it is the only thing preventing the
next automake release).  I think it is also gone over in the goat
book, which you can read online:

    http://sources.redhat.com/autobook/

HTH,
Tom



More information about the LUG mailing list