diff options
author | Thomas Martitz <kugel@rockbox.org> | 2010-11-14 15:29:11 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2010-11-14 15:29:11 +0000 |
commit | 9321ce3febacfc6ef495a9d834edb3e74cf3ab5b (patch) | |
tree | 6fa65e5141f3118b7fc39e85388156f7621a4ce7 /tools/configure | |
parent | a5ad3f8a7223c7f8dd17ddc57c1a018ba4d62835 (diff) | |
download | rockbox-9321ce3febacfc6ef495a9d834edb3e74cf3ab5b.tar.gz rockbox-9321ce3febacfc6ef495a9d834edb3e74cf3ab5b.zip |
Fix path detection for app builds in configure and buildzip.pl.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28592 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools/configure')
-rwxr-xr-x | tools/configure | 54 |
1 files changed, 25 insertions, 29 deletions
diff --git a/tools/configure b/tools/configure index ed3d63c61e..efeaa92a92 100755 --- a/tools/configure +++ b/tools/configure | |||
@@ -24,8 +24,6 @@ rbdir="/.rockbox" | |||
24 | need_full_path= | 24 | need_full_path= |
25 | bindir= | 25 | bindir= |
26 | libdir= | 26 | libdir= |
27 | bindir_full= | ||
28 | libdir_full= | ||
29 | 27 | ||
30 | app_platform= | 28 | app_platform= |
31 | app_lcd_width= | 29 | app_lcd_width= |
@@ -87,21 +85,25 @@ app_get_platform() { | |||
87 | app_lcd_height="#define LCD_HEIGHT $app_lcd_height" | 85 | app_lcd_height="#define LCD_HEIGHT $app_lcd_height" |
88 | # setup files and paths depending on the platform | 86 | # setup files and paths depending on the platform |
89 | if [ "$app_platform" = "sdl" ]; then | 87 | if [ "$app_platform" = "sdl" ]; then |
90 | if [ -z "$PREFIX" ]; then | 88 | if [ -z "$ARG_PREFIX" ]; then |
91 | rbdir="/usr/local/share/rockbox" | 89 | rbdir="/usr/local/share/rockbox" |
92 | bindir="/usr/local/bin" | 90 | bindir="/usr/local/bin" |
93 | bindir_full=$bindir | ||
94 | libdir="/usr/local/lib" | 91 | libdir="/usr/local/lib" |
95 | libdir_full=$libdir | ||
96 | else | 92 | else |
97 | rbdir=`realpath $PREFIX/share/rockbox` | 93 | if [ -d "$ARG_PREFIX" ]; then |
98 | bindir="$PREFIX/bin" | 94 | if [ -z `echo $ARG_PREFIX | grep "^/"` ]; then |
99 | libdir="$PREFIX/lib" | 95 | ARG_PREFIX=`realpath $ARG_PREFIX` |
100 | if [ -d bindir ]; then | 96 | if [ "0" != "$?" ]; then |
101 | bindir_full=`realpath $bindir` | 97 | echo "ERROR: Could not get prefix path (is realpath installed?)." |
102 | fi | 98 | exit |
103 | if [ -d libdir ]; then | 99 | fi |
104 | libdir_full=`realpath $libdir` | 100 | fi |
101 | rbdir="$ARG_PREFIX/share/rockbox" | ||
102 | bindir="$ARG_PREFIX/bin" | ||
103 | libdir="$ARG_PREFIX/lib" | ||
104 | else | ||
105 | echo "ERROR: PREFIX does not does not exist" | ||
106 | exit | ||
105 | fi | 107 | fi |
106 | fi | 108 | fi |
107 | output="rockbox" | 109 | output="rockbox" |
@@ -122,9 +124,7 @@ app_get_platform() { | |||
122 | fi | 124 | fi |
123 | rbdir="/data/data/org.rockbox/app_rockbox/rockbox" | 125 | rbdir="/data/data/org.rockbox/app_rockbox/rockbox" |
124 | bindir="/data/data/org.rockbox/lib" | 126 | bindir="/data/data/org.rockbox/lib" |
125 | bindir_full=$bindir | ||
126 | libdir="/data/data/org.rockbox/app_rockbox" | 127 | libdir="/data/data/org.rockbox/app_rockbox" |
127 | libdir_full=$libdir | ||
128 | output="librockbox.so" | 128 | output="librockbox.so" |
129 | bootoutput="librockbox.so" | 129 | bootoutput="librockbox.so" |
130 | fi | 130 | fi |
@@ -953,6 +953,7 @@ ARG_TYPE= | |||
953 | ARG_VOICE= | 953 | ARG_VOICE= |
954 | ARG_ARM_EABI= | 954 | ARG_ARM_EABI= |
955 | ARG_ARM_THUMB= | 955 | ARG_ARM_THUMB= |
956 | ARG_PREFIX="$PREFIX" | ||
956 | err= | 957 | err= |
957 | for arg in "$@"; do | 958 | for arg in "$@"; do |
958 | case "$arg" in | 959 | case "$arg" in |
@@ -974,7 +975,7 @@ for arg in "$@"; do | |||
974 | --no-eabi) ARG_ARM_EABI=0;; | 975 | --no-eabi) ARG_ARM_EABI=0;; |
975 | --thumb) ARG_ARM_THUMB=1;; | 976 | --thumb) ARG_ARM_THUMB=1;; |
976 | --no-thumb) ARG_ARM_THUMB=0;; | 977 | --no-thumb) ARG_ARM_THUMB=0;; |
977 | --prefix=*) PREFIX=`echo "$arg" | cut -d = -f 2`;; | 978 | --prefix=*) ARG_PREFIX=`echo "$arg" | cut -d = -f 2`;; |
978 | --help) help;; | 979 | --help) help;; |
979 | *) err=1; echo "[ERROR] Option '$arg' unsupported";; | 980 | *) err=1; echo "[ERROR] Option '$arg' unsupported";; |
980 | esac | 981 | esac |
@@ -3119,15 +3120,6 @@ else | |||
3119 | fi | 3120 | fi |
3120 | 3121 | ||
3121 | if [ "$ARG_RBDIR" ]; then | 3122 | if [ "$ARG_RBDIR" ]; then |
3122 | if [ "$need_full_path" = "yes" ]; then | ||
3123 | rbdir=`realpath $ARG_RBDIR` | ||
3124 | else # prepend '/' if needed | ||
3125 | if [ -z `echo $ARG_RBDIR | grep '^/'` ]; then | ||
3126 | rbdir="/"$ARG_RBDIR | ||
3127 | else | ||
3128 | rbdir=$ARG_RBDIR | ||
3129 | fi | ||
3130 | fi | ||
3131 | echo "Using alternate rockbox dir: ${rbdir}" | 3123 | echo "Using alternate rockbox dir: ${rbdir}" |
3132 | fi | 3124 | fi |
3133 | 3125 | ||
@@ -3138,8 +3130,8 @@ sed > autoconf.h \ | |||
3138 | -e "s<@config_rtc@<$config_rtc<g" \ | 3130 | -e "s<@config_rtc@<$config_rtc<g" \ |
3139 | -e "s<@have_rtc_alarm@<$have_rtc_alarm<g" \ | 3131 | -e "s<@have_rtc_alarm@<$have_rtc_alarm<g" \ |
3140 | -e "s<@RBDIR@<${rbdir}<g" \ | 3132 | -e "s<@RBDIR@<${rbdir}<g" \ |
3141 | -e "s<@binpath@<${bindir_full}<g" \ | 3133 | -e "s<@binpath@<${bindir}<g" \ |
3142 | -e "s<@libpath@<${libdir_full}<g" \ | 3134 | -e "s<@libpath@<${libdir}<g" \ |
3143 | -e "s<@have_backlight@<$have_backlight<g" \ | 3135 | -e "s<@have_backlight@<$have_backlight<g" \ |
3144 | -e "s<@have_fmradio_in@<$have_fmradio_in<g" \ | 3136 | -e "s<@have_fmradio_in@<$have_fmradio_in<g" \ |
3145 | -e "s<@have_ata_poweroff@<$have_ata_poweroff<g" \ | 3137 | -e "s<@have_ata_poweroff@<$have_ata_poweroff<g" \ |
@@ -3237,8 +3229,12 @@ fi | |||
3237 | if [ "$modelname" = "application" ]; then | 3229 | if [ "$modelname" = "application" ]; then |
3238 | cmdline="$cmdline--lcdwidth=$ARG_LCDWIDTH --lcdheight=$ARG_LCDHEIGHT " | 3230 | cmdline="$cmdline--lcdwidth=$ARG_LCDWIDTH --lcdheight=$ARG_LCDHEIGHT " |
3239 | fi | 3231 | fi |
3232 | if [ -n "$ARG_PREFIX" ]; then | ||
3233 | cmdline="$cmdline--prefix=\$(PREFIX) " | ||
3234 | fi | ||
3235 | |||
3236 | cmdline="$cmdline--target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts" | ||
3240 | 3237 | ||
3241 | cmdline="$cmdline--target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts --prefix=\$(PREFIX)" | ||
3242 | ### end of cmdline | 3238 | ### end of cmdline |
3243 | 3239 | ||
3244 | sed > Makefile \ | 3240 | sed > Makefile \ |
@@ -3306,7 +3302,7 @@ sed > Makefile \ | |||
3306 | -e "s<@RBDIR@<${rbdir}<g" \ | 3302 | -e "s<@RBDIR@<${rbdir}<g" \ |
3307 | -e "s<@binpath@<${bindir}<g" \ | 3303 | -e "s<@binpath@<${bindir}<g" \ |
3308 | -e "s<@libpath@<${libdir}<g" \ | 3304 | -e "s<@libpath@<${libdir}<g" \ |
3309 | -e "s<@PREFIX@<$PREFIX<g" \ | 3305 | -e "s<@PREFIX@<$ARG_PREFIX<g" \ |
3310 | -e "s<@CMDLINE@<$cmdline<g" \ | 3306 | -e "s<@CMDLINE@<$cmdline<g" \ |
3311 | -e "s<@SDLCONFIG@<$sdl<g" \ | 3307 | -e "s<@SDLCONFIG@<$sdl<g" \ |
3312 | <<EOF | 3308 | <<EOF |