all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / 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

* Re: Look for practice to include (pkg-version) in Emacs package.
  2011-11-14 23:46 Look for practice to include (pkg-version) in Emacs package Oleksandr Gavenko
@ 2011-11-14 23:58 ` Oleksandr Gavenko
  0 siblings, 0 replies; 2+ messages in thread
From: Oleksandr Gavenko @ 2011-11-14 23:58 UTC (permalink / raw)
  To: help-gnu-emacs

On 2011-11-15, Oleksandr Gavenko wrote:
> 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$
Just for correction: I don't deeply check what tools used for processing
sources...

Seems that:

  sed -e "@VMAJOR@=$(VMAJOR)" \
      -e "@VMINOR@=$(VMINOR)" \
         $from $to

also used and to job good.

-- 
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

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.