Skip to content

Commit

Permalink
Compress manpages on install (#524)
Browse files Browse the repository at this point in the history
  • Loading branch information
straight-shoota authored Oct 4, 2021
1 parent 02055f9 commit 281f340
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,16 @@ bin/shards: $(SOURCES) $(TEMPLATES) lib
@mkdir -p bin
$(EXPORTS) $(CRYSTAL) build $(FLAGS) src/shards.cr -o bin/shards

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

uninstall: phony
rm -f "$(BINDIR)/shards"
rm -f "$(MANDIR)/man1/shards.1"
rm -f "$(MANDIR)/man5/shard.yml.5"
rm -f "$(MANDIR)/man1/shards.1.gz"
rm -f "$(MANDIR)/man5/shard.yml.5.gz"

test: test_unit test_integration

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

man/%.gz: man/%
gzip -c -9 $< > $@

phony:

0 comments on commit 281f340

Please sign in to comment.