Robert Richter | 761a0f3 | 2013-05-06 20:40:14 +0200 | [diff] [blame] | 1 | include ../../scripts/Makefile.include |
Arnaldo Carvalho de Melo | ca70c24 | 2016-03-18 13:57:20 -0300 | [diff] [blame] | 2 | include ../../scripts/utilities.mak |
Borislav Petkov | af3df2c | 2012-09-28 19:47:07 +0200 | [diff] [blame] | 3 | |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 4 | MAN1_TXT= \ |
| 5 | $(filter-out $(addsuffix .txt, $(ARTICLES) $(SP_ARTICLES)), \ |
| 6 | $(wildcard perf-*.txt)) \ |
| 7 | perf.txt |
| 8 | MAN5_TXT= |
| 9 | MAN7_TXT= |
| 10 | |
| 11 | MAN_TXT = $(MAN1_TXT) $(MAN5_TXT) $(MAN7_TXT) |
Franck Bui-Huu | 762b293 | 2012-02-06 16:17:23 +0100 | [diff] [blame] | 12 | _MAN_XML=$(patsubst %.txt,%.xml,$(MAN_TXT)) |
| 13 | _MAN_HTML=$(patsubst %.txt,%.html,$(MAN_TXT)) |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 14 | |
Franck Bui-Huu | 762b293 | 2012-02-06 16:17:23 +0100 | [diff] [blame] | 15 | MAN_XML=$(addprefix $(OUTPUT),$(_MAN_XML)) |
| 16 | MAN_HTML=$(addprefix $(OUTPUT),$(_MAN_HTML)) |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 17 | |
| 18 | ARTICLES = |
| 19 | # with their own formatting rules. |
| 20 | SP_ARTICLES = |
| 21 | API_DOCS = $(patsubst %.txt,%,$(filter-out technical/api-index-skel.txt technical/api-index.txt, $(wildcard technical/api-*.txt))) |
| 22 | SP_ARTICLES += $(API_DOCS) |
| 23 | SP_ARTICLES += technical/api-index |
| 24 | |
Franck Bui-Huu | 762b293 | 2012-02-06 16:17:23 +0100 | [diff] [blame] | 25 | _DOC_HTML = $(_MAN_HTML) |
| 26 | _DOC_HTML+=$(patsubst %,%.html,$(ARTICLES) $(SP_ARTICLES)) |
| 27 | DOC_HTML=$(addprefix $(OUTPUT),$(_DOC_HTML)) |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 28 | |
Franck Bui-Huu | 762b293 | 2012-02-06 16:17:23 +0100 | [diff] [blame] | 29 | _DOC_MAN1=$(patsubst %.txt,%.1,$(MAN1_TXT)) |
| 30 | _DOC_MAN5=$(patsubst %.txt,%.5,$(MAN5_TXT)) |
| 31 | _DOC_MAN7=$(patsubst %.txt,%.7,$(MAN7_TXT)) |
| 32 | |
| 33 | DOC_MAN1=$(addprefix $(OUTPUT),$(_DOC_MAN1)) |
| 34 | DOC_MAN5=$(addprefix $(OUTPUT),$(_DOC_MAN5)) |
| 35 | DOC_MAN7=$(addprefix $(OUTPUT),$(_DOC_MAN7)) |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 36 | |
John Kacur | 7ae5f213 | 2010-03-11 13:57:00 +0100 | [diff] [blame] | 37 | # Make the path relative to DESTDIR, not prefix |
| 38 | ifndef DESTDIR |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 39 | prefix?=$(HOME) |
John Kacur | 7ae5f213 | 2010-03-11 13:57:00 +0100 | [diff] [blame] | 40 | endif |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 41 | bindir?=$(prefix)/bin |
| 42 | htmldir?=$(prefix)/share/doc/perf-doc |
| 43 | pdfdir?=$(prefix)/share/doc/perf-doc |
| 44 | mandir?=$(prefix)/share/man |
| 45 | man1dir=$(mandir)/man1 |
| 46 | man5dir=$(mandir)/man5 |
| 47 | man7dir=$(mandir)/man7 |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 48 | |
| 49 | ASCIIDOC=asciidoc |
Kyle McMartin | b395cd8 | 2009-08-18 12:41:25 -0400 | [diff] [blame] | 50 | ASCIIDOC_EXTRA = --unsafe |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 51 | MANPAGE_XSL = manpage-normal.xsl |
| 52 | XMLTO_EXTRA = |
| 53 | INSTALL?=install |
| 54 | RM ?= rm -f |
| 55 | DOC_REF = origin/man |
| 56 | HTML_REF = origin/html |
| 57 | |
| 58 | infodir?=$(prefix)/share/info |
| 59 | MAKEINFO=makeinfo |
| 60 | INSTALL_INFO=install-info |
| 61 | DOCBOOK2X_TEXI=docbook2x-texi |
| 62 | DBLATEX=dblatex |
Borislav Petkov | af3df2c | 2012-09-28 19:47:07 +0200 | [diff] [blame] | 63 | XMLTO=xmlto |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 64 | ifndef PERL_PATH |
| 65 | PERL_PATH = /usr/bin/perl |
| 66 | endif |
| 67 | |
| 68 | -include ../config.mak.autogen |
| 69 | -include ../config.mak |
| 70 | |
Borislav Petkov | af3df2c | 2012-09-28 19:47:07 +0200 | [diff] [blame] | 71 | _tmp_tool_path := $(call get-executable,$(ASCIIDOC)) |
| 72 | ifeq ($(_tmp_tool_path),) |
| 73 | missing_tools = $(ASCIIDOC) |
| 74 | endif |
| 75 | |
| 76 | _tmp_tool_path := $(call get-executable,$(XMLTO)) |
| 77 | ifeq ($(_tmp_tool_path),) |
| 78 | missing_tools += $(XMLTO) |
| 79 | endif |
| 80 | |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 81 | # |
| 82 | # For asciidoc ... |
| 83 | # -7.1.2, no extra settings are needed. |
| 84 | # 8.0-, set ASCIIDOC8. |
| 85 | # |
| 86 | |
| 87 | # |
| 88 | # For docbook-xsl ... |
| 89 | # -1.68.1, set ASCIIDOC_NO_ROFF? (based on changelog from 1.73.0) |
| 90 | # 1.69.0, no extra settings are needed? |
| 91 | # 1.69.1-1.71.0, set DOCBOOK_SUPPRESS_SP? |
| 92 | # 1.71.1, no extra settings are needed? |
| 93 | # 1.72.0, set DOCBOOK_XSL_172. |
| 94 | # 1.73.0-, set ASCIIDOC_NO_ROFF |
| 95 | # |
| 96 | |
| 97 | # |
| 98 | # If you had been using DOCBOOK_XSL_172 in an attempt to get rid |
| 99 | # of 'the ".ft C" problem' in your generated manpages, and you |
| 100 | # instead ended up with weird characters around callouts, try |
| 101 | # using ASCIIDOC_NO_ROFF instead (it works fine with ASCIIDOC8). |
| 102 | # |
| 103 | |
| 104 | ifdef ASCIIDOC8 |
| 105 | ASCIIDOC_EXTRA += -a asciidoc7compatible |
| 106 | endif |
| 107 | ifdef DOCBOOK_XSL_172 |
| 108 | ASCIIDOC_EXTRA += -a perf-asciidoc-no-roff |
| 109 | MANPAGE_XSL = manpage-1.72.xsl |
| 110 | else |
| 111 | ifdef ASCIIDOC_NO_ROFF |
| 112 | # docbook-xsl after 1.72 needs the regular XSL, but will not |
| 113 | # pass-thru raw roff codes from asciidoc.conf, so turn them off. |
| 114 | ASCIIDOC_EXTRA += -a perf-asciidoc-no-roff |
| 115 | endif |
| 116 | endif |
| 117 | ifdef MAN_BOLD_LITERAL |
| 118 | XMLTO_EXTRA += -m manpage-bold-literal.xsl |
| 119 | endif |
| 120 | ifdef DOCBOOK_SUPPRESS_SP |
| 121 | XMLTO_EXTRA += -m manpage-suppress-sp.xsl |
| 122 | endif |
| 123 | |
| 124 | SHELL_PATH ?= $(SHELL) |
| 125 | # Shell quote; |
| 126 | SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH)) |
| 127 | |
| 128 | # |
| 129 | # Please note that there is a minor bug in asciidoc. |
| 130 | # The version after 6.0.3 _will_ include the patch found here: |
| 131 | # http://marc.theaimsgroup.com/?l=perf&m=111558757202243&w=2 |
| 132 | # |
| 133 | # Until that version is released you may have to apply the patch |
| 134 | # yourself - yes, all 6 characters of it! |
| 135 | # |
| 136 | |
| 137 | QUIET_SUBDIR0 = +$(MAKE) -C # space to separate -C and subdir |
| 138 | QUIET_SUBDIR1 = |
| 139 | |
| 140 | ifneq ($(findstring $(MAKEFLAGS),w),w) |
| 141 | PRINT_DIR = --no-print-directory |
| 142 | else # "make -w" |
| 143 | NO_SUBDIR = : |
| 144 | endif |
| 145 | |
| 146 | ifneq ($(findstring $(MAKEFLAGS),s),s) |
Robert Richter | 5125bc2 | 2013-05-03 15:49:53 +0200 | [diff] [blame] | 147 | ifneq ($(V),1) |
Ingo Molnar | 65fb099 | 2013-10-09 11:49:27 +0200 | [diff] [blame] | 148 | QUIET_ASCIIDOC = @echo ' ASCIIDOC '$@; |
| 149 | QUIET_XMLTO = @echo ' XMLTO '$@; |
| 150 | QUIET_DB2TEXI = @echo ' DB2TEXI '$@; |
| 151 | QUIET_MAKEINFO = @echo ' MAKEINFO '$@; |
| 152 | QUIET_DBLATEX = @echo ' DBLATEX '$@; |
| 153 | QUIET_XSLTPROC = @echo ' XSLTPROC '$@; |
| 154 | QUIET_GEN = @echo ' GEN '$@; |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 155 | QUIET_STDERR = 2> /dev/null |
| 156 | QUIET_SUBDIR0 = +@subdir= |
Ingo Molnar | 65fb099 | 2013-10-09 11:49:27 +0200 | [diff] [blame] | 157 | QUIET_SUBDIR1 = ;$(NO_SUBDIR) \ |
| 158 | echo ' SUBDIR ' $$subdir; \ |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 159 | $(MAKE) $(PRINT_DIR) -C $$subdir |
| 160 | export V |
| 161 | endif |
| 162 | endif |
| 163 | |
| 164 | all: html man |
| 165 | |
| 166 | html: $(DOC_HTML) |
| 167 | |
| 168 | $(DOC_HTML) $(DOC_MAN1) $(DOC_MAN5) $(DOC_MAN7): asciidoc.conf |
| 169 | |
| 170 | man: man1 man5 man7 |
| 171 | man1: $(DOC_MAN1) |
| 172 | man5: $(DOC_MAN5) |
| 173 | man7: $(DOC_MAN7) |
| 174 | |
Franck Bui-Huu | 762b293 | 2012-02-06 16:17:23 +0100 | [diff] [blame] | 175 | info: $(OUTPUT)perf.info $(OUTPUT)perfman.info |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 176 | |
Franck Bui-Huu | 762b293 | 2012-02-06 16:17:23 +0100 | [diff] [blame] | 177 | pdf: $(OUTPUT)user-manual.pdf |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 178 | |
| 179 | install: install-man |
| 180 | |
Borislav Petkov | af3df2c | 2012-09-28 19:47:07 +0200 | [diff] [blame] | 181 | check-man-tools: |
| 182 | ifdef missing_tools |
| 183 | $(error "You need to install $(missing_tools) for man pages") |
| 184 | endif |
| 185 | |
| 186 | do-install-man: man |
Ingo Molnar | 8a5411e9 | 2013-10-09 11:49:29 +0200 | [diff] [blame] | 187 | $(call QUIET_INSTALL, Documentation-man) \ |
| 188 | $(INSTALL) -d -m 755 $(DESTDIR)$(man1dir); \ |
| 189 | # $(INSTALL) -d -m 755 $(DESTDIR)$(man5dir); \ |
| 190 | # $(INSTALL) -d -m 755 $(DESTDIR)$(man7dir); \ |
| 191 | $(INSTALL) -m 644 $(DOC_MAN1) $(DESTDIR)$(man1dir); \ |
| 192 | # $(INSTALL) -m 644 $(DOC_MAN5) $(DESTDIR)$(man5dir); \ |
| 193 | # $(INSTALL) -m 644 $(DOC_MAN7) $(DESTDIR)$(man7dir) |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 194 | |
Borislav Petkov | af3df2c | 2012-09-28 19:47:07 +0200 | [diff] [blame] | 195 | install-man: check-man-tools man |
| 196 | |
Borislav Petkov | af3df2c | 2012-09-28 19:47:07 +0200 | [diff] [blame] | 197 | ifdef missing_tools |
Ingo Molnar | 31f6be6 | 2013-10-02 06:51:27 +0200 | [diff] [blame] | 198 | DO_INSTALL_MAN = $(warning Please install $(missing_tools) to have the man pages installed) |
Borislav Petkov | af3df2c | 2012-09-28 19:47:07 +0200 | [diff] [blame] | 199 | else |
Ingo Molnar | 31f6be6 | 2013-10-02 06:51:27 +0200 | [diff] [blame] | 200 | DO_INSTALL_MAN = do-install-man |
Borislav Petkov | af3df2c | 2012-09-28 19:47:07 +0200 | [diff] [blame] | 201 | endif |
| 202 | |
Ingo Molnar | 31f6be6 | 2013-10-02 06:51:27 +0200 | [diff] [blame] | 203 | try-install-man: $(DO_INSTALL_MAN) |
| 204 | |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 205 | install-info: info |
Ingo Molnar | 8a5411e9 | 2013-10-09 11:49:29 +0200 | [diff] [blame] | 206 | $(call QUIET_INSTALL, Documentation-info) \ |
| 207 | $(INSTALL) -d -m 755 $(DESTDIR)$(infodir); \ |
| 208 | $(INSTALL) -m 644 $(OUTPUT)perf.info $(OUTPUT)perfman.info $(DESTDIR)$(infodir); \ |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 209 | if test -r $(DESTDIR)$(infodir)/dir; then \ |
Ingo Molnar | 8a5411e9 | 2013-10-09 11:49:29 +0200 | [diff] [blame] | 210 | $(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) perf.info ;\ |
| 211 | $(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) perfman.info ;\ |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 212 | else \ |
| 213 | echo "No directory found in $(DESTDIR)$(infodir)" >&2 ; \ |
| 214 | fi |
| 215 | |
| 216 | install-pdf: pdf |
Ingo Molnar | 8a5411e9 | 2013-10-09 11:49:29 +0200 | [diff] [blame] | 217 | $(call QUIET_INSTALL, Documentation-pdf) \ |
| 218 | $(INSTALL) -d -m 755 $(DESTDIR)$(pdfdir); \ |
| 219 | $(INSTALL) -m 644 $(OUTPUT)user-manual.pdf $(DESTDIR)$(pdfdir) |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 220 | |
Jesse Brandeburg | 4187e26 | 2011-02-09 17:11:00 -0800 | [diff] [blame] | 221 | #install-html: html |
| 222 | # '$(SHELL_PATH_SQ)' ./install-webdoc.sh $(DESTDIR)$(htmldir) |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 223 | |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 224 | |
| 225 | # |
| 226 | # Determine "include::" file references in asciidoc files. |
| 227 | # |
Franck Bui-Huu | 762b293 | 2012-02-06 16:17:23 +0100 | [diff] [blame] | 228 | $(OUTPUT)doc.dep : $(wildcard *.txt) build-docdep.perl |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 229 | $(QUIET_GEN)$(RM) $@+ $@ && \ |
| 230 | $(PERL_PATH) ./build-docdep.perl >$@+ $(QUIET_STDERR) && \ |
| 231 | mv $@+ $@ |
| 232 | |
Franck Bui-Huu | 762b293 | 2012-02-06 16:17:23 +0100 | [diff] [blame] | 233 | -include $(OUPTUT)doc.dep |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 234 | |
Franck Bui-Huu | 762b293 | 2012-02-06 16:17:23 +0100 | [diff] [blame] | 235 | _cmds_txt = cmds-ancillaryinterrogators.txt \ |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 236 | cmds-ancillarymanipulators.txt \ |
| 237 | cmds-mainporcelain.txt \ |
| 238 | cmds-plumbinginterrogators.txt \ |
| 239 | cmds-plumbingmanipulators.txt \ |
| 240 | cmds-synchingrepositories.txt \ |
| 241 | cmds-synchelpers.txt \ |
| 242 | cmds-purehelpers.txt \ |
| 243 | cmds-foreignscminterface.txt |
Franck Bui-Huu | 762b293 | 2012-02-06 16:17:23 +0100 | [diff] [blame] | 244 | cmds_txt=$(addprefix $(OUTPUT),$(_cmds_txt)) |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 245 | |
Franck Bui-Huu | 762b293 | 2012-02-06 16:17:23 +0100 | [diff] [blame] | 246 | $(cmds_txt): $(OUTPUT)cmd-list.made |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 247 | |
Franck Bui-Huu | 762b293 | 2012-02-06 16:17:23 +0100 | [diff] [blame] | 248 | $(OUTPUT)cmd-list.made: cmd-list.perl ../command-list.txt $(MAN1_TXT) |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 249 | $(QUIET_GEN)$(RM) $@ && \ |
| 250 | $(PERL_PATH) ./cmd-list.perl ../command-list.txt $(QUIET_STDERR) && \ |
| 251 | date >$@ |
| 252 | |
Ingo Molnar | 8ec19c0 | 2013-10-09 11:49:26 +0200 | [diff] [blame] | 253 | CLEAN_FILES = \ |
| 254 | $(MAN_XML) $(addsuffix +,$(MAN_XML)) \ |
| 255 | $(MAN_HTML) $(addsuffix +,$(MAN_HTML)) \ |
| 256 | $(DOC_HTML) $(DOC_MAN1) $(DOC_MAN5) $(DOC_MAN7) \ |
| 257 | $(OUTPUT)*.texi $(OUTPUT)*.texi+ $(OUTPUT)*.texi++ \ |
| 258 | $(OUTPUT)perf.info $(OUTPUT)perfman.info \ |
| 259 | $(OUTPUT)howto-index.txt $(OUTPUT)howto/*.html $(OUTPUT)doc.dep \ |
| 260 | $(OUTPUT)technical/api-*.html $(OUTPUT)technical/api-index.txt \ |
| 261 | $(cmds_txt) $(OUTPUT)*.made |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 262 | clean: |
Ingo Molnar | 8ec19c0 | 2013-10-09 11:49:26 +0200 | [diff] [blame] | 263 | $(call QUIET_CLEAN, Documentation) $(RM) $(CLEAN_FILES) |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 264 | |
Franck Bui-Huu | 762b293 | 2012-02-06 16:17:23 +0100 | [diff] [blame] | 265 | $(MAN_HTML): $(OUTPUT)%.html : %.txt |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 266 | $(QUIET_ASCIIDOC)$(RM) $@+ $@ && \ |
| 267 | $(ASCIIDOC) -b xhtml11 -d manpage -f asciidoc.conf \ |
| 268 | $(ASCIIDOC_EXTRA) -aperf_version=$(PERF_VERSION) -o $@+ $< && \ |
| 269 | mv $@+ $@ |
| 270 | |
Franck Bui-Huu | 762b293 | 2012-02-06 16:17:23 +0100 | [diff] [blame] | 271 | $(OUTPUT)%.1 $(OUTPUT)%.5 $(OUTPUT)%.7 : $(OUTPUT)%.xml |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 272 | $(QUIET_XMLTO)$(RM) $@ && \ |
Robert Richter | 761a0f3 | 2013-05-06 20:40:14 +0200 | [diff] [blame] | 273 | $(XMLTO) -o $(OUTPUT). -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $< |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 274 | |
Franck Bui-Huu | 762b293 | 2012-02-06 16:17:23 +0100 | [diff] [blame] | 275 | $(OUTPUT)%.xml : %.txt |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 276 | $(QUIET_ASCIIDOC)$(RM) $@+ $@ && \ |
| 277 | $(ASCIIDOC) -b docbook -d manpage -f asciidoc.conf \ |
| 278 | $(ASCIIDOC_EXTRA) -aperf_version=$(PERF_VERSION) -o $@+ $< && \ |
| 279 | mv $@+ $@ |
| 280 | |
| 281 | XSLT = docbook.xsl |
| 282 | XSLTOPTS = --xinclude --stringparam html.stylesheet docbook-xsl.css |
| 283 | |
Franck Bui-Huu | 762b293 | 2012-02-06 16:17:23 +0100 | [diff] [blame] | 284 | $(OUTPUT)user-manual.html: $(OUTPUT)user-manual.xml |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 285 | $(QUIET_XSLTPROC)xsltproc $(XSLTOPTS) -o $@ $(XSLT) $< |
| 286 | |
Franck Bui-Huu | 762b293 | 2012-02-06 16:17:23 +0100 | [diff] [blame] | 287 | $(OUTPUT)perf.info: $(OUTPUT)user-manual.texi |
| 288 | $(QUIET_MAKEINFO)$(MAKEINFO) --no-split -o $@ $(OUTPUT)user-manual.texi |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 289 | |
Franck Bui-Huu | 762b293 | 2012-02-06 16:17:23 +0100 | [diff] [blame] | 290 | $(OUTPUT)user-manual.texi: $(OUTPUT)user-manual.xml |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 291 | $(QUIET_DB2TEXI)$(RM) $@+ $@ && \ |
Franck Bui-Huu | 762b293 | 2012-02-06 16:17:23 +0100 | [diff] [blame] | 292 | $(DOCBOOK2X_TEXI) $(OUTPUT)user-manual.xml --encoding=UTF-8 --to-stdout >$@++ && \ |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 293 | $(PERL_PATH) fix-texi.perl <$@++ >$@+ && \ |
| 294 | rm $@++ && \ |
| 295 | mv $@+ $@ |
| 296 | |
Franck Bui-Huu | 762b293 | 2012-02-06 16:17:23 +0100 | [diff] [blame] | 297 | $(OUTPUT)user-manual.pdf: $(OUTPUT)user-manual.xml |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 298 | $(QUIET_DBLATEX)$(RM) $@+ $@ && \ |
| 299 | $(DBLATEX) -o $@+ -p /etc/asciidoc/dblatex/asciidoc-dblatex.xsl -s /etc/asciidoc/dblatex/asciidoc-dblatex.sty $< && \ |
| 300 | mv $@+ $@ |
| 301 | |
Franck Bui-Huu | 762b293 | 2012-02-06 16:17:23 +0100 | [diff] [blame] | 302 | $(OUTPUT)perfman.texi: $(MAN_XML) cat-texi.perl |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 303 | $(QUIET_DB2TEXI)$(RM) $@+ $@ && \ |
| 304 | ($(foreach xml,$(MAN_XML),$(DOCBOOK2X_TEXI) --encoding=UTF-8 \ |
| 305 | --to-stdout $(xml) &&) true) > $@++ && \ |
| 306 | $(PERL_PATH) cat-texi.perl $@ <$@++ >$@+ && \ |
| 307 | rm $@++ && \ |
| 308 | mv $@+ $@ |
| 309 | |
Franck Bui-Huu | 762b293 | 2012-02-06 16:17:23 +0100 | [diff] [blame] | 310 | $(OUTPUT)perfman.info: $(OUTPUT)perfman.texi |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 311 | $(QUIET_MAKEINFO)$(MAKEINFO) --no-split --no-validate $*.texi |
| 312 | |
| 313 | $(patsubst %.txt,%.texi,$(MAN_TXT)): %.texi : %.xml |
| 314 | $(QUIET_DB2TEXI)$(RM) $@+ $@ && \ |
| 315 | $(DOCBOOK2X_TEXI) --to-stdout $*.xml >$@+ && \ |
| 316 | mv $@+ $@ |
| 317 | |
| 318 | howto-index.txt: howto-index.sh $(wildcard howto/*.txt) |
| 319 | $(QUIET_GEN)$(RM) $@+ $@ && \ |
| 320 | '$(SHELL_PATH_SQ)' ./howto-index.sh $(wildcard howto/*.txt) >$@+ && \ |
| 321 | mv $@+ $@ |
| 322 | |
| 323 | $(patsubst %,%.html,$(ARTICLES)) : %.html : %.txt |
| 324 | $(QUIET_ASCIIDOC)$(ASCIIDOC) -b xhtml11 $*.txt |
| 325 | |
| 326 | WEBDOC_DEST = /pub/software/tools/perf/docs |
| 327 | |
| 328 | $(patsubst %.txt,%.html,$(wildcard howto/*.txt)): %.html : %.txt |
| 329 | $(QUIET_ASCIIDOC)$(RM) $@+ $@ && \ |
| 330 | sed -e '1,/^$$/d' $< | $(ASCIIDOC) -b xhtml11 - >$@+ && \ |
| 331 | mv $@+ $@ |
| 332 | |
Jesse Brandeburg | 4187e26 | 2011-02-09 17:11:00 -0800 | [diff] [blame] | 333 | # UNIMPLEMENTED |
| 334 | #install-webdoc : html |
| 335 | # '$(SHELL_PATH_SQ)' ./install-webdoc.sh $(WEBDOC_DEST) |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 336 | |
Jesse Brandeburg | 4187e26 | 2011-02-09 17:11:00 -0800 | [diff] [blame] | 337 | # quick-install: quick-install-man |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 338 | |
Jesse Brandeburg | 4187e26 | 2011-02-09 17:11:00 -0800 | [diff] [blame] | 339 | # quick-install-man: |
| 340 | # '$(SHELL_PATH_SQ)' ./install-doc-quick.sh $(DOC_REF) $(DESTDIR)$(mandir) |
Ingo Molnar | c1c2365 | 2009-05-30 12:38:51 +0200 | [diff] [blame] | 341 | |
Jesse Brandeburg | 4187e26 | 2011-02-09 17:11:00 -0800 | [diff] [blame] | 342 | #quick-install-html: |
| 343 | # '$(SHELL_PATH_SQ)' ./install-doc-quick.sh $(HTML_REF) $(DESTDIR)$(htmldir) |