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:10:12 -0500
commit123e84696354be18bfd881b939d642b0a94f756f (patch)
tree18e72c2b5ea91a42bf68fabb7748d889a9c4fa49 /Makefile
parent9deadfa357eaf5313621fca54c633a190f4a788d (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