-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_all_autotools_projects.sh
executable file
·66 lines (55 loc) · 1.58 KB
/
build_all_autotools_projects.sh
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
#!/bin/sh
# various options for cmake based builds:
# CMAKE_BUILD_TYPE can specify a build (debug|release|...) build type
# LIB_SUFFIX can set the ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}
# useful fro 64 bit distros
# LXQT_PREFIX changes default /usr/local prefix
# LXQT_JOB_NUM Number of jobs to run in parallel while building. Defaults to
# whatever nproc returns.
#
# example:
# $ LIB_SUFFIX=64 ./build_all.sh
# or
# $ CMAKE_BUILD_TYPE=debug CMAKE_GENERATOR=Ninja CC=clang CXX=clang++ ./build_all.sh
# etc.
if [ -n "$LXQT_JOB_NUM" ]; then
JOB_NUM="$LXQT_JOB_NUM"
elif which nproc > /dev/null; then
# detect processor numbers (Linux only)
JOB_NUM=`nproc`
else
# assume default job number of 1 (non-Linux systems)
JOB_NUM=1
fi
echo "Make job number: $JOB_NUM"
if env | grep -q ^LXQT_PREFIX= ; then
PREF="--prefix=$LXQT_PREFIX"
else
PREF=""
fi
# autotools-based projects
# build libfm-extras
echo
echo
echo "Building: libfm extras into ${PREF:-<default>}"
echo
cd "libfm"
(./autogen.sh $PREF --enable-debug --without-gtk --disable-demo && ./configure $PREF --with-extra-only && make -j$JOB_NUM && sudo make install) || exit 1
cd ..
AUTOMAKE_REPOS=" \
menu-cache"
for d in $AUTOMAKE_REPOS
do
echo "\n\nBuilding: $d into ${PREF:-<default>}\n"
cd "$d"
(./autogen.sh && ./configure $PREF && make -j$JOB_NUM && sudo make install) || exit 1
cd ..
done
# build libfm
echo
echo
echo "Building: libfm into ${PREF:-<default>}"
echo
cd "libfm"
(./autogen.sh $PREF --enable-debug --without-gtk --disable-demo && ./configure $PREF && make -j$JOB_NUM && sudo make install) || exit 1
cd ..