diff options
author | Glenn Morris <rgm@gnu.org> | 2021-02-27 09:31:29 -0800 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2021-02-27 09:40:26 -0800 |
commit | 27da93862fff36d095fa3a3c7f98e95ccce922fb (patch) | |
tree | c65a3b20e7a47b0858f17e6684d7739d7d661d38 | |
parent | 082b431e62b5d1f835149874df95941268c8a763 (diff) | |
download | emacs-27da93862fff36d095fa3a3c7f98e95ccce922fb.tar.gz emacs-27da93862fff36d095fa3a3c7f98e95ccce922fb.tar.bz2 emacs-27da93862fff36d095fa3a3c7f98e95ccce922fb.zip |
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.
-rw-r--r-- | doc/misc/Makefile.in | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/doc/misc/Makefile.in b/doc/misc/Makefile.in index 7c11f8c0487..d0225db9ba3 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 |