diff --git a/Makefile.in b/Makefile.in index 4d3957740..ceb89649b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -38,6 +38,9 @@ endif SUBDIRS += scripts +ifeq ($(MAKECMDGOALS),clean) + SUBDIRS += test +endif # FIXME Should use intermediate Makefiles here! ifeq ($(MAKECMDGOALS),distclean) SUBDIRS = doc include man test scripts \ diff --git a/test/unit/Makefile.in b/test/unit/Makefile.in index 740eb147a..62a00774b 100644 --- a/test/unit/Makefile.in +++ b/test/unit/Makefile.in @@ -1,4 +1,4 @@ -# Copyright (C) 2011-2012 Red Hat, Inc. All rights reserved. +# Copyright (C) 2011-2013 Red Hat, Inc. All rights reserved. # # This file is part of LVM2. # @@ -15,8 +15,14 @@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ VPATH = $(srcdir) -ifeq ("@TESTING@", "yes") -SOURCES = bitset_t.c matcher_t.c config_t.c string_t.c run.c +UNITS = bitset_t.c matcher_t.c config_t.c string_t.c run.c + +ifeq ($(MAKECMDGOALS),distclean) +SOURCES = $(UNITS) +endif + +ifeq ("$(TESTING)", "yes") +SOURCES = $(UNITS) TARGETS = run endif