From: Steven Rostedt <rostedt@goodmis.org>
To: linux-trace-devel@vger.kernel.org
Subject: [PATCH 1/2] libtracefs: Fix dependencies in Documentation Makefile
Date: Mon, 29 Mar 2021 20:30:27 -0400 [thread overview]
Message-ID: <20210330003047.886878895@goodmis.org> (raw)
In-Reply-To: 20210330003026.434340915@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 badd80e03b65..efe7b09d4e68 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -13,7 +13,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))
@@ -145,13 +145,18 @@ ifdef missing_tools
$(error "You need to install $(missing_tools) for man pages")
endif
-do-install-man: man
- $(Q)$(call do_install,$(OUTPUT)*.3,$(man3dir),644);
+install-%.3: $(OUTPUT)%.3
+ $(Q)$(call do_install,$<,$(man3dir),644);
-install-man: man do-install-man
+do-install-man: man $(addprefix install-,$(wildcard $(OUTPUT)*.3))
-do-install-html: html
- $(Q)$(call do_install,$(OUTPUT)*.html,$(htmldir),644);
+install-man: man
+ $(Q)$(MAKE) -C . do-install-man
+
+install-%.txt: $(OUTPUT)%.html
+ $(Q)$(call do_install,$<,$(htmldir),644);
+
+do-install-html: html $(addprefix install-,$(wildcard *.txt))
install-html: html do-install-html
@@ -172,7 +177,7 @@ endif
CLEAN_FILES = \
$(MAN_XML) $(addsuffix +,$(MAN_XML)) \
$(MAN_HTML) $(addsuffix +,$(MAN_HTML)) \
- $(DOC_MAN3) *.3
+ $(DOC_MAN3) *.3 *.m
clean:
$(Q) $(RM) $(CLEAN_FILES)
@@ -185,9 +190,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.30.1
next prev parent reply other threads:[~2021-03-30 0:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-30 0:30 [PATCH 0/2] libtracefs: Some clean ups Steven Rostedt
2021-03-30 0:30 ` Steven Rostedt [this message]
2021-03-30 0:30 ` [PATCH 2/2] libtracefs: Add .gitignore files 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=20210330003047.886878895@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).