From 4ee3d2e94d4d593ab850c661dc3d7036b3cc2c98 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Wed, 7 Oct 2015 14:36:34 +0200 Subject: [PATCH] btrfs-progs: docs: add html build target We can easily build the documentation in html format: $ make html in the Documentation directory. Signed-off-by: David Sterba --- .gitignore | 1 + Documentation/Makefile.in | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 77506a0..a27cb0d 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ version.h version man/*.gz Documentation/*.gz +Documentation/*.html btrfs btrfs.static btrfs-debug-tree diff --git a/Documentation/Makefile.in b/Documentation/Makefile.in index b03eaf2..4711ad1 100644 --- a/Documentation/Makefile.in +++ b/Documentation/Makefile.in @@ -36,6 +36,7 @@ MAN5_TXT += btrfs-mount.asciidoc MAN_TXT = $(MAN8_TXT) $(MAN5_TXT) MAN_XML = $(patsubst %.asciidoc,%.xml,$(MAN_TXT)) +MAN_HTML = $(patsubst %.asciidoc,%.html,$(MAN_TXT)) DOC_MAN5 = $(patsubst %.asciidoc,%.5,$(MAN5_TXT)) GZ_MAN5 = $(patsubst %.asciidoc,%.5.gz,$(MAN5_TXT)) @@ -81,6 +82,7 @@ all: man man: man5 man8 man5: $(GZ_MAN5) man8: $(GZ_MAN8) +html: $(MAN_HTML) install: install-man @@ -100,7 +102,7 @@ uninstall: $(RMDIR) -p --ignore-fail-on-non-empty $(DESTDIR)$(man8dir) clean: - $(QUIET_RM)$(RM) -f *.xml *.xml+ *.5 *.5.gz *.8 *.8.gz + $(QUIET_RM)$(RM) -f *.xml *.xml+ *.5 *.5.gz *.8 *.8.gz *.html %.5.gz : %.5 $(QUIET_GZIP)$(GZIPCMD) -n -c $< > $@ @@ -122,3 +124,10 @@ clean: $(ASCIIDOC_EXTRA) -abtrfs_version=$(BTRFS_VERSION) \ -o $@+ $< && \ $(MV) $@+ $@ + +%.html : %.asciidoc asciidoc.conf + $(QUIET_ASCIIDOC)$(RM) -f $@+ $@ && \ + $(ASCIIDOC) -b html -d article -f asciidoc.conf \ + $(ASCIIDOC_EXTRA) -abtrfs_version=$(BTRFS_VERSION) \ + -o $@+ $< && \ + $(MV) $@+ $@ -- 2.7.4