RM := rm -f
CHMOD := chmod
GROFF := groff
+GZIP := gzip -cfn9
B := build
-all := $(PACKAGE) $(PACKAGE).8
+all := $(PACKAGE) $(PACKAGE).8.gz
all: $(all)
SLOGAN := the minimal snapshot manager
$(B)/%.lsg.h: $(B)/%.suite
$(call SAY, LSGH $<)
$(LOPSUBGEN) --gen-header --output-dir $(B) < $<
-%.8: $(B)/%.suite $(B)/version.c
+$(B)/%.8: $(B)/%.suite $(B)/version.c
$(call SAY, LSGM $<)
- $(LOPSUBGEN) --gen-man=$(*F).8 --version-string $(GIT_VERSION) < $<
-$(B)/%.8.html: %.8
+ $(LOPSUBGEN) --gen-man=$@ --version-string $(GIT_VERSION) < $<
+%.8.gz: $(B)/%.8
+ $(call SAY, GZIP $<)
+ $(GZIP) < $< > $@
+$(B)/%.8.html: $(B)/%.8
$(GROFF) -m man -Thtml -Wbreak < $< > $@
-
$(B)/%.o: %.c | $(B)
$(call SAY, CC $<)
$(CC_CMD) $<
install install-strip: all
$(MKDIR_P) $(DESTDIR)$(sbindir) $(DESTDIR)$(mandir)
$(INSTALL_PROGRAM) $(strip_option) $(PACKAGE) $(DESTDIR)$(sbindir)
- $(INSTALL_DATA) $(PACKAGE).8 $(DESTDIR)$(mandir)
+ $(INSTALL_DATA) $(PACKAGE).8.gz $(DESTDIR)$(mandir)
clean:
$(RM) $(B)/*.o $(all)