help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Look for practice to include (pkg-version) in Emacs package.


From: Oleksandr Gavenko
Subject: Look for practice to include (pkg-version) in Emacs package.
Date: Tue, 15 Nov 2011 01:46:48 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (windows-nt)

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!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]