Discussion:
'pkglibexecdir' is not a legitimate directory
Itamar Gal
2015-07-29 22:15:50 UTC
Permalink
Hey autoconf folks,

I'm following some outdated instructions in an attempt to compile some
proprietary, closed-source, unsupported, legacy code. Here is what a
typical shell session looks like:

$ autoreconf -fi

src/Makefile.am:7: error: 'pkglibexecdir' is not a legitimate
directory for 'PYTHON'
autoreconf: automake failed with exit status: 1


$ cat src/Makefile.am

pkglibexecdir = $(libexecdir)/packagename

nobase_pkglibexec_PYTHON = \
python_module_1.py
python_module_2.py
[...]

MAINTAINERCLEANFILES = Makefile.in
BUILT_SOURCES = some_source

some_source:
ln -s ../lib/python/some_source some_source


I'm using GNU Autoconf 2.69 on CentOS 7. I'm also having similar issues
with other packages in the same project. I'm assuming that there's a quick
fix for this problem but I'm not very comfortable with autotools and most
of what I've found via google hasn't made a lot of sense to me. Any advice
would be greatly appreciated!

Cheers,
Itamar

P.S. I've also posted this question on stackexchange, so I'm including a
link here in case someone wants to go claim credit for their solution (I'm
not sure what the etiquette is on cross-posting to mailing lists):

http://unix.stackexchange.com/questions/219152/pkglibexecdir-is-not-a-legitimate-directory
Gavin Smith
2015-07-30 08:47:53 UTC
Permalink
Post by Itamar Gal
Hey autoconf folks,
I'm following some outdated instructions in an attempt to compile some
proprietary, closed-source, unsupported, legacy code. Here is what a
$ autoreconf -fi
src/Makefile.am:7: error: 'pkglibexecdir' is not a legitimate
directory for 'PYTHON'
autoreconf: automake failed with exit status: 1
You need to use a trick to circumvent automake's policing:

https://www.gnu.org/software/automake/manual/html_node/Uniform.html
This feature can also be used to override the sanity checks Automake
performs to diagnose suspicious directory/primary couples (in the
unlikely case these checks are undesirable, and you really know what
you’re doing). For example, Automake would error out on this input:

# Forbidden directory combinations, automake will error out on this.
pkglib_PROGRAMS = foo
doc_LIBRARIES = libquux.a

but it will succeed with this:

# Work around forbidden directory combinations. Do not use this
# without a very good reason!
my_execbindir = $(pkglibdir)
my_doclibdir = $(docdir)
my_execbin_PROGRAMS = foo
my_doclib_LIBRARIES = libquux.a
Loading...