-
Notifications
You must be signed in to change notification settings - Fork 29
/
configure
executable file
·57 lines (47 loc) · 1.29 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
#!/bin/sh
# This chunk of code handles out-of-tree builds:
#
# mkdir perl-build
# cd perl-build
# ../perl-5.x.y/configure ...
# make
#
# It does nothing for regular builds and should be removed.
#
# Perl is not meant to be built out-of-tree. All this code
# does is a crude implementation of a git workdir using symlinks.
#
# Avoid relying on this.
# For multiple builds, just unpack the same source several times.
root=${0%/*}
if [ "$root" != "$0" -a ! -f "MANIFEST" ]; then
echo "No MANIFEST found. Assuming out-of-source build."
echo "Symlinking source files..."
if [ ! -f "$root/MANIFEST" ]; then
echo "No $root/MANIFEST either." >&2
echo "perl-cross is not deployed properly." >&2
exit 1
fi
(cd "$root" && find -type d) | while read d; do
dir="${d#./}" # ./foo/bar -> foo/bar
if [ "$d" = "." ]; then
dp=""
back="$root"
else
mkdir -p "$dir"
dp="$dir/"
up=`echo "$dir" | sed -e 's![^/]\+!..!g'`
back="$up/$root"
fi
(cd "$root/$dir" && find -maxdepth 1 -type f) | while read i; do
name="${i#./}"
ln -s "$back/$dp$name" "$dp$name"
done
(cd "$root/$dir" && find -maxdepth 1 -type l) | while read i; do
name="${i#./}"
ln -s "$back/$dp$name" "$dp$name"
done
done
echo "Symlinking done, proceeding with configure."
fi
cnf/configure "$@"