summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2021-02-05 01:21:05 -0500
committerKyle Meyer <kyle@kyleam.com>2021-02-05 01:21:05 -0500
commit2512fd702fca4d17f6042f9bfa252a9367fb9f74 (patch)
treeffdf57dd98258fc11e613190db2b181e927d53df
parent369eb2739787b9b24399c803be31e4e793113dd1 (diff)
parent61336f80dc94a442842289d2f33f91190383e9b2 (diff)
downloadorg-mode-2512fd702fca4d17f6042f9bfa252a9367fb9f74.tar.gz
Merge branch 'maint'
-rw-r--r--mk/targets.mk10
1 files changed, 9 insertions, 1 deletions
diff --git a/mk/targets.mk b/mk/targets.mk
index 15cbdfa..fc5bed1 100644
--- a/mk/targets.mk
+++ b/mk/targets.mk
@@ -11,8 +11,16 @@ INSTSUB = $(SUBDIRS:%=install-%)
ORG_MAKE_DOC ?= info html pdf
ifneq ($(wildcard .git),)
- GITVERSION ?= $(shell git describe --match release\* --abbrev=6 HEAD)
ORGVERSION ?= $(subst release_,,$(shell git describe --match release\* --abbrev=0 HEAD))
+ ifeq ($(ORGVERSION),)
+ # In elpa.git, there are no tags available. Fall back to using
+ # the org.el header.
+ ORGVERSION := $(shell $(BATCH) --eval "(require 'lisp-mnt)" \
+ --visit lisp/org.el --eval '(princ (lm-header "version"))')
+ GITVERSION ?= $(ORGVERSION)-g$(shell git rev-parse --short=6 HEAD)
+ else
+ GITVERSION ?= $(shell git describe --match release\* --abbrev=6 HEAD)
+ endif
GITSTATUS ?= $(shell git status -uno --porcelain)
else
-include mk/version.mk