diff --git a/Makefile.am b/Makefile.am index e4232fe7..b7bf2f90 100644 --- a/Makefile.am +++ b/Makefile.am @@ -8,11 +8,15 @@ AUTOMAKE_OPTIONS = \ EXTRA_DIST = \ autogen.sh \ + configure.ac.in \ extras/nano/README \ extras/nano/conky.nanorc \ extras/vim/README \ extras/vim/ftdetect/conkyrc.vim \ extras/vim/syntax/conkyrc.vim +DISTCLEANFILES = \ + configure.ac + distclean-local: /bin/rm -rf *.cache *~ diff --git a/autogen.sh b/autogen.sh index 3067c037..6bb4f292 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,14 +1,23 @@ #!/bin/sh # $Id$ +# autogen.sh +# optional $1 = full path to svn local working repository + AUTOCONF=${AUTOCONF:-autoconf} AUTOMAKE=${AUTOMAKE:-automake} ACLOCAL=${ACLOCAL:-aclocal} AUTOHEADER=${AUTOHEADER:-autoheader} LIBTOOLIZE=${LIBTOOLIZE:-libtoolize} +WORKINGREPO=${1:-.} -$ACLOCAL -$LIBTOOLIZE --force -$AUTOHEADER -$AUTOMAKE -a -$AUTOCONF +# substitute svn revision +revision=`LC_ALL=C svn info ${WORKINGREPO} | awk '/^Revision: / {printf "%05d\n", $2}'` +sed -e "s/@REVISION@/${revision}/g" \ + < "configure.ac.in" > "configure.ac" + +echo Running $ACLOCAL ... && $ACLOCAL +echo Running $LIBTOOLIZE --force ... && $LIBTOOLIZE --force +echo Running $AUTOHEADER ... && $AUTOHEADER +echo Running $AUTOMAKE -a ... && $AUTOMAKE -a +echo Running $AUTOCONF ... && $AUTOCONF diff --git a/configure.ac b/configure.ac.in similarity index 97% rename from configure.ac rename to configure.ac.in index 989b346d..4e45262b 100644 --- a/configure.ac +++ b/configure.ac.in @@ -1,3 +1,5 @@ +dnl $Id$ + dnl major, minor and micro version macros. m4_define([conky_version_major], [1]) m4_define([conky_version_minor], [4]) @@ -6,10 +8,7 @@ m4_define([conky_version_micro], [5]) dnl conky_version_tag() macro. change [svn] to [] for releases. m4_define([conky_version_tag], [svn]) -dnl conky_version_revision() macro creates svn revision string, e.g. r784. -m4_define([conky_version_revision],[r`svn info | grep "^Revision:" | sed -e "s/^Revision: \(.*\)/\1/"`]) - -dnl conky_version() macro creates e.g. 1.4.5 for releases or 1.4.5-svn-r784 for svn versions. +m4_define([conky_version_revision],[r@REVISION@]) m4_define([conky_version], [conky_version_major().conky_version_minor().conky_version_micro()ifelse( conky_version_tag(), [svn],