From: Andre Noll Date: Sun, 28 Apr 2024 03:07:01 +0000 (+0200) Subject: build: Compress the man page. X-Git-Tag: v1.0.2~21 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=fb039e1b989a85199dc18642b70c6bbb177e03b6;p=dss.git build: Compress the man page. Run gzip with -n to make the build reproducible. --- diff --git a/.gitignore b/.gitignore index b6dcfd2..fc6a8bb 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,6 @@ version.c *.swp dss.lsg.* dss -dss.1 +dss.1.gz dss.1.html index.html diff --git a/Makefile b/Makefile index 5982640..eaf3e54 100644 --- a/Makefile +++ b/Makefile @@ -8,13 +8,14 @@ VERSION := $(shell ./version-gen.sh dss version.c) 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) @@ -60,12 +61,15 @@ dss: $(objs) %.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,/^/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 @@ -75,7 +79,7 @@ mandir := $(DESTDIR)$(PREFIX)/share/man/man1 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 > $@