tec_uname.bsh 2.39 KB
Newer Older
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117

# ########################
# Tecmake Configuration
# ########################

export TECTOOLS_HOME=/home/tecgraf
export TECMAKE_HOME=/home/tecgraf/tecmake
export TECMAKE_MAKE=make

# ########################
# System Identification
# ########################

# Base Defintion
export TEC_SYSNAME=`uname -s`
export TEC_SYSVERSION=`uname -r|cut -f1 -d.`
export TEC_SYSMINOR=`uname -r|cut -f2 -d.`
export TEC_SYSARCH=`uname -m`

# Fixes
case $TEC_SYSNAME in 
SunOS)
	export TEC_SYSARCH=`uname -p`;;
IRIX)
	export TEC_SYSARCH=`uname -p`;;
FreeBSD)
	export TEC_SYSMINOR=`uname -r|cut -f2 -d.|cut -f1 -d-`;;
AIX)
	export TEC_SYSVERSION=`uname -v`
	export TEC_SYSMINOR=`uname -r`
	export TEC_SYSARCH='ppc';;
Darwin)
	export TEC_SYSARCH=`uname -p`;;
esac

if [ $TEC_SYSARCH == i686 ]; then
	export TEC_SYSARCH='x86'
fi
if [ $TEC_SYSARCH == i386 ]; then
	export TEC_SYSARCH='x86'
fi
if [ $TEC_SYSARCH == powerpc ]; then
	export TEC_SYSARCH='ppc'
fi
if [ $TEC_SYSARCH == x86_64 ]; then
	export TEC_SYSARCH='x64'
fi

# Compose
export TEC_SYSRELEASE=$TEC_SYSVERSION.$TEC_SYSMINOR
export TEC_UNAME=$TEC_SYSNAME$TEC_SYSVERSION$TEC_SYSMINOR

# Linux 2.4 and GCC 3.x
if [ $TEC_UNAME == Linux24 ]; then
	GCCVER=`gcc -dumpversion|cut -f1 -d.`
	if [ $GCCVER == 3 ]; then
		export TEC_UNAME=$TEC_UNAME'g3'
	fi
	unset GCCVER
fi

# Linux 2.6 and GCC 4.x
if [ $TEC_UNAME == Linux26 ]; then
	GCCVER=`gcc -dumpversion|cut -f1 -d.`
	if [ $GCCVER == 4 ]; then
		export TEC_UNAME=$TEC_UNAME'g4'
	fi
	unset GCCVER
fi

# Linux and PowerPC
if [ $TEC_SYSNAME == Linux ]; then
	if [ $TEC_SYSARCH == ppc ]; then
		export TEC_UNAME=$TEC_UNAME'ppc'
	fi
fi

# 64-bits Linux
if [ $TEC_SYSARCH == x64 ]; then
	export BUILD_64=Yes
	export TEC_UNAME=$TEC_UNAME'_64'
fi

if [ $TEC_SYSARCH == ia64 ]; then
	export BUILD_64=Yes
	export TEC_UNAME=$TEC_UNAME'_ia64'
fi

# Solaris and Intel
if [ $TEC_SYSNAME == SunOS ]; then
	if [ $TEC_SYSARCH == x86 ]; then
		export TEC_UNAME=$TEC_UNAME'x86'
	fi
fi

# Darwin and Intel
if [ $TEC_SYSNAME == Darwin ]; then
	if [ $TEC_SYSARCH == x86 ]; then
		export TEC_UNAME=$TEC_UNAME'x86'
	fi
fi

# #####################
# Environment Variables
# #####################

for produto in cd im iup lua lua52 ; do
	PROD=`echo $produto|tr \[a-z\] \[A-Z\]`
	export $PROD=$TECTOOLS_HOME/$produto
	unset PROD
done

export LUA51=$TECTOOLS_HOME/lua5.1
#If the Lua executables are not in the above folder tree
#export LUA_BIN=/usr/local/bin

export CDDIR=$CD/etc