]> git.tuebingen.mpg.de Git - dss.git/blobdiff - Makefile
Add phony targets distclean and maintainer-clean.
[dss.git] / Makefile
index cc1548bcf9e56b3f5b69d0f37c83181c9573356e..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)" \
@@ -67,8 +68,10 @@ c_generated := $(B)/$(PACKAGE).lsg $(B)/version
 objs := $(addsuffix .o, $(c_generated) $(addprefix $(B)/, $(c_source)))
 deps := $(objs:.o=.d)
 all := $(PACKAGE) $(PACKAGE).1.gz
+www := $(B)/index.html $(B)/$(PACKAGE).1.html
 
 all: $(all)
+www: $(www)
 man: $(PACKAGE).1.gz
 $(objs): $(B)/$(PACKAGE).lsg.h Makefile
 -include $(deps)
@@ -112,7 +115,7 @@ $(B)/%.o: %.c
        $(call SAY, CC $<)
        $(CC_CMD)
 
-.PHONY: all 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 $<)
@@ -137,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