[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to install data / lib in more than 1 place?

From: Georg-Johann Lay
Subject: Re: How to install data / lib in more than 1 place?
Date: Tue, 10 Dec 2019 22:46:27 +0100
User-agent: Thunderbird (Windows/20100228)

Bob Friesenhahn schrieb:
On Tue, 10 Dec 2019, Georg-Johann Lay wrote:

Hi, I have an automake file with rules for a lib like this:

__install_dir = $(prefix)/avr/lib/$(AVR_INSTALL_DIR)

avrdir = $(__install_dir)
avrlibdir = $(__install_dir)

avr_LIBRARIES = libdev.a
nodist_libdev_a_SOURCES = ...

What would be the recommended way to install libdev.a also in several sub-folders like in $(avrlibdir)/dir1 $(avrlibdir)/dir2 etc.?

Currently, there are a bunch of SUBDIRS which are all generating the same binary, it's just that they are installed in a slightly different place.

It seems that Automake supports a 'dir' syntax which allows using the standard target suffixes (e.g. _DATA) in an arbitrary way. This works for me:

# Pkgconfig directory
pkgconfigdir = $(libdir)/pkgconfig

# Files to install in Pkgconfig directory
pkgconfig_DATA = foo.pc

This should allow you to have

avrfoodir = $(prefix)/avr/lib/foo

avrbardir = $(prefix)/avr/lib/bar

and then possibly this might work:

Hi, thanks.  That was fast!

avrfoo_LIBRARIES = libfoo.a

avrbar_LIBRARIES = libbar.a

Will this also work with same file names? Like

avrfoo_LIBRARIES = libfoo.a

avrbar_LIBRARIES = libfoo.a

or would that confuse the tools?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]