Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=b1b75186805... Commit: b1b751868059ebc1188de3e13db1eadbb5ede16c Parent: 9c6977dae8082767f07f96f1c29672556fa062bf Author: Andrew Price anprice@redhat.com AuthorDate: Tue Apr 9 16:52:25 2013 +0100 Committer: Andrew Price anprice@redhat.com CommitterDate: Tue Apr 9 16:52:25 2013 +0100
gfs2-utils: Build system fixes
Previously we were disabling the whole test suite when check isn't installed but tool_tests.sh doesn't require it so the conditional has been moved into tests/Makefile.am so that tool_tests.sh is always enabled.
Also fixes a problem where AC_PROG_YACC allowed the build to continue when bison was not installed but byacc was. We use bison-specific features so a specific check for bison has been added.
Signed-off-by: Andrew Price anprice@redhat.com --- Makefile.am | 6 +----- configure.ac | 5 ++++- tests/Makefile.am | 6 +++++- 3 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/Makefile.am b/Makefile.am index 3cd0b85..210ab15 100644 --- a/Makefile.am +++ b/Makefile.am @@ -16,11 +16,7 @@ if BUILD_GFS_CONTROLD DIR_GROUP = group endif
-if BUILD_TESTS -DIR_TESTS = tests -endif - -SUBDIRS = po $(DIR_GROUP) gfs2 doc $(DIR_TESTS) +SUBDIRS = po $(DIR_GROUP) gfs2 doc tests
install-exec-local: $(INSTALL) -d $(DESTDIR)/$(LOGDIR) diff --git a/configure.ac b/configure.ac index b24fc86..45b38eb 100644 --- a/configure.ac +++ b/configure.ac @@ -58,7 +58,8 @@ AC_PROG_LN_S AC_PROG_INSTALL AC_PROG_MAKE_SET AC_PROG_LEX -AC_PROG_YACC +AC_CHECK_PROG([YACC], [bison], [bison -y]) +test x"$YACC" = x && AC_MSG_ERROR([bison not found])
## local helper functions
@@ -275,3 +276,5 @@ AC_CONFIG_FILES([Makefile ])
AC_OUTPUT + +test x"$BUILD_TESTS" = x && AC_MSG_NOTICE([package 'check' not found; unit tests will not be built]) diff --git a/tests/Makefile.am b/tests/Makefile.am index d8aa8f2..a97b8c5 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,6 +1,7 @@ TESTS_ENVIRONMENT = TOPBUILDDIR=$(top_builddir) -TESTS = check_libgfs2 tool_tests.sh EXTRA_DIST = tool_tests.sh + +if BUILD_TESTS check_PROGRAMS = check_libgfs2 check_libgfs2_SOURCES = check_meta.c \ $(top_srcdir)/gfs2/libgfs2/libgfs2.h @@ -8,3 +9,6 @@ check_libgfs2_CFLAGS = -I$(top_srcdir)/gfs2/libgfs2 \ -I$(top_srcdir)/gfs2/include \ @check_CFLAGS@ check_libgfs2_LDADD = $(top_builddir)/gfs2/libgfs2/libgfs2.la @check_LIBS@ +endif + +TESTS = $(check_PROGRAMS) tool_tests.sh
cluster-commits@lists.fedorahosted.org