summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrand Jacquin (Beber) <beber.mailing@gmail.com>2006-02-05 00:45:01 +0100
committerBeber (guybrush@melee) <beber@guybrush.melee>2006-02-05 00:45:01 +0100
commit2465e6d63e63db568c8f4ae6d5ea368448dbf4bd (patch)
tree963948cc9ceaab1f6328b23b88ed24bcdf6b0dbd
parentbff0e08845abf5d7bae73f5ce44c33802e022339 (diff)
Better git-version
install sh too arrange gitignore
-rw-r--r--.gitignore1
-rw-r--r--Makefile.am2
-rw-r--r--configure.in1
-rw-r--r--m4/ac_espik_version.m48
-rw-r--r--sh/Makefile.am2
-rwxr-xr-xsh/get.sh8
-rwxr-xr-xsh/get_version.sh22
-rwxr-xr-xsh/propset.sh18
-rw-r--r--src/.gitignore6
-rw-r--r--src/Makefile.am3
-rw-r--r--src/espik.c2
11 files changed, 36 insertions, 37 deletions
diff --git a/.gitignore b/.gitignore
index e6be05d..8aadfdc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,7 +8,6 @@ stamp-h1
8autom4te.cache 8autom4te.cache
9aclocal.m4 9aclocal.m4
10ltmain.sh 10ltmain.sh
11svn-commit*.tmp
12espik 11espik
13*.tar.gz 12*.tar.gz
14libtool 13libtool
diff --git a/Makefile.am b/Makefile.am
index 84f0647..e476b24 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,5 @@
1## Process this file with automake to produce Makefile.in 1## Process this file with automake to produce Makefile.in
2 2
3SUBDIRS = src 3SUBDIRS = sh src
4 4
5EXTRA_DIST = README COPYING AUTHORS ChangeLog INSTALL NEWS 5EXTRA_DIST = README COPYING AUTHORS ChangeLog INSTALL NEWS
diff --git a/configure.in b/configure.in
index 25fe19c..35352cb 100644
--- a/configure.in
+++ b/configure.in
@@ -26,5 +26,6 @@ AC_CHK_EVAS
26 26
27AC_OUTPUT([ 27AC_OUTPUT([
28 Makefile 28 Makefile
29 sh/Makefile
29 src/Makefile 30 src/Makefile
30]) 31])
diff --git a/m4/ac_espik_version.m4 b/m4/ac_espik_version.m4
index 4f355c4..627c1b1 100644
--- a/m4/ac_espik_version.m4
+++ b/m4/ac_espik_version.m4
@@ -1,12 +1,8 @@
1AC_DEFUN([AC_ESPIK_VERSION], 1AC_DEFUN([AC_ESPIK_VERSION],
2[ 2[
3 AC_MSG_CHECKING(for git commit) 3 AC_MSG_CHECKING(for version)
4 4
5 if test `eval git hash-object .git/HEAD`; then 5 GITVERSION=$(sh/get_version.sh)
6 GITVERSION=`git hash-object .git/HEAD`
7 else
8 GITVERSION=`date +%Y%m%d`
9 fi
10 6
11 AC_MSG_RESULT($GITVERSION) 7 AC_MSG_RESULT($GITVERSION)
12 8
diff --git a/sh/Makefile.am b/sh/Makefile.am
new file mode 100644
index 0000000..e6e99e3
--- /dev/null
+++ b/sh/Makefile.am
@@ -0,0 +1,2 @@
1bin_SCRIPTS = \
2 nc_serv.sh
diff --git a/sh/get.sh b/sh/get.sh
index c52b818..3ebf322 100755
--- a/sh/get.sh
+++ b/sh/get.sh
@@ -1,6 +1,6 @@
1#!/bin/sh 1#!/bin/sh
2#
3# (c) 2006 Bertrand Jacquin <beber:setibzh.com>
4#
2 5
3# (c) 2005 Bertrand Jacquin <beber:setibzh.com> 6cg-clone http://guybrush.ath.cx/git/public/e/espik.git
4# Under GPLv2
5
6svn co http://guybrush.ath.cx/public/espik
diff --git a/sh/get_version.sh b/sh/get_version.sh
new file mode 100755
index 0000000..b8a7d38
--- /dev/null
+++ b/sh/get_version.sh
@@ -0,0 +1,22 @@
1#!/bin/sh
2#
3# (c) 2006 Bertrand Jacquin <beber.mailing@gmail.com>
4#
5
6if [ -d .git ]; then
7 head=$(git rev-parse --verify HEAD 2>/dev/null)
8
9 if [ "`git name-rev --tags HEAD`" = "HEAD undefined" ]; then
10 version="g$(echo "${head}" | cut -c 1-8)"
11 fi
12
13 if [ -n "$(git diff-files)" ]; then
14 version="${version}-dirty"
15 fi
16else
17 version=$(date +%Y%m%d)
18fi
19
20echo ${version}
21
22exit 0
diff --git a/sh/propset.sh b/sh/propset.sh
deleted file mode 100755
index dc9dc8b..0000000
--- a/sh/propset.sh
+++ /dev/null
@@ -1,18 +0,0 @@
1#!/bin/sh
2
3# All parameters will be then ignore by svn st
4
5export LC_ALL=C
6
7while [ ! -z "$1" ]
8do
9 echo $1 >> .svnignore
10 shift
11done
12
13svn commit -m "ignore update"
14
15svn propset svn:ignore -F .svnignore .
16svn up
17
18svn commit -m "propset update"
diff --git a/src/.gitignore b/src/.gitignore
index a0cbd98..96fd362 100644
--- a/src/.gitignore
+++ b/src/.gitignore
@@ -1,9 +1,3 @@
1.deps
2.libs
3espik
4Makefile
5Makefile.in
6espik.log 1espik.log
7*.o 2*.o
8*.S
9.*.swp 3.*.swp
diff --git a/src/Makefile.am b/src/Makefile.am
index 1172360..cad45df 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,5 +1,8 @@
1## Process this file with automake to produce Makefile.in 1## Process this file with automake to produce Makefile.in
2 2
3# %::
4# ../sh/get_version.sh
5
3AM_CFLAGS = \ 6AM_CFLAGS = \
4 $(DEBUG_CFLAGS) \ 7 $(DEBUG_CFLAGS) \
5 -W -Wall \ 8 -W -Wall \
diff --git a/src/espik.c b/src/espik.c
index 5514ce7..7570525 100644
--- a/src/espik.c
+++ b/src/espik.c
@@ -75,7 +75,7 @@ int main (int argc, char **argv)
75 __indent_level = 0; 75 __indent_level = 0;
76 espik_enter(); 76 espik_enter();
77 77
78 printf ("Welcome to %s %s\n", APPS_NAME, ESPIK_VERSION); 78 printf ("Welcome to %s-%s\n", APPS_NAME, ESPIK_VERSION);
79 espik_init(); 79 espik_init();
80 80
81 if (!ecore_init ()) 81 if (!ecore_init ())