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

[linux-lvm] [PATCH] Makefile.in: correct distclean rule



[resending, with "From " escaped to avoid triggering the mailman bug
 that would otherwise elide any patch produced by "git format-patch"]

Currently, "make distclean" gets lots of errors,
because none of the directories test/mm, test/device, ...
exist any more (they've been moved to old-tests/).
And even those latter never have a Makefile, so the only
sensible thing to do is remove those old subdirs from the
list in Makefile.in.

The change below does that as well as adding "test"
so that "make distclean" traverses into that subdirectory.
Before, "make check" would create test/bin,
but a top-level "make distclean" would not remove it.

FYI, initially I thought it was an oversight that
"make clean" did not remove artifacts from subdirectories,
so I made this additional change:

  diff --git a/Makefile.in b/Makefile.in
  ...
  -ifeq ($(MAKECMDGOALS),distclean)
  +ifneq ($(strip $(filter %clean,$(MAKECMDGOALS))),)

However, it could also be a policy decision, so I left it.

I'll commit the following shortly.

>From c56e70dd99f6a59181486c2ce375f87a946b9690 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering redhat com>
Date: Wed, 11 Jun 2008 18:35:08 +0200
Subject: [PATCH] Makefile.in: correct distclean rule
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

* Makefile.in (SUBDIRS): Remove long-unused test/* names.
(SUBDIRS) [distclean]: Append "test".
Discovered with Zdeněk Kabeláč.
---
 Makefile.in |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index 805e3a9..4891e32 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,6 +1,6 @@
 #
 # Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
-# Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved.
 #
 # This file is part of LVM2.
 #
@@ -36,8 +36,8 @@ ifeq ($(MAKECMDGOALS),distclean)
 	     lib/locking \
 	     lib/mirror \
 	     lib/snapshot \
-	     po \
-	     test/mm test/device test/format1 test/regex test/filters
+	     test \
+	     po
   DISTCLEAN_TARGETS += lib/misc/configure.h
 endif

--
1.5.6.rc2.17.ge9e7


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