From: Oleksandr Gavenko <gavenkoa@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Look for practice to include (pkg-version) in Emacs package.
Date: Tue, 15 Nov 2011 01:46:48 +0200 [thread overview]
Message-ID: <87y5vii7x3.fsf@gmail.com> (raw)
I look to 'jabber-ourversion.el.in':
(defconst jabber-version "@PACKAGE_VERSION@"
"version returned to those who query us")
(provide 'jabber-ourversion)
I look to AUCTeX:
@lisppackagelispdir@
@lispautodir@
(defconst AUCTeX-version "@AUCTEXVERSION@" ...
This seems good, but require processing sources with M4.
Currently I have single .el file which have version components:
;; Author: Oleksandr Gavenko
;; Created: 2011-11-12
;; Version: 0.1
;;; Code:
(defconst jdone-major-version 0
"jdone major version.")
(defconst jdone-minor-version 1
"jdone minor version.")
I prepare code that extract version from Mercurial tags in Makefile:
include VERSION
VERSION:
ver=$$(hg log -r . --template '{latesttag}'); \
ver=$${ver#t}; \
major=$${ver%.*}; \
minor=$${ver#*.}; \
printf "vmajor=%s\nvminor=%s\n" $$major $$minor >VERSION
How integrate vmajor, vminor in my package?
Rename jdone.el to fdone.el.in and process it with M4?
Too complicate for not so important/critical thing like version...
Provide separate file for version data?
After that I can not post jdone.el to emacswiki directly...
Are there exist practice to preprocess .el files?
Any one uses complex M4 macros in .el.in files (more complex then @bindir@)?
Seems no one:
http://www.google.com/codesearch#search/&q=file:.el.in$
--
Best regards!
next reply other threads:[~2011-11-14 23:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-14 23:46 Oleksandr Gavenko [this message]
2011-11-14 23:58 ` Look for practice to include (pkg-version) in Emacs package Oleksandr Gavenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y5vii7x3.fsf@gmail.com \
--to=gavenkoa@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.