[libxml2] Build test programs only when needed



commit 988a5a3b6b1c48ea5c3b4ab81a4338987018803c
Author: Nick Wellnhofer <wellnhofer aevum de>
Date:   Sat Jun 17 15:44:50 2017 +0200

    Build test programs only when needed
    
    Add test programs to 'check_PROGRAMS' instead of 'noinst_PROGRAMS'.
    
    Fixes bug 760457.

 Makefile.am              |   11 ++++++-----
 doc/examples/Makefile.am |    6 +++---
 doc/examples/index.py    |   10 +++++-----
 example/Makefile.am      |    2 +-
 vms/build_libxml.com     |    6 +++---
 5 files changed, 18 insertions(+), 17 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index e2cd7a9..efc9212 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -10,10 +10,10 @@ AM_CPPFLAGS = -I$(top_builddir)/include -I$(srcdir)/include
 
 AM_CFLAGS = $(THREAD_CFLAGS) $(Z_CFLAGS) $(LZMA_CFLAGS)
 
-noinst_PROGRAMS=testSchemas testRelax testSAX testHTML testXPath testURI \
-                testThreads testC14N testAutomata testRegexp \
-                testReader testapi testModule runtest runsuite testchar \
-               testdict runxmlconf testrecurse testlimits
+check_PROGRAMS=testSchemas testRelax testSAX testHTML testXPath testURI \
+               testThreads testC14N testAutomata testRegexp \
+               testReader testapi testModule runtest runsuite testchar \
+              testdict runxmlconf testrecurse testlimits
 
 bin_PROGRAMS = xmllint xmlcatalog
 
@@ -202,7 +202,8 @@ runxmlconf_LDADD= $(LDADDS)
 #testOOM_DEPENDENCIES = $(DEPS)
 #testOOM_LDADD= $(LDADDS)
 
-runtests:
+runtests: runtest$(EXEEXT) testrecurse$(EXEEXT) testapi$(EXEEXT) \
+          testchar$(EXEEXT) testdict$(EXEEXT) runxmlconf$(EXEEXT)
        [ -d test   ] || $(LN_S) $(srcdir)/test   .
        [ -d result ] || $(LN_S) $(srcdir)/result .
        $(CHECKER) ./runtest$(EXEEXT) && \
diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am
index 3b5f5a9..ef59fce 100644
--- a/doc/examples/Makefile.am
+++ b/doc/examples/Makefile.am
@@ -13,7 +13,7 @@ if REBUILD_DOCS
 rebuild: examples.xml index.html
 .PHONY: rebuild
 
-examples.xml: index.py $(noinst_PROGRAMS:=.c)
+examples.xml: index.py $(check_PROGRAMS:=.c)
        cd $(srcdir) && $(PYTHON) index.py
        $(MAKE) Makefile
 
@@ -49,7 +49,7 @@ EXTRA_DIST = \
        xpath1.res \
        xpath2.res
 
-noinst_PROGRAMS = \
+check_PROGRAMS = \
        io1 \
        io2 \
        parse1 \
@@ -99,7 +99,7 @@ xpath2_SOURCES = xpath2.c
 valgrind: 
        $(MAKE) CHECKER='valgrind' tests
 
-tests: $(noinst_PROGRAMS)
+tests: $(check_PROGRAMS)
        @test -f Makefile.am || test -f test1.xml || $(LN_S) $(srcdir)/test?.xml .
        @(echo '## examples regression tests')
        @(echo > .memdump)
diff --git a/doc/examples/index.py b/doc/examples/index.py
index 6831298..ac44ec5 100755
--- a/doc/examples/index.py
+++ b/doc/examples/index.py
@@ -235,7 +235,7 @@ if REBUILD_DOCS
 rebuild: examples.xml index.html
 .PHONY: rebuild
 
-examples.xml: index.py $(noinst_PROGRAMS:=.c)
+examples.xml: index.py $(check_PROGRAMS:=.c)
        cd $(srcdir) && $(PYTHON) index.py
        $(MAKE) Makefile
 
@@ -259,14 +259,14 @@ clean-local:
     for extra in extras:
         EXTRA_DIST = EXTRA_DIST + " \\\n\t" + extra
     Makefile = Makefile + "EXTRA_DIST =%s\n\n" % (EXTRA_DIST)
-    noinst_PROGRAMS=""
+    check_PROGRAMS=""
     for example in examples:
-        noinst_PROGRAMS = noinst_PROGRAMS + " \\\n\t" + example
-    Makefile = Makefile + "noinst_PROGRAMS =%s\n\n" % (noinst_PROGRAMS)
+        check_PROGRAMS = check_PROGRAMS + " \\\n\t" + example
+    Makefile = Makefile + "check_PROGRAMS =%s\n\n" % (check_PROGRAMS)
     for example in examples:
         Makefile = Makefile + "%s_SOURCES = %s.c\n\n" % (example, example)
     Makefile = Makefile + "valgrind: \n\t$(MAKE) CHECKER='valgrind' tests\n\n"
-    Makefile = Makefile + "tests: $(noinst_PROGRAMS)\n"
+    Makefile = Makefile + "tests: $(check_PROGRAMS)\n"
     Makefile = Makefile + "\t@test -f Makefile.am || test -f test1.xml || $(LN_S) $(srcdir)/test?.xml .\n"
     Makefile = Makefile + "\t@(echo '## examples regression tests')\n"
     Makefile = Makefile + "\t@(echo > .memdump)\n"
diff --git a/example/Makefile.am b/example/Makefile.am
index 488ee6e..49bca39 100644
--- a/example/Makefile.am
+++ b/example/Makefile.am
@@ -1,4 +1,4 @@
-noinst_PROGRAMS        = gjobread
+check_PROGRAMS = gjobread
 
 AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include -I$(srcdir)/include
 AM_CFLAGS = $(THREAD_CFLAGS) $(Z_CFLAGS)
diff --git a/vms/build_libxml.com b/vms/build_libxml.com
index 3a6fcc0..1f7936e 100755
--- a/vms/build_libxml.com
+++ b/vms/build_libxml.com
@@ -62,9 +62,9 @@ $!
 $   bin_progs = "xmllint xmlcatalog"
 $!
 $!- list of test modules to compile and link.  Compare this list to the
-$!  definition of noinst_PROGRAMS in MAKEFILE.
+$!  definition of check_PROGRAMS in MAKEFILE.
 $!
-$   noinst_PROGRAMS = "testSchemas testRelax testSAX testHTML testXPath testURI " -
+$   check_PROGRAMS = "testSchemas testRelax testSAX testHTML testXPath testURI " -
                 + "testThreads testC14N testAutomata testRegexp testReader"
 $!
 $!- set up build logicals -----------------------------------------------------\
@@ -196,7 +196,7 @@ $ write sys$output "Building main programs and test programs"
 $ write sys$output ""
 $!
 $ p_no = 0
-$ all_progs = bin_progs + " " + noinst_PROGRAMS
+$ all_progs = bin_progs + " " + check_PROGRAMS
 $ all_progs = f$edit(all_progs,"COMPRESS")
 $!
 $ prog_loop:


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