[xml] make dist fail if configure with ""

During some test related to cross-compilation for mingw host I found that make dist fail in python subdirectory.

The libxml2 (SVN:VERSION=trunk; At revision 3695 ; 2008-02-17 ) is configured --without-python.

First proposed patch don't resolve issues (in python subdir ! ) like following:
- make tests in top builddir don't run always tests in python subdirectory :
Simple test-case to reproduce :
$ touch tests/Makefile
$ make tests
make: `tests' is up to date.

- make tests fail if builddir <> sourcedir:
I would like to use same source tree and to check --{with|without}-python in different build directories.

The reason for failure (make dist) is that libxml2mod source list one of generated files ( libxml2-py.c ) and this file is not generated in case --without-python .

The simple patch is generated source file do not enter in distribution.
As example:
-libxml2mod_la_SOURCES = libxml.c types.c libxml2-py.c
+libxml2mod_la_SOURCES = libxml.c types.c
+nodist_libxml2mod_la_SOURCES = libxml2-py.c

This is documented in paragraph "Dist"/"Fine-grained distribution control" from automake texinfo pages.

I would like to propose a patch (see attached file libxml2-trunk-nopython.patch.gz ) that solve described problem and in addition replace targets "install-data-local:" and "uninstall-local:" with standard automake variables. Note patch is relative to python subdir.

Since sources (except prefixed with nodist_) and dist_xxx_DATA will enter into distribution those files are removed from EXTRA_DIST list.

I remove targets "all:" and "all-local:", since libxml2.py is listed in xxx_DATA variable and command "rm libxml2.py; make test" will generate libxml2.py first then will execute commands for "test" target:
$ rm libxml2.py; make test
Making all in .
make[1]: Entering directory `.../libxml2-trunk/python'
cat ./libxml.py libxml2class.py > libxml2.py
make[1]: Leaving directory `.../libxml2-trunk/python'
Making all in tests
make[1]: Entering directory `.../libxml2-trunk/python/tests'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `.../libxml2-trunk/python/tests'
cd tests && make MAKEFLAGS+=--silent tests


Attachment: libxml2-trunk-nopython.patch.gz
Description: application/gzip

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]