>>>> "SY" == Steve Youngs
<youngs(a)xemacs.org> writes:
SY> Let me preface this by saying that I don't think I totally understand
SY> what you are trying to do here.
I want to be able to refer to the equivalent of the CVS keywords $Date
and $Name in the packages sources.
In emacs lisp I want to initialize build-version and
build-version-date from thme.
In texi sources I want them specify the curent release and release date.
SY> |--==> "APA" == Adrian Aichner <adrian(a)xemacs.org> writes:
APA> Hello Steve, All!
APA> In my build package I want to refer to latest version number and date
APA> of the package.
SY> [...]
APA> How do I maintain synchronisity between version number and version
APA> date between documentation, Makefile, and sources?
SY> Not sure, but maybe this will help:
Not really.
SY> ---
SY> (defun pkg-get-info (package information &optional remote)
SY> "Get INFORMATION about PACKAGE.
SY> Argument PACKAGE is the name of an XEmacs package (a symbol). It
SY> must be a valid package, ie, a member of either `pkg-std-packages' or
SY> `pkg-mule-packages'.
SY> Argument INFORMATION is a symbol that can be any one of:
SY> standards-version Package system version (not used).
SY> version Version of the XEmacs package.
SY> author-version The upstream version of the package.
SY> date The date the package was last modified.
SY> build-date The date the package was last built.
SY> maintainer The maintainer of the package.
SY> distribution Will always be \"xemacs\" (not used).
SY> priority \"low\", \"medium\", or
\"high\" (not used).
SY> category Either \"standard\" or \"mule\".
SY> dump Is the package dumped (not used).
SY> description A description of the package.
SY> filename The filename of the binary tarball of the package.
SY> md5sum The md5sum of filename.
SY> size The size in bytes of filename.
SY> provides A list of symbols that this package provides.
SY> requires A list of packages that this package requires.
SY> type Can be either \"regular\" or
\"single-file\".
SY> If optional argument REMOTE is non-nil use a package list from a
SY> remote site. For this to work `package-get-remote' must be non-nil.
SY> If this function is called interactively it will display INFORMATION
SY> in the minibuffer."
SY> (interactive "SPackage: \nSInfo: ")
SY> (let ((remote-site package-get-remote))
SY> (unless remote
SY> (setq package-get-remote nil))
SY> (package-get-require-base t)
SY> (let ((all-pkgs package-get-base)
SY> info)
SY> (if (package-get-key package :version)
SY> (progn
SY> (loop until (equal package (caar all-pkgs))
SY> do (setq all-pkgs (cdr all-pkgs)))
SY> (setq info (plist-get (cadar all-pkgs) information))
SY> (if (interactive-p)
SY> (message "%s" info)))
SY> (setq package-get-remote remote-site)
SY> (error (format "%s is not a valid package" package))))
SY> (setq package-get-remote remote-site)))
APA> What's worse:
APA> Package Release Engineer controls version number in Makefile
SY> This shouldn't be a problem at all. Don't forget that as a package
SY> maintainer, Adrian, you only need to worry about $AUTHOR_VERSION, not
SY> $VERSION.
OK, I don't need to control $VERSION.
$AUTHOR_VERSION will do fine.
APA> Package build process controls date of package release.
SY> What's wrong with this?
When I commit package sources I cannot put in the correct release date
since it's unknown at this point.
APA> Developer/Maintainer needs to keep version number and date up-to-date
APA> in elisp and texi sources.
SY> Just the version number. 'date' and 'build-date' (see doc
string in
SY> above function) are both generated.
I want to refer to release date in texi sources.
Is it a requirement for packages to build without cvs access to
cvs.xemacs.org?
If I could do this ...
all:: update-for-release $(ELCS) $(MULE_ELCS) auto-autoloads.elc custom-load.elc
$(INFO_FILES)
update-for-release:
cvs update -r $(AUTHOR_VERSION) -kv
... then I could use $Name in emacs lisp and texi sources.
Is this verboten?
APA> This can't work.
SY> Sure it can.
APA> What can we do?
SY> Well, possibly (hopefully) I've given you the tools to answer that.
SY> --
SY> |---<Steve Youngs>---------------<GnuPG KeyID: 10D5C9C5>---|
SY> | XEmacs - It's not just an editor. |
SY> | It's a way of life. |
SY> |------------------------------------<youngs(a)xemacs.org>---|
--
Adrian Aichner
mailto:adrianï¼ xemacs.org
http://www.xemacs.org/