From: Steven Rostedt <rostedt@goodmis.org>
To: <linux-trace-devel@vger.kernel.org>
Cc: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
Subject: [PATCH v2 2/5] libtraceevent: Fix dependencies in Documentation Makefile
Date: Thu, 8 Apr 2021 17:24:57 -0400 [thread overview]
Message-ID: <20210408212500.2058159-3-rostedt@goodmis.org> (raw)
In-Reply-To: <20210408212500.2058159-1-rostedt@goodmis.org>
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
Modify the Documentation Makefile to only rebuild the man pages when their
source has been modified.
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
Documentation/Makefile | 24 +++++++++++++++---------
1 file changed, 15 insertions(+), 9 deletions(-)
diff --git a/Documentation/Makefile b/Documentation/Makefile
index 21bcd5e..ede2930 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -11,7 +11,7 @@ MAN3_TXT= \
MAN_TXT = $(MAN3_TXT)
_MAN_XML=$(patsubst %.txt,%.xml,$(MAN_TXT))
_MAN_HTML=$(patsubst %.txt,%.html,$(MAN_TXT))
-_DOC_MAN3=$(patsubst %.txt,%.3,$(MAN3_TXT))
+_DOC_MAN3=$(patsubst %.txt,%.m,$(MAN3_TXT))
MAN_XML=$(addprefix $(OUTPUT),$(_MAN_XML))
MAN_HTML=$(addprefix $(OUTPUT),$(_MAN_HTML))
@@ -154,17 +154,22 @@ ifdef missing_tools
$(error "You need to install $(missing_tools) for man pages")
endif
-do-install-man: man
+install-%.3: $(OUTPUT)%.3
$(call QUIET_INSTALL, Documentation-man) \
$(INSTALL) -d -m 755 $(DESTDIR)$(man3dir); \
- $(INSTALL) -m 644 $(OUTPUT)*.3 $(DESTDIR)$(man3dir);
+ $(INSTALL) -m 644 $< $(DESTDIR)$(man3dir);
-install-man: check-man-tools man do-install-man
+do-install-man: man $(addprefix install-,$(wildcard $(OUTPUT)*.3))
-do-install-html: html
+install-man: check-man-tools man
+ $(Q)$(MAKE) -C . do-install-man
+
+install-%.txt: $(OUTPUT)%.html
$(call QUIET_INSTALL, Documentation-html) \
$(INSTALL) -d -m 755 $(DESTDIR)$(htmldir); \
- $(INSTALL) -m 644 $(OUTPUT)*.html $(DESTDIR)$(htmldir);
+ $(INSTALL) -m 644 $< $(DESTDIR)$(htmldir);
+
+do-install-html: html $(addprefix install-,$(wildcard *.txt))
install-html: check-man-tools html do-install-html
@@ -187,7 +192,7 @@ endif
CLEAN_FILES = \
$(MAN_XML) $(addsuffix +,$(MAN_XML)) \
$(MAN_HTML) $(addsuffix +,$(MAN_HTML)) \
- $(DOC_MAN3) *.3
+ $(DOC_MAN3) *.3 *.m
clean:
$(call QUIET_CLEAN, Documentation) $(RM) $(CLEAN_FILES)
@@ -200,9 +205,10 @@ $(OUTPUT)%.3 : $(OUTPUT)%.txt
mv $@+ $@
endif
-$(OUTPUT)%.3 : $(OUTPUT)%.xml
+$(OUTPUT)%.m : $(OUTPUT)%.xml
$(QUIET_XMLTO)$(RM) $@ && \
- $(XMLTO) -o $(OUTPUT). -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $<
+ $(XMLTO) -o $(OUTPUT). -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $<; \
+ touch $@
$(OUTPUT)%.xml : %.txt
$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
--
2.29.2
next prev parent reply other threads:[~2021-04-08 21:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-08 21:24 [PATCH v2 0/5] libtraceevent: Copy parsing functions from trace-cmd Steven Rostedt
2021-04-08 21:24 ` [PATCH v2 1/5] libtraceevent: Update gitignore Steven Rostedt
2021-04-08 21:24 ` Steven Rostedt [this message]
2021-04-08 21:24 ` [PATCH v2.5 3/5] libtraceevent: Add the API tep_parse_kallsyms() Steven Rostedt
2021-04-08 21:24 ` [PATCH v2 4/5] libtraceevent: Add the API tep_parse_saved_cmdlines() Steven Rostedt
2021-04-08 21:25 ` [PATCH v2 5/5] libtraceevent: Add the API tep_parse_printk_formats() Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210408212500.2058159-3-rostedt@goodmis.org \
--to=rostedt@goodmis.org \
--cc=linux-trace-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).