unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Look for practice to include (pkg-version) in Emacs package.
@ 2011-11-14 23:46 Oleksandr Gavenko
  2011-11-14 23:58 ` Oleksandr Gavenko
  0 siblings, 1 reply; 2+ messages in thread
From: Oleksandr Gavenko @ 2011-11-14 23:46 UTC (permalink / raw)
  To: help-gnu-emacs

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!




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-11-14 23:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-14 23:46 Look for practice to include (pkg-version) in Emacs package Oleksandr Gavenko
2011-11-14 23:58 ` Oleksandr Gavenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).