[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 27da938: Improve Makefile treatment of org sources in doc/misc
From: |
Glenn Morris |
Subject: |
master 27da938: Improve Makefile treatment of org sources in doc/misc |
Date: |
Sat, 27 Feb 2021 12:40:55 -0500 (EST) |
branch: master
commit 27da93862fff36d095fa3a3c7f98e95ccce922fb
Author: Glenn Morris <rgm@gnu.org>
Commit: Glenn Morris <rgm@gnu.org>
Improve Makefile treatment of org sources in doc/misc
* doc/misc/Makefile.in (ORG_SETUP): New variable.
(ORG_SRC): Use wildcard rather than hard-coding.
(org_template): Adjust for input containing $srcdir and suffix.
(org_setup_template): New template.
---
doc/misc/Makefile.in | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/doc/misc/Makefile.in b/doc/misc/Makefile.in
index 7c11f8c..d0225db 100644
--- a/doc/misc/Makefile.in
+++ b/doc/misc/Makefile.in
@@ -85,7 +85,8 @@ INFO_TARGETS = $(INFO_COMMON) efaq-w32
## Some manuals have their source in .org format.
## This is discouraged because the .texi files it generates
## are not as well formatted as handwritten ones.
-ORG_SRC = org modus-themes
+ORG_SETUP = $(wildcard ${srcdir}/*-setup.org)
+ORG_SRC = $(filter-out ${ORG_SETUP},$(wildcard ${srcdir}/*.org))
# There are some naming differences between the info targets and the other
# targets, so let's resolve them here.
@@ -235,7 +236,7 @@ emacs = "${EMACS}" -batch --no-site-file --no-site-lisp
# Work in srcdir (and use abs_top_builddir) so that +setupfile and
# things like org-setup's "version" macro work. Sigh.
define org_template
- $${srcdir}/$(1).texi: $${srcdir}/$(1).org
+ $(1:.org=.texi): $(1)
@rm -f $$@
$${AM_V_GEN}cd "$${srcdir}" && $${emacs} -l ox-texinfo \
-f org-texinfo-export-to-texinfo-batch $$< $$@
@@ -243,7 +244,12 @@ endef
$(foreach orgfile,${ORG_SRC},$(eval $(call org_template,$(orgfile))))
-${srcdir}/org.texi: ${srcdir}/org-setup.org
+## foo.org depends on foo-setup.org, if the latter exists.
+define org_setup_template
+ $(1:-setup.org=.texi): $(1)
+endef
+
+$(foreach orgfile,${ORG_SETUP},$(eval $(call org_setup_template,$(orgfile))))
.PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 27da938: Improve Makefile treatment of org sources in doc/misc,
Glenn Morris <=