Skip to content

Commit 281f340

Browse files
Compress manpages on install (#524)
1 parent 02055f9 commit 281f340

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

Makefile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,16 @@ bin/shards: $(SOURCES) $(TEMPLATES) lib
3737
@mkdir -p bin
3838
$(EXPORTS) $(CRYSTAL) build $(FLAGS) src/shards.cr -o bin/shards
3939

40-
install: bin/shards manpages phony
40+
install: bin/shards man/shards.1.gz man/shard.yml.5.gz phony
4141
$(INSTALL) -m 0755 -d "$(BINDIR)" "$(MANDIR)/man1" "$(MANDIR)/man5"
4242
$(INSTALL) -m 0755 bin/shards "$(BINDIR)"
43-
$(INSTALL) -m 0644 man/shards.1 "$(MANDIR)/man1"
44-
$(INSTALL) -m 0644 man/shard.yml.5 "$(MANDIR)/man5"
43+
$(INSTALL) -m 0644 man/shards.1.gz "$(MANDIR)/man1"
44+
$(INSTALL) -m 0644 man/shard.yml.5.gz "$(MANDIR)/man5"
4545

4646
uninstall: phony
4747
rm -f "$(BINDIR)/shards"
48-
rm -f "$(MANDIR)/man1/shards.1"
49-
rm -f "$(MANDIR)/man5/shard.yml.5"
48+
rm -f "$(MANDIR)/man1/shards.1.gz"
49+
rm -f "$(MANDIR)/man5/shard.yml.5.gz"
5050

5151
test: test_unit test_integration
5252

@@ -63,4 +63,7 @@ lib: shard.lock
6363
shard.lock: shard.yml
6464
[ $(SHARDS) = false ] || $(SHARDS) update
6565

66+
man/%.gz: man/%
67+
gzip -c -9 $< > $@
68+
6669
phony:

0 commit comments

Comments
 (0)