From 9b2be901ed55ff309da8e94879cacb560f21dc2b Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Mon, 3 Jun 2013 12:05:02 +0200 Subject: [PATCH] makefiles: cleanup update Cleanup also test dir. Distclean unit tests. --- Makefile.in | 3 +++ test/unit/Makefile.in | 12 +++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) 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