From: Andre Noll Date: Sun, 12 May 2024 19:20:32 +0000 (+0200) Subject: Compress the man page. X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=1600ef2dee091d498f9888aafc95861af0ee9d0e;p=misma.git Compress the man page. Compressed man pages are generally preferred. We pass -n to make the build (more) reproducible, as this option instructs gzip(1) to not include the timestamp of the original file in the compressed file. We keep the uncompressed man page in build/ because it is needed to create the html version of the man page. --- diff --git a/.gitignore b/.gitignore index 7a9c605..ab34c4c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ misma -misma.8 +misma.8.gz build *.swp Makefile.local diff --git a/Makefile b/Makefile index 778b599..a7ab18f 100644 --- a/Makefile +++ b/Makefile @@ -20,8 +20,9 @@ MKDIR_P := mkdir -p 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 @@ -172,12 +173,14 @@ $(B)/%.lsg.c: $(B)/%.suite $(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) $< @@ -201,7 +204,7 @@ endif 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)