This repository was archived by the owner on Mar 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 44
Expand file tree
/
Copy pathlibraries.sh
More file actions
executable file
·59 lines (51 loc) · 1.56 KB
/
libraries.sh
File metadata and controls
executable file
·59 lines (51 loc) · 1.56 KB
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
#!/bin/bash
## remove $CC and $CXX for configure
unset CC
unset CXX
## Set executable name for libtoolize
if [ "$(uname)" == "Darwin" ]; then
LIBTOOLIZE=glibtoolize
else
LIBTOOLIZE=libtoolize
fi
export LIBTOOLIZE
## Enforce pkg-config path, to not get fooled by host libraries
unset PKG_CONFIG_PATH
export PKG_CONFIG_LIBDIR="$(psp-config --psp-prefix)/lib/pkgconfig"
## Enter the psplibraries directory.
cd "`dirname $0`" || { echo "ERROR: Could not enter the psplibraries directory."; exit 1; }
source common.sh
basepath=$PWD
mkdir -p build || { echo "ERROR: Could not create the build directory."; exit 1; }
test_deps psptoolchain libtool
# If specific steps were requested, run the requested build scripts.
if [ $1 ]; then
buildall=0
list="$@"
# Else, run the all build scripts.
else
buildall=1
list="$(ls -1 $basepath/scripts/*.sh | sed -e "s/.*\///" -e "s/\..*//" | sort -f)"
fi
faillist=""
for step in $list; do
f=$basepath/scripts/$step.sh
test_deps $step
if [ $? -ne 0 ] || [ $buildall -eq 0 ]; then
if [ -x $f ]; then
cd $basepath/build
bash -c "source ../common.sh; \
set -e; \
basepath=$basepath; \
source $f" || { echo "Failed installing $step!"; faillist="$faillist $step"; }
else
echo "Installation script for $step not found!"
fi
else
echo "$step already installed"
fi
done
echo "Installation finished."
if [ -n "$faillist" ]; then
echo "Failed installing:$faillist"
fi