AUDIT: r21570 - gnucash/trunk - Fix clean targets and DIST_SOURCES
jralls at ceridwen.us
Tue Nov 22 15:15:52 EST 2011
On Nov 22, 2011, at 9:17 AM, Derek Atkins wrote:
> John Ralls <jralls at ceridwen.us> writes:
>>> I'm glad to hear it works now.
>> Well, I made the change because the manually-set DIST_SUBDIRS was
>> broken, at least for src/python, invoking make twice on the DIST
> I find that odd, unless it wound up being listed twice after all the
> variable substitution was done? E.g., if you did:
> DIST_SUBDIRS = $(SUBDIRS) python
> This would be wrong.
Yet that's exactly what they all did:
SUBDIRS = \
DIST_SUBDIRS = $(SUBDIRS) python
with $(PYTHON_DIR) getting AC_SUBSTed to "python" in configure if --enable-python was invoked or "" if it wasn't.
Autotools knows how to do that right if you use AM_CONDITIONAL([WITH_PYTHON],...) in configure and then set PYTHON_DIR in an if $(WITH_PYTHON) in the Makefile. To do it with AC_SUBST, I guess you'd do:
if (test "x$enable_python" = xyes; then
PYTHON_DIR = python
WITHOUT_PYTHON = ""
PYTHON_DIR = ""
WITHOUT_PYTHON = python
DIST_SUBDIRS = $(SUBDIRS) $(WITHOUT_PYTHON)
to get the same effect.
More information about the gnucash-devel