With the patch applied, "make clean" keeps files generated by lopsub
and m4, "make distclean" removes the build directory, and "make
maintainer-clean" removes all untracked files except Makefile.local.
LSG := lopsubgen
GROFF := groff -m man -Thtml -P -l -P -r
GZIP := gzip -cfn9
+GIT := git
M4 := m4 \
-D "AUTHOR=$(AUTHOR)" \
-D "PACKAGE=$(PACKAGE)" \
$(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 $<)
$(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