fixes to "make distclean" and "make maintainerclean"
authorMorgan Deters <mdeters@gmail.com>
Mon, 31 Oct 2011 21:01:13 +0000 (21:01 +0000)
committerMorgan Deters <mdeters@gmail.com>
Mon, 31 Oct 2011 21:01:13 +0000 (21:01 +0000)
Makefile
Makefile.am

index 7f272b668963962c209e99ed6295cd5748755709..8cf0fbcc242e1afcf7011072e0867e93eed64c4e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -20,6 +20,15 @@ all .DEFAULT:
                echo; \
        fi
 
+distclean maintainerclean:
+       @if test -d $(builddir); then \
+               echo cd $(builddir); \
+               cd $(builddir); \
+               echo $(MAKE) $@; \
+               $(MAKE) $@; \
+       fi
+       test -z "$(builddir)" || rm -fr "$(builddir)"
+
 # synonyms for "check"
 .PHONY: test
 test: check
index db74bd378c6a07edc9adc2b290fd2ca3beb8335d..2edd33820faecabc16fb5faf73ea3909889dcab2 100644 (file)
@@ -118,3 +118,6 @@ man_MANS = \
 
 dist-hook:
        cp -p "$(srcdir)/Makefile" "$(distdir)/Makefile"
+
+distclean-local:
+       test -z "$(DX_DOCDIR)" || rm -fr "$(DX_DOCDIR)"