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?
Johann
Bob