forked from CNES/ccsdsmo-malc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
genmakeall
executable file
·115 lines (87 loc) · 1.92 KB
/
genmakeall
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
#!/bin/bash
PROGDIR=`cd "$(dirname "$0")" >/dev/null; pwd`
echo "genmakeall PROGDIR=${PROGDIR}"
# MAL_HOME should be the directory containing the MAL/C source directory.
# Only set MAL_HOME if not already set
[ -z "$MAL_HOME" ] && MAL_HOME=`cd "${PROGDIR}/.." >/dev/null; pwd`
# MAL_LOCAL is the installation directory for MAL/C libraries and includes.
# Normally it is $MAL_HOME/local for an installattion limited to the developer,
# it could be /usr/local for a global installation.
# Only set MAL_LOCAL if not already set
[ -z "$MAL_LOCAL" ] && MAL_LOCAL=${MAL_HOME}/local
echo "### Generate MAL/C from $MAL_HOME to $MAL_LOCAL"
#Stop when an error occurs
check() {
if [ "$?" -ne "0" ]; then
echo "ERROR in $PWD" 1>&2
exit 1
fi
}
# Should remove $MAL_LOCAL -> print a message
if [ "$#" -ne "0" ]; then
if [ $1 == "distclean" ]; then
echo ""
echo "!! May be you should clean $MAL_LOCAL target directory !!"
echo ""
fi
fi
genmake_mal() {
cd $PROGDIR/util;
./genmake $*
check
cd $PROGDIR/malattributes;
./genmake $*
check
cd $PROGDIR/mal;
./genmake $*
check
cd $PROGDIR/malbinary;
./genmake $*
check
cd $PROGDIR/malsplitbinary;
./genmake $*
check
cd $PROGDIR/malzmq;
./genmake $*
check
cd $PROGDIR/maltcp;
./genmake $*
check
cd $PROGDIR/malactor;
./genmake $*
check
}
genmake_tests() {
cd $PROGDIR/test/testarea;
./genmake $*
check
cd $PROGDIR/test/encoding;
./genmake $*
check
# cd $PROGDIR/test/simple_app;
# ./genmake $*
# check
cd $PROGDIR/test/send_app;
./genmake $*
check
cd $PROGDIR/test/submit_app;
./genmake $*
check
cd $PROGDIR/test/request_app;
./genmake $*
check
cd $PROGDIR/test/invoke_app;
./genmake $*
check
cd $PROGDIR/test/progress_app;
./genmake $*
check
cd $PROGDIR/test/pubsub_app;
./genmake $*
check
cd $PROGDIR/test/malzmq_pubsub_app;
./genmake $*
check
}
genmake_mal $*
genmake_tests $*