mirror of
https://github.com/irssi/irssi.git
synced 2025-02-02 15:08:01 -05:00
Move irssi-version.h generation out of configure and add suport for getting the
date of the last change with svn info/git log. git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4906 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
5497b07c8a
commit
52b506e13a
@ -1,12 +1,16 @@
|
||||
ACLOCAL_AMFLAGS = -I .
|
||||
|
||||
# create default-config.h
|
||||
BUILT_SOURCES = default-config.h default-theme.h
|
||||
BUILT_SOURCES = default-config.h default-theme.h irssi-version.h
|
||||
|
||||
.PHONY: irssi-version.h
|
||||
|
||||
default-config.h: $(srcdir)/irssi.conf
|
||||
$(srcdir)/file2header.sh $(srcdir)/irssi.conf default_config > default-config.h
|
||||
default-theme.h: $(srcdir)/default.theme
|
||||
$(srcdir)/file2header.sh $(srcdir)/default.theme default_theme > default-theme.h
|
||||
irssi-version.h:
|
||||
$(srcdir)/irssi-version.sh $(srcdir) > $@
|
||||
|
||||
SUBDIRS = src docs scripts
|
||||
|
||||
@ -18,8 +22,6 @@ theme_DATA = default.theme colorless.theme
|
||||
|
||||
pkginclude_HEADERS = irssi-config.h irssi-version.h
|
||||
|
||||
noinst_HEADERS = irssi-version.h.in
|
||||
|
||||
EXTRA_DIST = \
|
||||
ChangeLog \
|
||||
autogen.sh \
|
||||
@ -30,4 +32,5 @@ EXTRA_DIST = \
|
||||
$(theme_DATA) \
|
||||
irssi-config.in \
|
||||
irssi-icon.png \
|
||||
irssi-version.sh \
|
||||
syntax.pl
|
||||
|
@ -27,7 +27,6 @@ echo "Creating help files..."
|
||||
perl syntax.pl
|
||||
|
||||
$srcdir/update-changelog.sh $srcdir
|
||||
test -f $srcdir/ChangeLog || exit 1
|
||||
|
||||
files=`echo docs/help/in/*.in|sed -e 's,docs/help/in/Makefile.in ,,' -e 's,docs/help/in/,!,g' -e 's/\.in /.in ?/g'`
|
||||
cat docs/help/in/Makefile.am.gen|sed "s/@HELPFILES@/$files/g"|sed 's/?/\\?/g'|tr '!?' '\t\n' > docs/help/in/Makefile.am
|
||||
|
@ -698,14 +698,6 @@ if test "x$want_ipv6" = "xyes"; then
|
||||
AC_MSG_RESULT($have_ipv6)
|
||||
fi
|
||||
|
||||
dnl **
|
||||
dnl ** IRSSI_VERSION_DATE and IRSSI_VERSION_TIME
|
||||
dnl **
|
||||
VERSION_DATE=`head -n 2 $srcdir/ChangeLog| grep '^r' | awk '{print $5}' | tr -d '-'`
|
||||
VERSION_TIME=`head -n 2 $srcdir/ChangeLog| grep '^r' | awk '{print $6}' | awk -F: '{printf "%d\n", $1$2}'`
|
||||
AC_SUBST(VERSION_DATE)
|
||||
AC_SUBST(VERSION_TIME)
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
src/Makefile
|
||||
@ -734,7 +726,6 @@ scripts/examples/Makefile
|
||||
docs/Makefile
|
||||
docs/help/Makefile
|
||||
docs/help/in/Makefile
|
||||
irssi-version.h
|
||||
irssi-config
|
||||
])
|
||||
|
||||
|
@ -1,3 +0,0 @@
|
||||
/* automatically created by configure */
|
||||
#define IRSSI_VERSION_DATE @VERSION_DATE@
|
||||
#define IRSSI_VERSION_TIME @VERSION_TIME@
|
13
irssi-version.sh
Executable file
13
irssi-version.sh
Executable file
@ -0,0 +1,13 @@
|
||||
#! /bin/sh
|
||||
|
||||
if test -d "$1"/.svn ; then
|
||||
DATE=`LC_ALL=C svn info "$1" | sed -n 's/^Last Changed Date: \(.*\)/\1/p'`
|
||||
elif test -d "$1"/.git ; then
|
||||
DATE=`GIT_DIR=$1/.git git log -1 --pretty=format:%ai HEAD`
|
||||
else
|
||||
DATE=`awk -F '|' 'NR == 2{print substr($3, 2)}' "$1"/ChangeLog`
|
||||
fi
|
||||
VERSION_DATE=`echo $DATE | cut -f 1 -d ' ' | tr -d -`
|
||||
VERSION_TIME=`echo $DATE | cut -f 2 -d ' ' | awk -F : '{print $1 $2}'`
|
||||
echo "#define IRSSI_VERSION_DATE $VERSION_DATE"
|
||||
echo "#define IRSSI_VERSION_TIME $VERSION_TIME"
|
Loading…
x
Reference in New Issue
Block a user