mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 18:38:08 +01:00
emacs: add notmuch-version.el.tmpl and create notmuch-version.el from it
The notmuch cli program and emacs lisp versions may differ (especially in remote usage). It helps to resolve problems if we can determine the versions of notmuch cli and notmuch emacs mua separately. The build process now creates notmuch-version.el from template file by filling the version info to notmuch-emacs-version variable.
This commit is contained in:
parent
feb3ce9572
commit
cab1415a94
4 changed files with 37 additions and 2 deletions
1
emacs/.gitignore
vendored
1
emacs/.gitignore
vendored
|
@ -1,2 +1,3 @@
|
|||
.eldeps*
|
||||
*.elc
|
||||
notmuch-version.el
|
||||
|
|
|
@ -17,7 +17,14 @@ emacs_sources := \
|
|||
$(dir)/notmuch-crypto.el \
|
||||
$(dir)/notmuch-tag.el \
|
||||
$(dir)/coolj.el \
|
||||
$(dir)/notmuch-print.el
|
||||
$(dir)/notmuch-print.el \
|
||||
$(dir)/notmuch-version.el
|
||||
|
||||
$(dir)/notmuch-version.el: $(dir)/Makefile.local version.stamp
|
||||
$(dir)/notmuch-version.el: $(dir)/notmuch-version.el.tmpl
|
||||
@sed -e 's/%AG%/Generated file (from $(<F)) -- do not edit!/' \
|
||||
-e 's/%VERSION%/"$(VERSION)"/' $< > $@
|
||||
|
||||
|
||||
emacs_images := \
|
||||
$(srcdir)/$(dir)/notmuch-logo.png
|
||||
|
@ -71,4 +78,4 @@ endif
|
|||
mkdir -p "$(DESTDIR)$(emacsetcdir)"
|
||||
install -m0644 $(emacs_images) "$(DESTDIR)$(emacsetcdir)"
|
||||
|
||||
CLEAN := $(CLEAN) $(emacs_bytecode)
|
||||
CLEAN := $(CLEAN) $(emacs_bytecode) $(dir)/notmuch-version.el
|
||||
|
|
23
emacs/notmuch-version.el.tmpl
Normal file
23
emacs/notmuch-version.el.tmpl
Normal file
|
@ -0,0 +1,23 @@
|
|||
;; -*- emacs-lisp -*-
|
||||
;;
|
||||
;; %AG%
|
||||
;;
|
||||
;; This file is part of Notmuch.
|
||||
;;
|
||||
;; Notmuch is free software: you can redistribute it and/or modify it
|
||||
;; under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation, either version 3 of the License, or
|
||||
;; (at your option) any later version.
|
||||
;;
|
||||
;; Notmuch is distributed in the hope that it will be useful, but
|
||||
;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
;; General Public License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with Notmuch. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
(defconst notmuch-emacs-version %VERSION%
|
||||
"Version of Notmuch Emacs MUA.")
|
||||
|
||||
(provide 'notmuch-version)
|
|
@ -61,6 +61,10 @@
|
|||
(require 'notmuch-message)
|
||||
(require 'notmuch-parser)
|
||||
|
||||
(unless (require 'notmuch-version nil t)
|
||||
(defconst notmuch-emacs-version "unknown"
|
||||
"Placeholder variable when notmuch-version.el[c] is not available."))
|
||||
|
||||
(defcustom notmuch-search-result-format
|
||||
`(("date" . "%12s ")
|
||||
("count" . "%-7s ")
|
||||
|
|
Loading…
Reference in a new issue