From 7ed1a5f1206142a7087867b549ddf629e89ebe14 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Sun, 12 Apr 2009 01:28:33 +0000 Subject: Second try for make install for normal builds. Now differentiate better between "PREFIX not set" and "PREFIX not set, but also not needed". Also, recreate the PREFIX when running make reconf. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20694 a1c6a512-1295-4272-9138-f99709370657 --- tools/buildzip.pl | 11 +++++++---- tools/configure | 2 ++ tools/root.make | 32 +++++++++++++++++++++----------- 3 files changed, 30 insertions(+), 15 deletions(-) (limited to 'tools') diff --git a/tools/buildzip.pl b/tools/buildzip.pl index 7df6af3a36..ea902ddb9a 100755 --- a/tools/buildzip.pl +++ b/tools/buildzip.pl @@ -21,7 +21,7 @@ my $ROOT=".."; my $ziptool="zip -r9"; my $output="rockbox.zip"; my $verbose; -my $sim; +my $install=0; my $exe; my $target; my $modelname; @@ -75,7 +75,7 @@ GetOptions ( 'r|root=s' => \$ROOT, 'o|output=s' => \$output, 'f|fonts=s' => \$incfonts, # 0 - no fonts, 1 - fonts only 2 - fonts and package 'v|verbose' => \$verbose, - 's|sim' => \$sim, + 'install=s' => \$install, # install destination 'rbdir=s' => \$rbdir, # If we want to put in a different directory ); @@ -438,8 +438,11 @@ sub runone { print "$ziptool $output $rbdir $target >/dev/null\n"; } - if($sim) { - system("cp -r $rbdir simdisk/ >/dev/null"); + if($install) { + if ($install =~ /\/dev\/null/) { + die "ERROR: No PREFIX given\n" + } + system("cp -r $rbdir \"$install\" >/dev/null"); } else { system("$ziptool $output $rbdir $target >/dev/null"); diff --git a/tools/configure b/tools/configure index 44ae3e524f..72d0c79950 100755 --- a/tools/configure +++ b/tools/configure @@ -2526,6 +2526,7 @@ sed > Makefile \ -e "s,@LANGS@,${buildlangs},g" \ -e "s,@USE_ELF@,${USE_ELF},g" \ -e "s,@RBDIR@,${rbdir},g" \ + -e "s,@PREFIX@,$PREFIX,g" \ -e "s,@CMDLINE@,$cmdline,g" \ <