On Nov 22, 2011, at 9:17 AM, Derek Atkins wrote:

> John Ralls <[email protected]> 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
>> targets.
> 
> 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:

For example,

SUBDIRS = \
        stuff \
        $(PYTHON_DIR) \
        more_stuff

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:

[configure.ac]
        if (test "x$enable_python" = xyes; then
                PYTHON_DIR = python
                WITHOUT_PYTHON = ""
        else
                PYTHON_DIR = ""
                WITHOUT_PYTHON = python
        fi
    AC_SUBST(PYTHON_DIR)
    AC_SUBST(WITHOUT_PYTHON)

[Makefile.am]

DIST_SUBDIRS = $(SUBDIRS) $(WITHOUT_PYTHON)

to get the same effect.

Regards,
John Ralls


_______________________________________________
gnucash-devel mailing list
[email protected]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

Reply via email to