Add a maintainer-clean makefile rule
authorIustin Pop <iustin@google.com>
Tue, 26 May 2009 09:54:09 +0000 (10:54 +0100)
committerIustin Pop <iustin@google.com>
Tue, 26 May 2009 09:58:36 +0000 (10:58 +0100)
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

index c681119..b349a8c 100644 (file)
--- 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