[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
variables in _SOURCES
From: |
Daniel Pocock |
Subject: |
variables in _SOURCES |
Date: |
Sun, 12 Jun 2016 09:22:21 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.7.0 |
According to the "Warning" in this page[1], it is not permitted to use
variables in _SOURCES. Is this deliberate or is it a bug?
In our project, we started getting the warnings about subdir-objects and
so we added[2]
AM_INIT_AUTOMAKE([foreign subdir-objects])
However, since that time the build has been failing[3] and it appears to
be because one module[4] is using a variable in _SOURCES
The $PYCXX_SRCDIR variable is used to refer to the sources provided by
the PyCXX[5] library. PyCXX is not distributed as a compiled library
that can be linked against, the sources are simply placed under
/usr/share by the packages (e.g. on Debian[6]) and users have to compile
them into their projects by referring to them from their Makefile.
What is the recommended way of using such sources in a build? I could
write some Makefile rule to copy or symlink the sources in to the tree,
but is there an official way to solve this with autotools?
More specifically, I am using them like this:
configure:
./configure ... \
--with-python \
PYCXX_SRCDIR=/usr/share/python2.7/CXX/Python2
Makefile.am:
nodist_libpyroute_la_SOURCES = $(PYCXX_SRCDIR)/cxxextensions.c
nodist_libpyroute_la_SOURCES += $(PYCXX_SRCDIR)/cxx_extensions.cxx
nodist_libpyroute_la_SOURCES += $(PYCXX_SRCDIR)/cxxsupport.cxx
nodist_libpyroute_la_SOURCES +=
$(PYCXX_SRCDIR)/../IndirectPythonInterface.cxx
1. https://autotools.io/automake/nonrecursive.html
2.
https://github.com/resiprocate/resiprocate/commit/fb37bc86db9f1b7d569eb2a17acd1e683b6ce55f
3. https://travis-ci.org/resiprocate/resiprocate/builds/131873177
4.
https://github.com/resiprocate/resiprocate/blob/master/repro/plugins/pyroute/Makefile.am
5. http://cxx.sourceforge.net/
6.
https://packages.debian.org/search?searchon=contents&keywords=cxxextensions.c&mode=path&suite=stable&arch=any
- variables in _SOURCES,
Daniel Pocock <=