aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-12-21 20:10:12 -0500
committerBruce Hill <bruce@bruce-hill.com>2025-12-21 20:11:10 -0500
commit0ea6cdf216ca765039f3c01f5b32dc1103265b58 (patch)
tree3f7df97945daca7c2eff6791751117cdbba4e90e /Makefile
parent47b6a6c5d7cb667b84b758faa8fe7017b25d3443 (diff)
Fix slow manpage gzipping rules
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 2 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 5eba8e4e..7f247b49 100644
--- a/Makefile
+++ b/Makefile
@@ -131,11 +131,8 @@ BUILD_DIR=build/tomo@$(TOMO_VERSION)
headers := $(wildcard src/stdlib/*.h)
build_headers := $(patsubst src/stdlib/%.h, $(BUILD_DIR)/include/tomo@$(TOMO_VERSION)/%.h, $(headers))
-# find all man pages
-manpages := $(wildcard man/*/*)
-
# generate corresponding build paths with .gz
-build_manpages := $(foreach f,$(manpages),$(BUILD_DIR)/$(f).gz)
+build_manpages := $(patsubst %,$(BUILD_DIR)/%.gz,$(wildcard man/man*/*))
# Ensure directories exist
dirs := $(BUILD_DIR)/include/tomo@$(TOMO_VERSION) \
@@ -154,11 +151,7 @@ $(BUILD_DIR)/include/tomo@$(TOMO_VERSION)%.h: src/stdlib/%.h | $(BUILD_DIR)/incl
cp $< $@
# Rule for gzipping man pages
-$(BUILD_DIR)/man/man1/%.gz: man/man1/% | $(BUILD_DIR)/man/man1
- @$(ECHO) Gzipping manpage $<
- gzip -c $< > $@
-$(BUILD_DIR)/man/man3/%.gz: man/man3/% | $(BUILD_DIR)/man/man3
- @$(ECHO) Gzipping manpage $<
+$(BUILD_DIR)/man/%.gz: man/% | $(BUILD_DIR)/man/man1 $(BUILD_DIR)/man/man3
gzip -c $< > $@
$(BUILD_DIR)/bin/tomo: $(BUILD_DIR)/bin/tomo@$(TOMO_VERSION) | $(BUILD_DIR)/bin