From cdd0a1ddcfb0ef00e5f3845d078b232d9078ef83 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Tue, 26 May 2009 10:54:09 +0100
Subject: [PATCH] Add a maintainer-clean makefile rule
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This splits the current β€œclean” rule into proper clean (cleaning of
build artifacts) and maintainer-clean (cleaning of distributed files).
This should make it better for Debian packaging.
---
 Makefile | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index c681119c8..b349a8ca1 100644
--- a/Makefile
+++ b/Makefile
@@ -28,13 +28,14 @@ doc: $(DOCS)
 		--source-entity="%{MODULE/.//}.html#%{NAME}" \
 		$(HSRCS)
 
-clean:
+maintainer-clean:
 	rm -rf $(HDDIR)
+	rm -f $(DOCS) TAGS version Ganeti/HTools/Version.hs
+
+clean:
 	rm -f $(HPROGS)
 	rm -f *.o *.prof *.ps *.stat *.aux *.hi
 	cd Ganeti/HTools && rm -f *.o *.prof *.ps *.stat *.aux *.hi
-	rm -f $(DOCS) TAGS Ganeti/HTools/Version.hs
-	git describe >/dev/null 2>&1 && rm -f version || true
 
 version:
 	git describe > $@
@@ -52,4 +53,4 @@ dist: Ganeti/HTools/Version.hs version doc
 	gzip -v9 $$ANAME ; \
 	tar tzvf $$ANAME.gz
 
-.PHONY : all doc clean dist
+.PHONY : all doc maintainer-clean clean dist
-- 
GitLab