]> git.tuebingen.mpg.de Git - dss.git/blobdiff - Makefile
Add phony targets distclean and maintainer-clean.
[dss.git] / Makefile
index c06fdece8d3c39b6a985af1b2e3fbe493579f1c4..462aba79c1eb02ab47cb880a679a1e2e8e94f97c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -47,6 +47,7 @@ RM := rm -f
 LSG := lopsubgen
 GROFF := groff -m man -Thtml -P -l -P -r
 GZIP := gzip -cfn9
+GIT := git
 M4 := m4 \
        -D "AUTHOR=$(AUTHOR)" \
        -D "PACKAGE=$(PACKAGE)" \
@@ -114,7 +115,7 @@ $(B)/%.o: %.c
        $(call SAY, CC $<)
        $(CC_CMD)
 
-.PHONY: all www clean install README
+.PHONY: all www clean distclean maintainer-clean install README
 .PRECIOUS: $(B)/%.lsg.c $(B)/%.lsg.h $(B)/%.suite $(B)/%.1
 $(B)/$(PACKAGE).suite: $(PACKAGE).suite.m4 Makefile
        $(call SAY, M4 $<)
@@ -139,7 +140,13 @@ $(B)/index.html: index.html.m4 Makefile
        $(M4) $< > $@
 clean:
        $(call SAY, CLEAN)
-       $(RM) -r $(B) $(all)
+       $(RM) $(B)/*.o $(B)/*.d $(all) $(www)
+distclean: clean
+       $(call SAY, DISTCLEAN)
+       $(RM) -r $(B)
+maintainer-clean: distclean
+       $(call SAY, MAINTANER-CLEAN)
+       $(GIT) clean -dfqxe Makefile.local
 
 ifneq ($(findstring strip, $(MAKECMDGOALS)),)
        strip_option := -s