-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathpp.platform
More file actions
28 lines (26 loc) · 877 Bytes
/
pp.platform
File metadata and controls
28 lines (26 loc) · 877 Bytes
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
#@ $pp_platform: set to the platform identifier (eg, "aix", "linux" etc.)
pp_platform=
#@ pp_set_platform(): sets the $pp_platform variable
# If --platform is provided, use that and check in the $pp_platforms list
# Otherwise probe each backend to see if it recognises `uname -s`
# Uses the $pp_platforms global variable.
pp_set_platform () {
if test -n "$pp_opt_platform"; then
pp_contains "$pp_platforms" "$pp_opt_platform" ||
pp_die "$pp_opt_platform: unknown platform"
pp_platform="$pp_opt_platform"
else
uname_s=`uname -s 2>/dev/null`
pp_platform=
for p in $pp_platforms; do
pp_debug "probing for platform $p"
if eval pp_backend_${p}_detect "$uname_s"; then
pp_platform="$p"
break;
fi
done
test -z "$pp_platform" &&
pp_die "cannot detect platform (supported: $pp_platforms)"
fi
pp_debug "pp_platform = $pp_platform"
}