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