1
0
Fork 0
forked from len0rd/rockbox

fix FS#11596. make "make install" use rbdir. copy image file correctly.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28160 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Teruaki Kawashima 2010-09-25 14:47:11 +00:00
parent 6a9cabc434
commit 3c11c56dc4

View file

@ -119,14 +119,14 @@ sub make_install {
$userdir .= "/share/rockbox"; $userdir .= "/share/rockbox";
} else { } else {
# for non-app builds we expect the prefix to be the dir above .rockbox # for non-app builds we expect the prefix to be the dir above .rockbox
$bindir .= "/.rockbox"; $bindir .= "/$rbdir";
$libdir = $userdir = $bindir; $libdir = $userdir = $bindir;
} }
if ($dest =~ /\/dev\/null/) { if ($dest =~ /\/dev\/null/) {
die "ERROR: No PREFIX given\n" die "ERROR: No PREFIX given\n"
} }
if ((!$app) && $src && (abs_path($dest) eq abs_path($src))) { if ((!$app) && $src && (abs_path($bindir) eq abs_path($src))) {
return 1; return 1;
} }
@ -663,12 +663,14 @@ sub runone {
} }
if($target && ($target !~ /(mod|ajz|wma)\z/i)) { if($target && ($target !~ /(mod|ajz|wma)\z/i)) {
# On some targets, the image goes into .rockbox. # On some targets, the image goes into .rockbox.
copy("$target", "$rbdir/$target"); copy("$target", ".rockbox/$target");
undef $target; undef $target;
} }
if($install) { if($install) {
make_install(".rockbox", $install) or die "MKDIRFAILED\n"; make_install(".rockbox", $install) or die "MKDIRFAILED\n";
rmtree(".rockbox");
print "rm .rockbox\n" if $verbose;
} }
else { else {
unless (".rockbox" eq $rbdir) { unless (".rockbox" eq $rbdir) {
@ -679,9 +681,9 @@ sub runone {
} }
system("$ziptool $output $rbdir $target >/dev/null"); system("$ziptool $output $rbdir $target >/dev/null");
print "$ziptool $output $rbdir $target >/dev/null\n" if $verbose; print "$ziptool $output $rbdir $target >/dev/null\n" if $verbose;
rmtree("$rbdir");
print "rm $rbdir\n" if $verbose;
} }
rmtree(".rockbox");
print "rm .rockbox\n" if $verbose;
}; };
if(!$exe) { if(!$exe) {