RM := rm -f
LSG := lopsubgen
GROFF := groff -m man -Thtml -P -l -P -r
+GZIP := gzip -cfn9
units := dss str file exec sig daemon df tv snap ipc dss.lsg version
objs := $(addsuffix .o, $(units))
deps := $(addsuffix .d, $(units))
-all: dss dss.1
-man: dss.1
+all: dss dss.1.gz
+man: dss.1.gz
$(objs): dss.lsg.h Makefile
-include $(deps)
%.1: %.suite
$(call SAY, LSGM $<)
$(LSG) --gen-man=$@ --version-string=$(VERSION) < $<
+%.1.gz: %.1
+ $(call SAY, GZIP $<)
+ $(GZIP) < $< > $@
%.1.html: %.1
$(call SAY, GROFF $<)
$(GROFF) $< | sed -e '1,/^<body>/d; /^<\/body>/,$$d' > $@
clean:
$(call SAY, CLEAN)
- $(RM) *.[od] dss dss.1 *.html dss.lsg.[ch] version.c
+ $(RM) *.[od] dss dss.1.* *.html dss.lsg.[ch] version.c
ifneq ($(findstring strip, $(MAKECMDGOALS)),)
strip_option := -s
install install-strip: all
$(MKDIR_P) $(bindir) $(mandir)
$(INSTALL_PROGRAM) $(strip_option) dss $(bindir)
- $(INSTALL_DATA) dss.1 $(mandir)
+ $(INSTALL_DATA) dss.1.gz $(mandir)
index.html: dss.1.html index.html.in INSTALL README NEWS
sed -e '/@README@/,$$d' index.html.in > $@