diff options
| author | Glenn Morris | 2021-02-27 09:31:29 -0800 |
|---|---|---|
| committer | Glenn Morris | 2021-02-27 09:40:26 -0800 |
| commit | 27da93862fff36d095fa3a3c7f98e95ccce922fb (patch) | |
| tree | c65a3b20e7a47b0858f17e6684d7739d7d661d38 /doc/misc | |
| parent | 082b431e62b5d1f835149874df95941268c8a763 (diff) | |
| download | emacs-27da93862fff36d095fa3a3c7f98e95ccce922fb.tar.gz 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.
Diffstat (limited to 'doc/misc')
| -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 | |||
| 85 | ## Some manuals have their source in .org format. | 85 | ## Some manuals have their source in .org format. |
| 86 | ## This is discouraged because the .texi files it generates | 86 | ## This is discouraged because the .texi files it generates |
| 87 | ## are not as well formatted as handwritten ones. | 87 | ## are not as well formatted as handwritten ones. |
| 88 | ORG_SRC = org modus-themes | 88 | ORG_SETUP = $(wildcard ${srcdir}/*-setup.org) |
| 89 | ORG_SRC = $(filter-out ${ORG_SETUP},$(wildcard ${srcdir}/*.org)) | ||
| 89 | 90 | ||
| 90 | # There are some naming differences between the info targets and the other | 91 | # There are some naming differences between the info targets and the other |
| 91 | # targets, so let's resolve them here. | 92 | # targets, so let's resolve them here. |
| @@ -235,7 +236,7 @@ emacs = "${EMACS}" -batch --no-site-file --no-site-lisp | |||
| 235 | # Work in srcdir (and use abs_top_builddir) so that +setupfile and | 236 | # Work in srcdir (and use abs_top_builddir) so that +setupfile and |
| 236 | # things like org-setup's "version" macro work. Sigh. | 237 | # things like org-setup's "version" macro work. Sigh. |
| 237 | define org_template | 238 | define org_template |
| 238 | $${srcdir}/$(1).texi: $${srcdir}/$(1).org | 239 | $(1:.org=.texi): $(1) |
| 239 | @rm -f $$@ | 240 | @rm -f $$@ |
| 240 | $${AM_V_GEN}cd "$${srcdir}" && $${emacs} -l ox-texinfo \ | 241 | $${AM_V_GEN}cd "$${srcdir}" && $${emacs} -l ox-texinfo \ |
| 241 | -f org-texinfo-export-to-texinfo-batch $$< $$@ | 242 | -f org-texinfo-export-to-texinfo-batch $$< $$@ |
| @@ -243,7 +244,12 @@ endef | |||
| 243 | 244 | ||
| 244 | $(foreach orgfile,${ORG_SRC},$(eval $(call org_template,$(orgfile)))) | 245 | $(foreach orgfile,${ORG_SRC},$(eval $(call org_template,$(orgfile)))) |
| 245 | 246 | ||
| 246 | ${srcdir}/org.texi: ${srcdir}/org-setup.org | 247 | ## foo.org depends on foo-setup.org, if the latter exists. |
| 248 | define org_setup_template | ||
| 249 | $(1:-setup.org=.texi): $(1) | ||
| 250 | endef | ||
| 251 | |||
| 252 | $(foreach orgfile,${ORG_SETUP},$(eval $(call org_setup_template,$(orgfile)))) | ||
| 247 | 253 | ||
| 248 | 254 | ||
| 249 | .PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean | 255 | .PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean |