summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-04-11 17:45:11 +0000
committerThomas Martitz <kugel@rockbox.org>2009-04-11 17:45:11 +0000
commit7e67dc6ac75ca80b9a7298fe3e0a5aa7897ba175 (patch)
tree47cfd00089b0227517a71f5fbdc1d5e69dcfee79
parent8a4db1736496d241158750f4b0c84394de3c4dab (diff)
downloadrockbox-7e67dc6ac75ca80b9a7298fe3e0a5aa7897ba175.tar.gz
rockbox-7e67dc6ac75ca80b9a7298fe3e0a5aa7897ba175.tar.bz2
rockbox-7e67dc6ac75ca80b9a7298fe3e0a5aa7897ba175.zip
"make (full)install" for normal builds, specifiy the installation destination with PREFIX (e.g. PREFIX=/mnt/my_dap ../tools/configure). PREFIX not needed for sims, as it defaults to simdisk although PREFIX can override simdisk/. Use zip -r0 for install, and -r9 for for actual zips.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20687 a1c6a512-1295-4272-9138-f99709370657
-rwxr-xr-xtools/buildzip.pl11
-rwxr-xr-xtools/configure2
-rw-r--r--tools/root.make29
3 files changed, 28 insertions, 14 deletions
diff --git a/tools/buildzip.pl b/tools/buildzip.pl
index 7df6af3a36..c32733bcd9 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="/dev/null";
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" \
<<EOF
## Automatically generated. http://www.rockbox.org/
@@ -2572,6 +2573,7 @@ export WINDRES=@WINDRES@
export DLLTOOL=@DLLTOOL@
export DLLWRAP=@DLLWRAP@
export RANLIB=@RANLIB@
+export PREFIX=@PREFIX@
export PROFILE_OPTS=@PROFILE_OPTS@
export SIMVER=@SIMVER@
export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
diff --git a/tools/root.make b/tools/root.make
index 803a5d53b3..3b50ae3825 100644
--- a/tools/root.make
+++ b/tools/root.make
@@ -22,6 +22,19 @@ TOOLS = $(TOOLSDIR)/rdf2binary $(TOOLSDIR)/convbdf \
$(TOOLSDIR)/codepages $(TOOLSDIR)/scramble $(TOOLSDIR)/bmp2rb \
$(TOOLSDIR)/uclpack $(TOOLSDIR)/mktccboot $(TOOLSDIR)/mkboot
+
+ifeq (,$(PREFIX))
+ifdef SIMVER
+PREFIX = simdisk
+INSTALL = --install="$(PREFIX)"
+else
+# Don't set INSTALL and error out later
+INSTALL =
+endif
+else
+INSTALL = --install="$(PREFIX)"
+endif
+
RBINFO = $(BUILDDIR)/rockbox-info.txt
# list suffixes to be understood by $*
@@ -254,19 +267,15 @@ voice: voicetools features
endif
-ifdef SIMVER
-
install:
- @echo "Installing your build in your 'simdisk' dir"
+ @echo "Installing your build in your '$(PREFIX)' dir"
$(SILENT)for f in `cat $(BUILDDIR)/apps/features`; do feat="$$feat:$$f" ; done; \
- $(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) -m \"$(MODELNAME)\" -i \"$(TARGET_ID)\" -s -r "$(ROOTDIR)" --rbdir="$(RBDIR)" -f 0 $(TARGET) $(BINARY)
+ $(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) -m "$(MODELNAME)" -i "$(TARGET_ID)" $(INSTALL) -z "zip -r0" -r "$(ROOTDIR)" --rbdir="$(RBDIR)" -f 0 $(TARGET) $(BINARY)
fullinstall:
- @echo "Installing a full setup in your 'simdisk' dir"
+ @echo "Installing a full setup in your '$(PREFIX)' dir"
$(SILENT)for f in `cat $(BUILDDIR)/apps/features`; do feat="$$feat:$$f" ; done; \
- $(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) -m \"$(MODELNAME)\" -i \"$(TARGET_ID)\" -s -r "$(ROOTDIR)" --rbdir="$(RBDIR)" -f 2 $(TARGET) $(BINARY)
-
-endif
+ $(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) -m \"$(MODELNAME)\" -i \"$(TARGET_ID)\" $(INSTALL) -z "zip -r0"-r "$(ROOTDIR)" --rbdir="$(RBDIR)" -f 2 $(TARGET) $(BINARY)
help:
@echo "A few helpful make targets"
@@ -292,8 +301,8 @@ help:
@echo "tools - builds the tools only"
@echo "voice - creates the voice clips (voice builds only)"
@echo "voicetools - builds the voice tools only"
- @echo "install - installs your build (for simulator builds only, no fonts)"
- @echo "fullinstall - installs your build (for simulator builds only, with fonts)"
+ @echo "install - installs your build (at PREFIX, defaults to simdisk/ for simulators (no fonts))"
+ @echo "fullinstall - installs your build (like install, but with fonts)"
@echo "reconf - rerun configure with the same selection"
### general compile rules: