File: bootstrap

package info (click to toggle)
littler 0.1.5-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 596 kB
  • sloc: sh: 3,698; ansic: 497; makefile: 33
file content (53 lines) | stat: -rwxr-xr-x 1,178 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash -e

call_svnversion() {
    svnrevision=`LC_ALL=C svn info | awk '/^Revision:/ {print $2}'`
    svndate=`LC_ALL=C svn info | awk '/^Last Changed Date:/ {print $4,$5}'`

    now=`date`

    if [ "$svnrevision" != "" ]; then
	if [ "$svndate" != "" ]; then
	    cat <<EOF > svnversion.h

// Do not edit!  This file was autogenerated 
//      by $0 
//      on $now
//
// svnrevision and svndate are as reported by svn at that point in time,
// compiledate and compiletime are being filled gcc at compilation

#include <stdlib.h>
 
static const char* svnrevision = "$svnrevision";
static const char* svndate = "$svndate";
static const char* compiletime = __TIME__;
static const char* compiledate = __DATE__;

EOF
	fi
    fi
}

if [ "$#" -ge 0 ]; then
    if [ "$1" = "--svnversion" ]; then
        # added hoops: make sure we only call this when we have a 
	# svn binary in the path ... so that this does not get called
	# on machines that do not have svn
	set +e
	svnprog=`type -p svn`
	set -e
	if [ "${svnprog}" != "" ]; then
	    call_svnversion 
	fi
	exit
    fi
fi

test -f svnversion.h || call_svnversion
aclocal 
autoheader 
automake 
autoconf 
./configure 
make