summaryrefslogtreecommitdiff
path: root/macros/generic/memoize/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'macros/generic/memoize/Makefile')
-rw-r--r--macros/generic/memoize/Makefile56
1 files changed, 39 insertions, 17 deletions
diff --git a/macros/generic/memoize/Makefile b/macros/generic/memoize/Makefile
index 7edbd7ba34..2f79a3b8ce 100644
--- a/macros/generic/memoize/Makefile
+++ b/macros/generic/memoize/Makefile
@@ -9,15 +9,16 @@ all: ctan/memoize.zip
# Prepare the CTAN submission.
PACKAGE = memoize
-VERSION = 1.0.0
-YEAR = 2023
-MONTH = 10
-DAY = 10
+VERSION = 1.1.0
+YEAR = 2024
+MONTH = 01
+DAY = 02
FORMAT = generic
COMMON = memoize nomemoize memoizable
PLAIN = memoize-extract-one.tex
+GENERIC = memoizable.code.tex
SOURCE = memoize.edtx memoize.ins # $(makefiles)
SCRIPTS := memoize-extract memoize-clean
@@ -31,11 +32,9 @@ SCRIPTS := $(SCRIPTS:%=%.pl) $(SCRIPTS:%=%.py)
%.py.1: %.1
echo .so man1/$*.1 > $@ # link to .1 man page
-.PHONY: runtime
-runtime: $(RUNTIME)
-
README = doc/README.memoize.md
INSTALL = INSTALL.md
+CHANGELOG = CHANGELOG.md
MAKEFILE = Makefile
LICENCE = LICENCE
@@ -44,11 +43,11 @@ makefiles = Makefile.package Makefile.runtimes Makefile.advice Makefile.collargs
codedoc-source = memoize-code.tex \
memoize-code.sty memoize-doc-common.sty
-manual-source = memoize.tex \
+manual-source = memoize-doc.tex \
memoize-doc.sty memoize-doc-common.sty yadoc.sty \
- memoize.mst
+ memoize-doc.mst
-PDF = memoize.pdf memoize-code.pdf
+PDF = memoize-doc.pdf memoize-code.pdf
codedoc-source := $(codedoc-source:%=doc/%)
manual-source := $(manual-source:%=doc/%)
@@ -80,11 +79,19 @@ ctan/$(PACKAGE).zip:
ln -sr $(TDS-DOC-DIR)/examples.zip $(CTAN-DIR)/doc
$(CTAN-END)
+%.py.dtx: %.py
+ edtx2dtx -s -c '#' -B '^__version__' -E '^# Local Variables:' $< \
+ | sed -e '/^% Local Variables:/Q' > $@
+%.pl.dtx: %.pl
+ edtx2dtx -s -c '#' -B '^my \$$PROG' -E '^# Local Variables:' $< \
+ | sed -e '/^% Local Variables:/Q' > $@
-doc/memoize-code.pdf: $(SOURCE) $(codedoc-source)
+doc/memoize-code.pdf: $(SOURCE) $(codedoc-source) \
+ advice.edtx advice.ins collargs.edtx collargs.ins \
+ $(SCRIPTS:%=%.dtx)
-doc/memoize.pdf: $(manual-source) $(examples-src)
+doc/memoize.pdf: $(manual-source) $(examples-src) memoize.edtx advice.edtx collargs.edtx
%.pdf: %.tex
latexmk -cd -lualatex -bibtex- $< && touch $@
@@ -119,11 +126,9 @@ version:
$(call EDIT-VERSION-PYTHON,memoize-clean.py)
$(call EDIT-VERSION-MAN,doc/memoize-extract.1.md)
$(call EDIT-VERSION-MAN,doc/memoize-clean.1.md)
-# Change the date of the latest release (identified by the version).
- sed -Ei 's!^\\item\[\\githubrelease\{[0-9]{4}/[0-9]{2}/[0-9]{2}\}\{v$(VERSION)\}\] *$$!\\item\[\\githubrelease\{$(YEAR)/$(MONTH)/$(DAY)\}\{v$(VERSION)\}\]!' doc/memoize.tex
-
+ $(call EDIT-DATE-CHANGELOG,CHANGELOG.md)
define COLOR_VERSION
-grep -E --color '[0-9]{4}[/-][0-9]{2}[/-][0-9]{2}|v?[0-9]\.[0-9]\.[0-9]|(January|February|March|April|May|June|July|August|September|October|November|December) [0-9]+, [0-9]{4}'
+grep -E --color '[0-9]{4}[/-][0-9]{2}[/-][0-9]{2}|v?[0-9]\.[0-9]\.[0-9]([-a-z]*)|(January|February|March|April|May|June|July|August|September|October|November|December) [0-9]+, [0-9]{4}'
endef
versions-show:
@@ -131,9 +136,26 @@ versions-show:
@grep __version__ *.py | ${COLOR_VERSION}
@grep VERSION *.pl | ${COLOR_VERSION}
@grep -E '^(footer|date):' doc/memoize-*.md | ${COLOR_VERSION}
- @grep -E 'githubrelease' doc/memoize.tex | ${COLOR_VERSION}
+ @${COLOR_VERSION} CHANGELOG.md doc/CHANGELOG.advice.md doc/CHANGELOG.collargs.md
include Makefile.package
include Makefile.runtimes
VERSION-MAN = of Memoize v$(VERSION)
+
+.PHONY: all-runtimes link-all-runtimes unlink-all-runtimes test
+
+all-runtimes: runtimes
+ $(MAKE) -f Makefile.advice runtimes
+ $(MAKE) -f Makefile.collargs runtimes
+
+link-all-runtimes: link-runtimes
+ $(MAKE) -f Makefile.advice link-runtimes
+ $(MAKE) -f Makefile.collargs link-runtimes
+
+unlink-all-runtimes: unlink-runtimes
+ $(MAKE) -f Makefile.advice unlink-runtimes
+ $(MAKE) -f Makefile.collargs unlink-runtimes
+
+test:
+ cd testing && ./MakeTests.py