FreeCalypso > hg > tcs211-c139
comparison gpf/CCD/mall @ 0:509db1a7b7b8
initial import: leo2moko-r1
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 01 Jun 2015 03:24:05 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:509db1a7b7b8 |
---|---|
1 #!/bin/sh | |
2 | |
3 help () | |
4 { | |
5 echo "Usage: $0 { -help|-gmake|-l <LABEL>|-clean|-exp|-unco}" | |
6 exit 0 | |
7 } | |
8 | |
9 error () | |
10 { | |
11 grep "error " $err_file | |
12 echo "Errors occurred! See $err_file for details." | |
13 exit 1 | |
14 } | |
15 | |
16 if [ "$WINWORD" != "" ] ; then | |
17 # Windows environment | |
18 OSENV=windows | |
19 if [ "$CLEARCASE_PRIMARY_GROUP" == "" ] ; then | |
20 HAVE_CC=0 | |
21 else | |
22 cleartool lsview -cview >nul 2>&1 | |
23 if [ $? == 0 ] ; then | |
24 HAVE_CC=1 | |
25 else | |
26 HAVE_CC=0 | |
27 fi | |
28 fi | |
29 else | |
30 OSENV=`uname` | |
31 cleartool lsview -cview >/dev/null 2>&1 | |
32 if [ $? == 0 ] ; then | |
33 HAVE_CC=1 | |
34 else | |
35 HAVE_CC=0 | |
36 fi | |
37 fi | |
38 | |
39 if [ $HAVE_CC == 1 ] ; then | |
40 M="clearmake -V -C gnu" | |
41 else | |
42 if [ $OSENV == windows ] ; then | |
43 M="gnumake -r" | |
44 else | |
45 M="make -r" | |
46 fi | |
47 fi | |
48 | |
49 name=CCD | |
50 name_small=ccd | |
51 err_file=../$name_small.err | |
52 ver=0 | |
53 maketarget="colibs all" | |
54 | |
55 if [ "$1" != "" ] ; then | |
56 | |
57 case "$1" in | |
58 -clean) | |
59 maketarget=clean | |
60 ;; | |
61 -gmake) | |
62 if [ $OSENV == windows ] ; then | |
63 M="gnumake -r" | |
64 else | |
65 M="make -r" | |
66 fi | |
67 ;; | |
68 -test) | |
69 echo testing not yet implemented | |
70 exit 0 | |
71 ;; | |
72 -exp) | |
73 maketarget="colibs all cilibs" | |
74 ;; | |
75 -l) | |
76 echo labelling not yet implemented | |
77 exit 0 | |
78 ;; | |
79 -help) | |
80 help | |
81 ;; | |
82 *) | |
83 echo Unknown option "$1" | |
84 help | |
85 ;; | |
86 esac | |
87 | |
88 fi | |
89 | |
90 rm -f $err_file | |
91 | |
92 if [ "$maketarget" == clean ] ; then | |
93 echo "*** cleaning $name ***" | tee -a $err_file | |
94 elif [ "$maketarget" == "colibs all cilibs" ] ; then | |
95 echo "*** making and checking in $name ***" | tee -a $err_file | |
96 else | |
97 echo "*** making $name ***" | tee -a $err_file | |
98 fi | |
99 | |
100 case "$OSENV" in | |
101 windows) | |
102 echo "Use mall.bat to build under windows environments." >> $err_file | |
103 error | |
104 ;; | |
105 | |
106 Linux) | |
107 echo $M $maketarget TARGET=linuxpc DEBUG=0 TRACE=0 MEMSUPER=0 >> $err_file | |
108 $M $maketarget TARGET=linuxpc DEBUG=0 TRACE=0 MEMSUPER=0 >> $err_file 2>&1 | |
109 if [ $? != 0 ] ; then error ; fi | |
110 echo $M $maketarget TARGET=linuxpc DEBUG=1 TRACE=0 MEMSUPER=0 >> $err_file | |
111 $M $maketarget TARGET=linuxpc DEBUG=1 TRACE=0 MEMSUPER=0 >> $err_file 2>&1 | |
112 if [ $? != 0 ] ; then error ; fi | |
113 echo $M $maketarget TARGET=linuxpc DEBUG=1 TRACE=1 MEMSUPER=0 >> $err_file | |
114 $M $maketarget TARGET=linuxpc DEBUG=1 TRACE=1 MEMSUPER=0 >> $err_file 2>&1 | |
115 if [ $? != 0 ] ; then error ; fi | |
116 echo $M $maketarget TARGET=linuxarm DEBUG=0 TRACE=0 MEMSUPER=0 >> $err_file | |
117 $M $maketarget TARGET=linuxarm DEBUG=0 TRACE=0 MEMSUPER=0 >> $err_file 2>&1 | |
118 if [ $? != 0 ] ; then error ; fi | |
119 echo $M $maketarget TARGET=linuxarm DEBUG=1 TRACE=0 MEMSUPER=0 >> $err_file | |
120 $M $maketarget TARGET=linuxarm DEBUG=1 TRACE=0 MEMSUPER=0 >> $err_file 2>&1 | |
121 if [ $? != 0 ] ; then error ; fi | |
122 echo $M $maketarget TARGET=linuxarm DEBUG=1 TRACE=1 MEMSUPER=0 >> $err_file | |
123 $M $maketarget TARGET=linuxarm DEBUG=1 TRACE=1 MEMSUPER=0 >> $err_file 2>&1 | |
124 if [ $? != 0 ] ; then error ; fi | |
125 ;; | |
126 Solaris) | |
127 echo $M $maketarget TARGET=solsparc DEBUG=0 TRACE=0 MEMSUPER=0 >> $err_file | |
128 $M $maketarget TARGET=solsparc DEBUG=0 TRACE=0 MEMSUPER=0 >> $err_file 2>&1 | |
129 if [ $? != 0 ] ; then error ; fi | |
130 echo $M $maketarget TARGET=solsparc DEBUG=1 TRACE=0 MEMSUPER=0 >> $err_file | |
131 $M $maketarget TARGET=solsparc DEBUG=1 TRACE=0 MEMSUPER=0 >> $err_file 2>&1 | |
132 if [ $? != 0 ] ; then error ; fi | |
133 echo $M $maketarget TARGET=solsparc DEBUG=1 TRACE=1 MEMSUPER=0 >> $err_file | |
134 $M $maketarget TARGET=solsparc DEBUG=1 TRACE=1 MEMSUPER=0 >> $err_file 2>&1 | |
135 if [ $? != 0 ] ; then error ; fi | |
136 ;; | |
137 esac | |
138 | |
139 exit 0 |