bug-idutils
[Top][All Lists]
Advanced

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

Re: [bug-idutils] idutils.el -vs- package.el


From: Jim Meyering
Subject: Re: [bug-idutils] idutils.el -vs- package.el
Date: Wed, 11 Jul 2007 17:02:31 +0200

Tom Tromey <address@hidden> wrote:
> I had to restart Emacs the other day due to a power failure :-) and I
> noticed that I hadn't set up my load-path, etc, to find idutils.el.
>
> Since I wrote package.el I've just been installing things like this
> using the package system instead of manual hacking of my .emacs.  In
> order for this to work, though, the .el file has to follow some of the
> elisp comment guidelines.
>
> This patch fixes up idutils.el.  However, it isn't perfect, since it
> puts the package version number into the .el file.  I wasn't sure what
> to do here ... I could put an autoconf substitution here, but
> package.el only wants to see "dotted numeric" versions, and the CVS
> idutils has a version of "cvs".
>
> The other hunks, I think, should be uncontroversial.
>
> In case you want to learn more about package.el:
>
>     http://tromey.com/elpa/
>
> Tom
>
> 2007-07-10  Tom Tromey  <address@hidden>
>
>       * lisp/idutils.el: Fixed comments.
>       (gid): Added autoload comment.

Thanks, Tom.
I applied that.

In the interests of keeping things in sync, I've just done this:


        Ensure that idutils.el's "Version:" comment stays up to date.
        * Makefile.am (distcheck-hook): New rule.

Index: Makefile.am
===================================================================
RCS file: /sources/idutils/idutils/Makefile.am,v
retrieving revision 1.4
diff -u -p -r1.4 Makefile.am
--- Makefile.am 1 Nov 2005 09:38:51 -0000       1.4
+++ Makefile.am 11 Jul 2007 15:01:21 -0000
@@ -4,4 +4,15 @@ ACLOCAL_AMFLAGS = -I m4
 SUBDIRS = m4 intl lib libidu src lisp doc testsuite po
 EXTRA_DIST = README-alpha config.rpath mkinstalldirs autogen.sh

-
+# When the version number is composed of only digits and "."s,
+# ensure that it matches the "Version:" comment in idutils.el.
+f = $(srcdir)/lisp/idutils.el
+distcheck-hook:
+       case "$(VERSION)" in *[^.0-9]*) chk=n;; *) chk=y;; esac;        \
+       if test $$chk = y; then                                         \
+         v=`echo "$(VERSION)" | sed 's/\./\\\\./'`;                    \
+         grep '^;; Version: '"$$v"'$$' $(f) > /dev/null && :           \
+           || { echo 1>&2 $(f): update version to $(VERSION);exit 1; } \
+       else                                                            \
+         :;                                                            \
+       fi




reply via email to

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