Skip to content

Commit

Permalink
Add version and vers_update make endpoints to replicate from endpoint…
Browse files Browse the repository at this point in the history
…s from AAP (#54)

* Add endpoint to write version to asciidoc and a2x

* Update Makefile to have same endpoint as AAP

* Add version make endpoint that corresponds with aap version
  • Loading branch information
MasterOdin authored and elextr committed Apr 20, 2019
1 parent e0f7427 commit 3aa6c26
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Makefile.in
Expand Up @@ -22,6 +22,8 @@ srcdir = @srcdir@

VPATH = @srcdir@

ASCIIDOCVERSION = @PACKAGE_VERSION@
ASCIIDOCDATE = @PACKAGE_DATE@
ASCIIDOCCONF = $(sysconfdir)/asciidoc

prog = asciidoc.py a2x.py
Expand Down Expand Up @@ -142,6 +144,19 @@ fixconfpath:
chmod +x $$f; \
done

.PHONY: version
version:
@echo "Version $(ASCIIDOCVERSION) (released $(ASCIIDOCDATE))";

.PHONY: vers_update
vers_update:
@for f in $(prog); do \
echo "Setting VERSION in $$f to $(ASCIIDOCVERSION)"; \
$(SED) "s#^VERSION = '.*'#VERSION = '$(ASCIIDOCVERSION)'#" $$f > $$f.out; \
mv $$f.out $$f; \
chmod +x $$f; \
done

build: fixconfpath $(manp)

install: all $(PROGTARGETS) $(DATATARGETS) progsymlink
Expand Down
2 changes: 2 additions & 0 deletions configure.ac
@@ -1,5 +1,7 @@
AC_INIT(asciidoc, 8.6.10)

AC_SUBST([PACKAGE_DATE], ['22 September 2017'])

AC_CONFIG_FILES(Makefile)

AC_PROG_SED
Expand Down

0 comments on commit 3aa6c26

Please sign in to comment.