Question

I have a project with two files: a/foo and b/foo.

configure.ac:

AC_PREREQ([2.69])
AC_INIT([test], [1.0], [a@a.a])
AM_INIT_AUTOMAKE([foreign])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT

Makefile.am

EXTRA_DIST = a b
pkgdata_DATA = a/foo b/foo

When I run make install, I expect make to install /usr/share/test/a/foo and /usr/share/test/b/foo, but instead, it tries to install both a/foo and b/foo into /usr/share/test, which results in a conflict.

How can I do that?

Was it helpful?

Solution

Use

nobase_pkgdata_DATA = a/foo b/foo

The nobase prefix tells Automake not to strip the path components from the filenames when installing.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top