diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Documentation/GNUmakefile | 30 | ||||
-rw-r--r-- | GNUmakefile | 11 |
3 files changed, 22 insertions, 20 deletions
@@ -16,3 +16,4 @@ pkg/ /ChangeLog /.manifest /GIT-VERSION-FILE +/man diff --git a/Documentation/GNUmakefile b/Documentation/GNUmakefile index 6caa47f..82cc88d 100644 --- a/Documentation/GNUmakefile +++ b/Documentation/GNUmakefile @@ -4,31 +4,27 @@ PANDOC = pandoc PANDOC_OPTS = -s -f markdown --email-obfuscation=none --sanitize-html pandoc = $(PANDOC) $(PANDOC_OPTS) pandoc_html = $(pandoc) --toc -t html --no-wrap -gzip = gzip -man1 := unicorn unicorn_rails +man1 := $(addsuffix .1,unicorn unicorn_rails) +html1 := $(addsuffix .html,$(man1)) all:: html man -doc-gz: man-gz html-gz -html: $(addsuffix .1.html,$(man1)) -man: $(addsuffix .1,$(man1)) -html-gz: $(addsuffix .1.html.gz,$(man1)) -man-gz: $(addsuffix .1.gz,$(man1)) +html: $(html1) +man: $(man1) + +install-html: html + mkdir -p ../doc/man1 + install -m 644 $(html1) ../doc/man1 + +install-man: man + mkdir -p ../man/man1 + install -m 644 $(man1) ../man/man1 %.1: %.1.txt $(pandoc) -t man < $< > $@+ && mv $@+ $@ %.1.html: %.1.txt $(pandoc_html) -T $(basename $@) < $< > $@+ && mv $@+ $@ -%.1.gz: %.1 - $(gzip) < $< > $@+ && mv $@+ $@ - -%.1.html.gz: %.1.html - $(gzip) < $< > $@+ && mv $@+ $@ - clean:: - $(RM) $(addsuffix .1.html,$(man1)) - $(RM) $(addsuffix .1,$(man1)) - $(RM) $(addsuffix .1.html.gz,$(man1)) - $(RM) $(addsuffix .1.gz,$(man1)) + $(RM) $(man1) $(html1) diff --git a/GNUmakefile b/GNUmakefile index bfce815..52e3401 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -125,13 +125,18 @@ prep_setup_rb := @-$(RM) $(setup_rb_files);$(MAKE) -C $(ext) clean clean: -$(MAKE) -C $(ext) clean + -$(MAKE) -C Documentation clean $(RM) $(ext)/Makefile lib/unicorn_http.$(DLEXT) $(RM) $(setup_rb_files) $(t_log) - $(RM) -r $(test_prefix) + $(RM) -r $(test_prefix) man +man: + $(MAKE) -C Documentation install-man .manifest: GIT-VERSION-FILE NEWS ChangeLog $(ext)/unicorn_http.c + $(MAKE) man (git ls-files && \ - for i in $@ $^; do echo $$i; done) | LC_ALL=C sort > $@+ + for i in $@ $^ $(wildcard man/*/*.1); \ + do echo $$i; done) | LC_ALL=C sort > $@+ cmp $@+ $@ || mv $@+ $@ $(RM) $@+ @@ -216,4 +221,4 @@ release: package $(release_notes) $(release_changes) $(rfproject) $(rfpackage) $(VERSION) $(pkgtgz) endif -.PHONY: .FORCE-GIT-VERSION-FILE doc $(T) $(slow_tests) .manifest +.PHONY: .FORCE-GIT-VERSION-FILE doc $(T) $(slow_tests) .manifest man |