aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 16 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..9acde80
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,16 @@
+UTILS := tgrecv tgsend tgserver
+
+doc: $(addprefix doc/man1/,$(addsuffix .1.bz2,${UTILS}))
+
+clean:
+ rm -rf doc/man1
+
+.PHONY: doc clean
+
+
+# https://www.gnu.org/software/make/manual/html_node/Secondary-Expansion.html
+.SECONDEXPANSION:
+%.1.bz2: $$(notdir $$*)
+ @mkdir -p $(dir $*)
+ doc/pod2man.pl $(notdir $*) $*.1
+ bzip2 -f $*.1