[go: up one dir, main page]

File: autogen.sh

package info (click to toggle)
freecad 0.10.3247.dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 29,068 kB
  • ctags: 24,498
  • sloc: cpp: 194,524; python: 18,897; sh: 10,256; xml: 5,505; makefile: 3,745; ansic: 1,479; lex: 151; yacc: 76
file content (60 lines) | stat: -rwxr-xr-x 1,468 bytes parent folder | download
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
54
55
56
57
58
59
60
#!/bin/sh
# autogen.sh
# Run this script to generate all initial makefiles.

# Get version and revision number
MAJ=0
MIN=10
REV=0

if svn --xml info >/dev/null 2>&1; then
	REV=`svn --xml info | tr -d '\r\n' | sed -e 's/.*<commit.*revision="\([0-9]*\)".*<\/commit>.*/\1/'`
elif svn --version --quiet >/dev/null 2>&1; then
	REV=`svn info | grep "^Revision:" | cut -d" " -f2`
fi

# if revision.m4 does not exist, create it
REV_FILE=revision.m4
if [ -f $REV_FILE ]; then
	echo "$REV_FILE found"
else
	echo "m4_define([FREECAD_MAJOR], $MAJ)" > $REV_FILE
	echo "m4_define([FREECAD_MINOR], $MIN)" >> $REV_FILE
	echo "m4_define([FREECAD_MICRO], $REV)" >> $REV_FILE
	echo "$REV_FILE created"
fi

# create m4 subdirectory which fails for some older versions of autotools
[[ -d m4 ]] || mkdir m4

if which glibtoolize > /dev/null 2>&1; then
	echo "calling glibtoolize"
	glibtoolize --force --copy
elif which libtoolize > /dev/null 2>71; then
	echo "calling libtoolize"
	libtoolize --force --copy
else
    echo "can't find libtoolize or glibtoolize"
    exit 1
fi

# http://www.gnu.org/software/hello/manual/automake/Macro-Search-Path.html
if [ -d /usr/local/share/aclocal ]; then
	echo "calling aclocal -I /usr/local/share/aclocal"
	aclocal -I /usr/local/share/aclocal
else
	echo "calling aclocal"
	aclocal
fi

echo "calling autoheader"
autoheader

echo "calling automake"
automake --add-missing --copy

echo "calling autoconf"
autoconf

echo "Done"
echo "Please run configure."