18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only 28c2ecf20Sopenharmony_ciinclude ../../scripts/Makefile.include 38c2ecf20Sopenharmony_ciinclude ../../scripts/utilities.mak 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ciMAN1_TXT= \ 68c2ecf20Sopenharmony_ci $(filter-out $(addsuffix .txt, $(ARTICLES) $(SP_ARTICLES)), \ 78c2ecf20Sopenharmony_ci $(wildcard perf-*.txt)) \ 88c2ecf20Sopenharmony_ci perf.txt 98c2ecf20Sopenharmony_ciMAN5_TXT= 108c2ecf20Sopenharmony_ciMAN7_TXT= 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ciMAN_TXT = $(MAN1_TXT) $(MAN5_TXT) $(MAN7_TXT) 138c2ecf20Sopenharmony_ci_MAN_XML=$(patsubst %.txt,%.xml,$(MAN_TXT)) 148c2ecf20Sopenharmony_ci_MAN_HTML=$(patsubst %.txt,%.html,$(MAN_TXT)) 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ciMAN_XML=$(addprefix $(OUTPUT),$(_MAN_XML)) 178c2ecf20Sopenharmony_ciMAN_HTML=$(addprefix $(OUTPUT),$(_MAN_HTML)) 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ciARTICLES = 208c2ecf20Sopenharmony_ci# with their own formatting rules. 218c2ecf20Sopenharmony_ciSP_ARTICLES = 228c2ecf20Sopenharmony_ciAPI_DOCS = $(patsubst %.txt,%,$(filter-out technical/api-index-skel.txt technical/api-index.txt, $(wildcard technical/api-*.txt))) 238c2ecf20Sopenharmony_ciSP_ARTICLES += $(API_DOCS) 248c2ecf20Sopenharmony_ciSP_ARTICLES += technical/api-index 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci_DOC_HTML = $(_MAN_HTML) 278c2ecf20Sopenharmony_ci_DOC_HTML+=$(patsubst %,%.html,$(ARTICLES) $(SP_ARTICLES)) 288c2ecf20Sopenharmony_ciDOC_HTML=$(addprefix $(OUTPUT),$(_DOC_HTML)) 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci_DOC_MAN1=$(patsubst %.txt,%.1,$(MAN1_TXT)) 318c2ecf20Sopenharmony_ci_DOC_MAN5=$(patsubst %.txt,%.5,$(MAN5_TXT)) 328c2ecf20Sopenharmony_ci_DOC_MAN7=$(patsubst %.txt,%.7,$(MAN7_TXT)) 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ciDOC_MAN1=$(addprefix $(OUTPUT),$(_DOC_MAN1)) 358c2ecf20Sopenharmony_ciDOC_MAN5=$(addprefix $(OUTPUT),$(_DOC_MAN5)) 368c2ecf20Sopenharmony_ciDOC_MAN7=$(addprefix $(OUTPUT),$(_DOC_MAN7)) 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ci# Make the path relative to DESTDIR, not prefix 398c2ecf20Sopenharmony_ciifndef DESTDIR 408c2ecf20Sopenharmony_ciprefix?=$(HOME) 418c2ecf20Sopenharmony_ciendif 428c2ecf20Sopenharmony_cibindir?=$(prefix)/bin 438c2ecf20Sopenharmony_cihtmldir?=$(prefix)/share/doc/perf-doc 448c2ecf20Sopenharmony_cipdfdir?=$(prefix)/share/doc/perf-doc 458c2ecf20Sopenharmony_cimandir?=$(prefix)/share/man 468c2ecf20Sopenharmony_ciman1dir=$(mandir)/man1 478c2ecf20Sopenharmony_ciman5dir=$(mandir)/man5 488c2ecf20Sopenharmony_ciman7dir=$(mandir)/man7 498c2ecf20Sopenharmony_ci 508c2ecf20Sopenharmony_ciASCIIDOC=asciidoc 518c2ecf20Sopenharmony_ciASCIIDOC_EXTRA += --unsafe -f asciidoc.conf 528c2ecf20Sopenharmony_ciASCIIDOC_HTML = xhtml11 538c2ecf20Sopenharmony_ciMANPAGE_XSL = manpage-normal.xsl 548c2ecf20Sopenharmony_ciXMLTO_EXTRA = 558c2ecf20Sopenharmony_ciINSTALL?=install 568c2ecf20Sopenharmony_ciRM ?= rm -f 578c2ecf20Sopenharmony_ciDOC_REF = origin/man 588c2ecf20Sopenharmony_ciHTML_REF = origin/html 598c2ecf20Sopenharmony_ci 608c2ecf20Sopenharmony_ciifdef USE_ASCIIDOCTOR 618c2ecf20Sopenharmony_ciASCIIDOC = asciidoctor 628c2ecf20Sopenharmony_ciASCIIDOC_EXTRA += -a compat-mode 638c2ecf20Sopenharmony_ciASCIIDOC_EXTRA += -I. -rasciidoctor-extensions 648c2ecf20Sopenharmony_ciASCIIDOC_EXTRA += -a mansource="perf" -a manmanual="perf Manual" 658c2ecf20Sopenharmony_ciASCIIDOC_HTML = xhtml5 668c2ecf20Sopenharmony_ciendif 678c2ecf20Sopenharmony_ci 688c2ecf20Sopenharmony_ciinfodir?=$(prefix)/share/info 698c2ecf20Sopenharmony_ciMAKEINFO=makeinfo 708c2ecf20Sopenharmony_ciINSTALL_INFO=install-info 718c2ecf20Sopenharmony_ciDOCBOOK2X_TEXI=docbook2x-texi 728c2ecf20Sopenharmony_ciDBLATEX=dblatex 738c2ecf20Sopenharmony_ciXMLTO=xmlto 748c2ecf20Sopenharmony_ciifndef PERL_PATH 758c2ecf20Sopenharmony_ci PERL_PATH = /usr/bin/perl 768c2ecf20Sopenharmony_ciendif 778c2ecf20Sopenharmony_ci 788c2ecf20Sopenharmony_ci-include ../config.mak.autogen 798c2ecf20Sopenharmony_ci-include ../config.mak 808c2ecf20Sopenharmony_ci 818c2ecf20Sopenharmony_ci_tmp_tool_path := $(call get-executable,$(ASCIIDOC)) 828c2ecf20Sopenharmony_ciifeq ($(_tmp_tool_path),) 838c2ecf20Sopenharmony_ci missing_tools = $(ASCIIDOC) 848c2ecf20Sopenharmony_ciendif 858c2ecf20Sopenharmony_ci 868c2ecf20Sopenharmony_ciifndef USE_ASCIIDOCTOR 878c2ecf20Sopenharmony_ci_tmp_tool_path := $(call get-executable,$(XMLTO)) 888c2ecf20Sopenharmony_ciifeq ($(_tmp_tool_path),) 898c2ecf20Sopenharmony_ci missing_tools += $(XMLTO) 908c2ecf20Sopenharmony_ciendif 918c2ecf20Sopenharmony_ciendif 928c2ecf20Sopenharmony_ci 938c2ecf20Sopenharmony_ci# 948c2ecf20Sopenharmony_ci# For asciidoc ... 958c2ecf20Sopenharmony_ci# -7.1.2, no extra settings are needed. 968c2ecf20Sopenharmony_ci# 8.0-, set ASCIIDOC8. 978c2ecf20Sopenharmony_ci# 988c2ecf20Sopenharmony_ci 998c2ecf20Sopenharmony_ci# 1008c2ecf20Sopenharmony_ci# For docbook-xsl ... 1018c2ecf20Sopenharmony_ci# -1.68.1, set ASCIIDOC_NO_ROFF? (based on changelog from 1.73.0) 1028c2ecf20Sopenharmony_ci# 1.69.0, no extra settings are needed? 1038c2ecf20Sopenharmony_ci# 1.69.1-1.71.0, set DOCBOOK_SUPPRESS_SP? 1048c2ecf20Sopenharmony_ci# 1.71.1, no extra settings are needed? 1058c2ecf20Sopenharmony_ci# 1.72.0, set DOCBOOK_XSL_172. 1068c2ecf20Sopenharmony_ci# 1.73.0-, set ASCIIDOC_NO_ROFF 1078c2ecf20Sopenharmony_ci# 1088c2ecf20Sopenharmony_ci 1098c2ecf20Sopenharmony_ci# 1108c2ecf20Sopenharmony_ci# If you had been using DOCBOOK_XSL_172 in an attempt to get rid 1118c2ecf20Sopenharmony_ci# of 'the ".ft C" problem' in your generated manpages, and you 1128c2ecf20Sopenharmony_ci# instead ended up with weird characters around callouts, try 1138c2ecf20Sopenharmony_ci# using ASCIIDOC_NO_ROFF instead (it works fine with ASCIIDOC8). 1148c2ecf20Sopenharmony_ci# 1158c2ecf20Sopenharmony_ci 1168c2ecf20Sopenharmony_ciifdef ASCIIDOC8 1178c2ecf20Sopenharmony_ciASCIIDOC_EXTRA += -a asciidoc7compatible 1188c2ecf20Sopenharmony_ciendif 1198c2ecf20Sopenharmony_ciifdef DOCBOOK_XSL_172 1208c2ecf20Sopenharmony_ciASCIIDOC_EXTRA += -a perf-asciidoc-no-roff 1218c2ecf20Sopenharmony_ciMANPAGE_XSL = manpage-1.72.xsl 1228c2ecf20Sopenharmony_cielse 1238c2ecf20Sopenharmony_ci ifdef ASCIIDOC_NO_ROFF 1248c2ecf20Sopenharmony_ci # docbook-xsl after 1.72 needs the regular XSL, but will not 1258c2ecf20Sopenharmony_ci # pass-thru raw roff codes from asciidoc.conf, so turn them off. 1268c2ecf20Sopenharmony_ci ASCIIDOC_EXTRA += -a perf-asciidoc-no-roff 1278c2ecf20Sopenharmony_ci endif 1288c2ecf20Sopenharmony_ciendif 1298c2ecf20Sopenharmony_ciifdef MAN_BOLD_LITERAL 1308c2ecf20Sopenharmony_ciXMLTO_EXTRA += -m manpage-bold-literal.xsl 1318c2ecf20Sopenharmony_ciendif 1328c2ecf20Sopenharmony_ciifdef DOCBOOK_SUPPRESS_SP 1338c2ecf20Sopenharmony_ciXMLTO_EXTRA += -m manpage-suppress-sp.xsl 1348c2ecf20Sopenharmony_ciendif 1358c2ecf20Sopenharmony_ci 1368c2ecf20Sopenharmony_ciSHELL_PATH ?= $(SHELL) 1378c2ecf20Sopenharmony_ci# Shell quote; 1388c2ecf20Sopenharmony_ciSHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH)) 1398c2ecf20Sopenharmony_ci 1408c2ecf20Sopenharmony_ci# 1418c2ecf20Sopenharmony_ci# Please note that there is a minor bug in asciidoc. 1428c2ecf20Sopenharmony_ci# The version after 6.0.3 _will_ include the patch found here: 1438c2ecf20Sopenharmony_ci# http://marc.theaimsgroup.com/?l=perf&m=111558757202243&w=2 1448c2ecf20Sopenharmony_ci# 1458c2ecf20Sopenharmony_ci# Until that version is released you may have to apply the patch 1468c2ecf20Sopenharmony_ci# yourself - yes, all 6 characters of it! 1478c2ecf20Sopenharmony_ci# 1488c2ecf20Sopenharmony_ci 1498c2ecf20Sopenharmony_ciQUIET_SUBDIR0 = +$(MAKE) -C # space to separate -C and subdir 1508c2ecf20Sopenharmony_ciQUIET_SUBDIR1 = 1518c2ecf20Sopenharmony_ci 1528c2ecf20Sopenharmony_ciifneq ($(findstring $(MAKEFLAGS),w),w) 1538c2ecf20Sopenharmony_ciPRINT_DIR = --no-print-directory 1548c2ecf20Sopenharmony_cielse # "make -w" 1558c2ecf20Sopenharmony_ciNO_SUBDIR = : 1568c2ecf20Sopenharmony_ciendif 1578c2ecf20Sopenharmony_ci 1588c2ecf20Sopenharmony_ciifneq ($(findstring $(MAKEFLAGS),s),s) 1598c2ecf20Sopenharmony_ciifneq ($(V),1) 1608c2ecf20Sopenharmony_ci QUIET_ASCIIDOC = @echo ' ASCIIDOC '$@; 1618c2ecf20Sopenharmony_ci QUIET_XMLTO = @echo ' XMLTO '$@; 1628c2ecf20Sopenharmony_ci QUIET_DB2TEXI = @echo ' DB2TEXI '$@; 1638c2ecf20Sopenharmony_ci QUIET_MAKEINFO = @echo ' MAKEINFO '$@; 1648c2ecf20Sopenharmony_ci QUIET_DBLATEX = @echo ' DBLATEX '$@; 1658c2ecf20Sopenharmony_ci QUIET_XSLTPROC = @echo ' XSLTPROC '$@; 1668c2ecf20Sopenharmony_ci QUIET_GEN = @echo ' GEN '$@; 1678c2ecf20Sopenharmony_ci QUIET_STDERR = 2> /dev/null 1688c2ecf20Sopenharmony_ci QUIET_SUBDIR0 = +@subdir= 1698c2ecf20Sopenharmony_ci QUIET_SUBDIR1 = ;$(NO_SUBDIR) \ 1708c2ecf20Sopenharmony_ci echo ' SUBDIR ' $$subdir; \ 1718c2ecf20Sopenharmony_ci $(MAKE) $(PRINT_DIR) -C $$subdir 1728c2ecf20Sopenharmony_ci export V 1738c2ecf20Sopenharmony_ciendif 1748c2ecf20Sopenharmony_ciendif 1758c2ecf20Sopenharmony_ci 1768c2ecf20Sopenharmony_ciall: html man 1778c2ecf20Sopenharmony_ci 1788c2ecf20Sopenharmony_cihtml: $(DOC_HTML) 1798c2ecf20Sopenharmony_ci 1808c2ecf20Sopenharmony_ci$(DOC_HTML) $(DOC_MAN1) $(DOC_MAN5) $(DOC_MAN7): asciidoc.conf 1818c2ecf20Sopenharmony_ci 1828c2ecf20Sopenharmony_ciman: man1 man5 man7 1838c2ecf20Sopenharmony_ciman1: $(DOC_MAN1) 1848c2ecf20Sopenharmony_ciman5: $(DOC_MAN5) 1858c2ecf20Sopenharmony_ciman7: $(DOC_MAN7) 1868c2ecf20Sopenharmony_ci 1878c2ecf20Sopenharmony_ciinfo: $(OUTPUT)perf.info $(OUTPUT)perfman.info 1888c2ecf20Sopenharmony_ci 1898c2ecf20Sopenharmony_cipdf: $(OUTPUT)user-manual.pdf 1908c2ecf20Sopenharmony_ci 1918c2ecf20Sopenharmony_ciinstall: install-man 1928c2ecf20Sopenharmony_ci 1938c2ecf20Sopenharmony_cicheck-man-tools: 1948c2ecf20Sopenharmony_ciifdef missing_tools 1958c2ecf20Sopenharmony_ci $(error "You need to install $(missing_tools) for man pages") 1968c2ecf20Sopenharmony_ciendif 1978c2ecf20Sopenharmony_ci 1988c2ecf20Sopenharmony_cido-install-man: man 1998c2ecf20Sopenharmony_ci $(call QUIET_INSTALL, Documentation-man) \ 2008c2ecf20Sopenharmony_ci $(INSTALL) -d -m 755 $(DESTDIR)$(man1dir); \ 2018c2ecf20Sopenharmony_ci# $(INSTALL) -d -m 755 $(DESTDIR)$(man5dir); \ 2028c2ecf20Sopenharmony_ci# $(INSTALL) -d -m 755 $(DESTDIR)$(man7dir); \ 2038c2ecf20Sopenharmony_ci $(INSTALL) -m 644 $(DOC_MAN1) $(DESTDIR)$(man1dir); \ 2048c2ecf20Sopenharmony_ci# $(INSTALL) -m 644 $(DOC_MAN5) $(DESTDIR)$(man5dir); \ 2058c2ecf20Sopenharmony_ci# $(INSTALL) -m 644 $(DOC_MAN7) $(DESTDIR)$(man7dir) 2068c2ecf20Sopenharmony_ci 2078c2ecf20Sopenharmony_ciinstall-man: check-man-tools man do-install-man 2088c2ecf20Sopenharmony_ci 2098c2ecf20Sopenharmony_ciifdef missing_tools 2108c2ecf20Sopenharmony_ci DO_INSTALL_MAN = $(warning Please install $(missing_tools) to have the man pages installed) 2118c2ecf20Sopenharmony_cielse 2128c2ecf20Sopenharmony_ci DO_INSTALL_MAN = do-install-man 2138c2ecf20Sopenharmony_ciendif 2148c2ecf20Sopenharmony_ci 2158c2ecf20Sopenharmony_citry-install-man: $(DO_INSTALL_MAN) 2168c2ecf20Sopenharmony_ci 2178c2ecf20Sopenharmony_ciinstall-info: info 2188c2ecf20Sopenharmony_ci $(call QUIET_INSTALL, Documentation-info) \ 2198c2ecf20Sopenharmony_ci $(INSTALL) -d -m 755 $(DESTDIR)$(infodir); \ 2208c2ecf20Sopenharmony_ci $(INSTALL) -m 644 $(OUTPUT)perf.info $(OUTPUT)perfman.info $(DESTDIR)$(infodir); \ 2218c2ecf20Sopenharmony_ci if test -r $(DESTDIR)$(infodir)/dir; then \ 2228c2ecf20Sopenharmony_ci $(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) perf.info ;\ 2238c2ecf20Sopenharmony_ci $(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) perfman.info ;\ 2248c2ecf20Sopenharmony_ci else \ 2258c2ecf20Sopenharmony_ci echo "No directory found in $(DESTDIR)$(infodir)" >&2 ; \ 2268c2ecf20Sopenharmony_ci fi 2278c2ecf20Sopenharmony_ci 2288c2ecf20Sopenharmony_ciinstall-pdf: pdf 2298c2ecf20Sopenharmony_ci $(call QUIET_INSTALL, Documentation-pdf) \ 2308c2ecf20Sopenharmony_ci $(INSTALL) -d -m 755 $(DESTDIR)$(pdfdir); \ 2318c2ecf20Sopenharmony_ci $(INSTALL) -m 644 $(OUTPUT)user-manual.pdf $(DESTDIR)$(pdfdir) 2328c2ecf20Sopenharmony_ci 2338c2ecf20Sopenharmony_ci#install-html: html 2348c2ecf20Sopenharmony_ci# '$(SHELL_PATH_SQ)' ./install-webdoc.sh $(DESTDIR)$(htmldir) 2358c2ecf20Sopenharmony_ci 2368c2ecf20Sopenharmony_ci 2378c2ecf20Sopenharmony_ci# 2388c2ecf20Sopenharmony_ci# Determine "include::" file references in asciidoc files. 2398c2ecf20Sopenharmony_ci# 2408c2ecf20Sopenharmony_ci$(OUTPUT)doc.dep : $(wildcard *.txt) build-docdep.perl 2418c2ecf20Sopenharmony_ci $(QUIET_GEN)$(RM) $@+ $@ && \ 2428c2ecf20Sopenharmony_ci $(PERL_PATH) ./build-docdep.perl >$@+ $(QUIET_STDERR) && \ 2438c2ecf20Sopenharmony_ci mv $@+ $@ 2448c2ecf20Sopenharmony_ci 2458c2ecf20Sopenharmony_ci-include $(OUTPUT)doc.dep 2468c2ecf20Sopenharmony_ci 2478c2ecf20Sopenharmony_ci_cmds_txt = cmds-ancillaryinterrogators.txt \ 2488c2ecf20Sopenharmony_ci cmds-ancillarymanipulators.txt \ 2498c2ecf20Sopenharmony_ci cmds-mainporcelain.txt \ 2508c2ecf20Sopenharmony_ci cmds-plumbinginterrogators.txt \ 2518c2ecf20Sopenharmony_ci cmds-plumbingmanipulators.txt \ 2528c2ecf20Sopenharmony_ci cmds-synchingrepositories.txt \ 2538c2ecf20Sopenharmony_ci cmds-synchelpers.txt \ 2548c2ecf20Sopenharmony_ci cmds-purehelpers.txt \ 2558c2ecf20Sopenharmony_ci cmds-foreignscminterface.txt 2568c2ecf20Sopenharmony_cicmds_txt=$(addprefix $(OUTPUT),$(_cmds_txt)) 2578c2ecf20Sopenharmony_ci 2588c2ecf20Sopenharmony_ci$(cmds_txt): $(OUTPUT)cmd-list.made 2598c2ecf20Sopenharmony_ci 2608c2ecf20Sopenharmony_ci$(OUTPUT)cmd-list.made: cmd-list.perl ../command-list.txt $(MAN1_TXT) 2618c2ecf20Sopenharmony_ci $(QUIET_GEN)$(RM) $@ && \ 2628c2ecf20Sopenharmony_ci $(PERL_PATH) ./cmd-list.perl ../command-list.txt $(QUIET_STDERR) && \ 2638c2ecf20Sopenharmony_ci date >$@ 2648c2ecf20Sopenharmony_ci 2658c2ecf20Sopenharmony_ciCLEAN_FILES = \ 2668c2ecf20Sopenharmony_ci $(MAN_XML) $(addsuffix +,$(MAN_XML)) \ 2678c2ecf20Sopenharmony_ci $(MAN_HTML) $(addsuffix +,$(MAN_HTML)) \ 2688c2ecf20Sopenharmony_ci $(DOC_HTML) $(DOC_MAN1) $(DOC_MAN5) $(DOC_MAN7) \ 2698c2ecf20Sopenharmony_ci $(OUTPUT)*.texi $(OUTPUT)*.texi+ $(OUTPUT)*.texi++ \ 2708c2ecf20Sopenharmony_ci $(OUTPUT)perf.info $(OUTPUT)perfman.info \ 2718c2ecf20Sopenharmony_ci $(OUTPUT)howto-index.txt $(OUTPUT)howto/*.html $(OUTPUT)doc.dep \ 2728c2ecf20Sopenharmony_ci $(OUTPUT)technical/api-*.html $(OUTPUT)technical/api-index.txt \ 2738c2ecf20Sopenharmony_ci $(cmds_txt) $(OUTPUT)*.made 2748c2ecf20Sopenharmony_ciclean: 2758c2ecf20Sopenharmony_ci $(call QUIET_CLEAN, Documentation) $(RM) $(CLEAN_FILES) 2768c2ecf20Sopenharmony_ci 2778c2ecf20Sopenharmony_ci$(MAN_HTML): $(OUTPUT)%.html : %.txt 2788c2ecf20Sopenharmony_ci $(QUIET_ASCIIDOC)$(RM) $@+ $@ && \ 2798c2ecf20Sopenharmony_ci $(ASCIIDOC) -b $(ASCIIDOC_HTML) -d manpage \ 2808c2ecf20Sopenharmony_ci $(ASCIIDOC_EXTRA) -aperf_version=$(PERF_VERSION) -o $@+ $< && \ 2818c2ecf20Sopenharmony_ci mv $@+ $@ 2828c2ecf20Sopenharmony_ci 2838c2ecf20Sopenharmony_ciifdef USE_ASCIIDOCTOR 2848c2ecf20Sopenharmony_ci$(OUTPUT)%.1 $(OUTPUT)%.5 $(OUTPUT)%.7 : %.txt 2858c2ecf20Sopenharmony_ci $(QUIET_ASCIIDOC)$(RM) $@+ $@ && \ 2868c2ecf20Sopenharmony_ci $(ASCIIDOC) -b manpage -d manpage \ 2878c2ecf20Sopenharmony_ci $(ASCIIDOC_EXTRA) -aperf_version=$(PERF_VERSION) -o $@+ $< && \ 2888c2ecf20Sopenharmony_ci mv $@+ $@ 2898c2ecf20Sopenharmony_ciendif 2908c2ecf20Sopenharmony_ci 2918c2ecf20Sopenharmony_ci$(OUTPUT)%.1 $(OUTPUT)%.5 $(OUTPUT)%.7 : $(OUTPUT)%.xml 2928c2ecf20Sopenharmony_ci $(QUIET_XMLTO)$(RM) $@ && \ 2938c2ecf20Sopenharmony_ci $(XMLTO) -o $(OUTPUT). -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $< 2948c2ecf20Sopenharmony_ci 2958c2ecf20Sopenharmony_ci$(OUTPUT)%.xml : %.txt 2968c2ecf20Sopenharmony_ci $(QUIET_ASCIIDOC)$(RM) $@+ $@ && \ 2978c2ecf20Sopenharmony_ci $(ASCIIDOC) -b docbook -d manpage \ 2988c2ecf20Sopenharmony_ci $(ASCIIDOC_EXTRA) -aperf_version=$(PERF_VERSION) \ 2998c2ecf20Sopenharmony_ci -aperf_date=$(shell git log -1 --pretty="format:%cd" \ 3008c2ecf20Sopenharmony_ci --date=short $<) \ 3018c2ecf20Sopenharmony_ci -o $@+ $< && \ 3028c2ecf20Sopenharmony_ci mv $@+ $@ 3038c2ecf20Sopenharmony_ci 3048c2ecf20Sopenharmony_ciXSLT = docbook.xsl 3058c2ecf20Sopenharmony_ciXSLTOPTS = --xinclude --stringparam html.stylesheet docbook-xsl.css 3068c2ecf20Sopenharmony_ci 3078c2ecf20Sopenharmony_ci$(OUTPUT)user-manual.html: $(OUTPUT)user-manual.xml 3088c2ecf20Sopenharmony_ci $(QUIET_XSLTPROC)xsltproc $(XSLTOPTS) -o $@ $(XSLT) $< 3098c2ecf20Sopenharmony_ci 3108c2ecf20Sopenharmony_ci$(OUTPUT)perf.info: $(OUTPUT)user-manual.texi 3118c2ecf20Sopenharmony_ci $(QUIET_MAKEINFO)$(MAKEINFO) --no-split -o $@ $(OUTPUT)user-manual.texi 3128c2ecf20Sopenharmony_ci 3138c2ecf20Sopenharmony_ci$(OUTPUT)user-manual.texi: $(OUTPUT)user-manual.xml 3148c2ecf20Sopenharmony_ci $(QUIET_DB2TEXI)$(RM) $@+ $@ && \ 3158c2ecf20Sopenharmony_ci $(DOCBOOK2X_TEXI) $(OUTPUT)user-manual.xml --encoding=UTF-8 --to-stdout >$@++ && \ 3168c2ecf20Sopenharmony_ci $(PERL_PATH) fix-texi.perl <$@++ >$@+ && \ 3178c2ecf20Sopenharmony_ci rm $@++ && \ 3188c2ecf20Sopenharmony_ci mv $@+ $@ 3198c2ecf20Sopenharmony_ci 3208c2ecf20Sopenharmony_ci$(OUTPUT)user-manual.pdf: $(OUTPUT)user-manual.xml 3218c2ecf20Sopenharmony_ci $(QUIET_DBLATEX)$(RM) $@+ $@ && \ 3228c2ecf20Sopenharmony_ci $(DBLATEX) -o $@+ -p /etc/asciidoc/dblatex/asciidoc-dblatex.xsl -s /etc/asciidoc/dblatex/asciidoc-dblatex.sty $< && \ 3238c2ecf20Sopenharmony_ci mv $@+ $@ 3248c2ecf20Sopenharmony_ci 3258c2ecf20Sopenharmony_ci$(OUTPUT)perfman.texi: $(MAN_XML) cat-texi.perl 3268c2ecf20Sopenharmony_ci $(QUIET_DB2TEXI)$(RM) $@+ $@ && \ 3278c2ecf20Sopenharmony_ci ($(foreach xml,$(MAN_XML),$(DOCBOOK2X_TEXI) --encoding=UTF-8 \ 3288c2ecf20Sopenharmony_ci --to-stdout $(xml) &&) true) > $@++ && \ 3298c2ecf20Sopenharmony_ci $(PERL_PATH) cat-texi.perl $@ <$@++ >$@+ && \ 3308c2ecf20Sopenharmony_ci rm $@++ && \ 3318c2ecf20Sopenharmony_ci mv $@+ $@ 3328c2ecf20Sopenharmony_ci 3338c2ecf20Sopenharmony_ci$(OUTPUT)perfman.info: $(OUTPUT)perfman.texi 3348c2ecf20Sopenharmony_ci $(QUIET_MAKEINFO)$(MAKEINFO) --no-split --no-validate $*.texi 3358c2ecf20Sopenharmony_ci 3368c2ecf20Sopenharmony_ci$(patsubst %.txt,%.texi,$(MAN_TXT)): %.texi : %.xml 3378c2ecf20Sopenharmony_ci $(QUIET_DB2TEXI)$(RM) $@+ $@ && \ 3388c2ecf20Sopenharmony_ci $(DOCBOOK2X_TEXI) --to-stdout $*.xml >$@+ && \ 3398c2ecf20Sopenharmony_ci mv $@+ $@ 3408c2ecf20Sopenharmony_ci 3418c2ecf20Sopenharmony_cihowto-index.txt: howto-index.sh $(wildcard howto/*.txt) 3428c2ecf20Sopenharmony_ci $(QUIET_GEN)$(RM) $@+ $@ && \ 3438c2ecf20Sopenharmony_ci '$(SHELL_PATH_SQ)' ./howto-index.sh $(wildcard howto/*.txt) >$@+ && \ 3448c2ecf20Sopenharmony_ci mv $@+ $@ 3458c2ecf20Sopenharmony_ci 3468c2ecf20Sopenharmony_ci$(patsubst %,%.html,$(ARTICLES)) : %.html : %.txt 3478c2ecf20Sopenharmony_ci $(QUIET_ASCIIDOC)$(ASCIIDOC) -b $(ASCIIDOC_HTML) $*.txt 3488c2ecf20Sopenharmony_ci 3498c2ecf20Sopenharmony_ciWEBDOC_DEST = /pub/software/tools/perf/docs 3508c2ecf20Sopenharmony_ci 3518c2ecf20Sopenharmony_ci$(patsubst %.txt,%.html,$(wildcard howto/*.txt)): %.html : %.txt 3528c2ecf20Sopenharmony_ci $(QUIET_ASCIIDOC)$(RM) $@+ $@ && \ 3538c2ecf20Sopenharmony_ci sed -e '1,/^$$/d' $< | $(ASCIIDOC) -b $(ASCIIDOC_HTML) - >$@+ && \ 3548c2ecf20Sopenharmony_ci mv $@+ $@ 3558c2ecf20Sopenharmony_ci 3568c2ecf20Sopenharmony_ci# UNIMPLEMENTED 3578c2ecf20Sopenharmony_ci#install-webdoc : html 3588c2ecf20Sopenharmony_ci# '$(SHELL_PATH_SQ)' ./install-webdoc.sh $(WEBDOC_DEST) 3598c2ecf20Sopenharmony_ci 3608c2ecf20Sopenharmony_ci# quick-install: quick-install-man 3618c2ecf20Sopenharmony_ci 3628c2ecf20Sopenharmony_ci# quick-install-man: 3638c2ecf20Sopenharmony_ci# '$(SHELL_PATH_SQ)' ./install-doc-quick.sh $(DOC_REF) $(DESTDIR)$(mandir) 3648c2ecf20Sopenharmony_ci 3658c2ecf20Sopenharmony_ci#quick-install-html: 3668c2ecf20Sopenharmony_ci# '$(SHELL_PATH_SQ)' ./install-doc-quick.sh $(HTML_REF) $(DESTDIR)$(htmldir) 367