]> Sergey Matveev's repositories - public-inbox.git/blobdiff - Documentation/include.mk
txt2pre: allow overriding title via env
[public-inbox.git] / Documentation / include.mk
index 5d7302852b5d328457a244f9963ca59210879905..4583f9517a3dc7fd795e9a75c26b0b31d3f4590c 100644 (file)
@@ -52,13 +52,14 @@ all :: $(mantxt)
 Documentation/%.txt : Documentation/%.pod
        $(podtext) $< $@+ && mv $@+ $@
 
-txt2pre = ./Documentation/txt2pre <$< >$@+ && touch -r $< $@+ && mv $@+ $@
+txt2pre = $(PERL) -I lib ./Documentation/txt2pre <$< >$@+ && \
+       touch -r $< $@+ && mv $@+ $@
 txt := INSTALL README COPYING TODO
 dtxt := design_notes.txt design_www.txt dc-dlvr-spam-flow.txt
 dtxt := $(addprefix Documentation/, $(dtxt)) $(mantxt)
 
 %.html: %.txt
-       $(txt2pre)
+       TITLE="$(basename $(<F))" $(txt2pre)
 %.html: %
        $(txt2pre)