diff options
author | Thomas Martitz <kugel@rockbox.org> | 2009-04-12 01:28:33 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2009-04-12 01:28:33 +0000 |
commit | 7ed1a5f1206142a7087867b549ddf629e89ebe14 (patch) | |
tree | bf984267c3ed1ec9823584e2ab92579af30c7b96 /tools | |
parent | 725733ca92d6140eb4bbf2455cc4e3f2aabf5da5 (diff) | |
download | rockbox-7ed1a5f1206142a7087867b549ddf629e89ebe14.tar.gz rockbox-7ed1a5f1206142a7087867b549ddf629e89ebe14.zip |
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
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/buildzip.pl | 11 | ||||
-rwxr-xr-x | tools/configure | 2 | ||||
-rw-r--r-- | tools/root.make | 32 |
3 files changed, 30 insertions, 15 deletions
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=".."; | |||
21 | my $ziptool="zip -r9"; | 21 | my $ziptool="zip -r9"; |
22 | my $output="rockbox.zip"; | 22 | my $output="rockbox.zip"; |
23 | my $verbose; | 23 | my $verbose; |
24 | my $sim; | 24 | my $install=0; |
25 | my $exe; | 25 | my $exe; |
26 | my $target; | 26 | my $target; |
27 | my $modelname; | 27 | my $modelname; |
@@ -75,7 +75,7 @@ GetOptions ( 'r|root=s' => \$ROOT, | |||
75 | 'o|output=s' => \$output, | 75 | 'o|output=s' => \$output, |
76 | 'f|fonts=s' => \$incfonts, # 0 - no fonts, 1 - fonts only 2 - fonts and package | 76 | 'f|fonts=s' => \$incfonts, # 0 - no fonts, 1 - fonts only 2 - fonts and package |
77 | 'v|verbose' => \$verbose, | 77 | 'v|verbose' => \$verbose, |
78 | 's|sim' => \$sim, | 78 | 'install=s' => \$install, # install destination |
79 | 'rbdir=s' => \$rbdir, # If we want to put in a different directory | 79 | 'rbdir=s' => \$rbdir, # If we want to put in a different directory |
80 | ); | 80 | ); |
81 | 81 | ||
@@ -438,8 +438,11 @@ sub runone { | |||
438 | print "$ziptool $output $rbdir $target >/dev/null\n"; | 438 | print "$ziptool $output $rbdir $target >/dev/null\n"; |
439 | } | 439 | } |
440 | 440 | ||
441 | if($sim) { | 441 | if($install) { |
442 | system("cp -r $rbdir simdisk/ >/dev/null"); | 442 | if ($install =~ /\/dev\/null/) { |
443 | die "ERROR: No PREFIX given\n" | ||
444 | } | ||
445 | system("cp -r $rbdir \"$install\" >/dev/null"); | ||
443 | } | 446 | } |
444 | else { | 447 | else { |
445 | system("$ziptool $output $rbdir $target >/dev/null"); | 448 | 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 \ | |||
2526 | -e "s,@LANGS@,${buildlangs},g" \ | 2526 | -e "s,@LANGS@,${buildlangs},g" \ |
2527 | -e "s,@USE_ELF@,${USE_ELF},g" \ | 2527 | -e "s,@USE_ELF@,${USE_ELF},g" \ |
2528 | -e "s,@RBDIR@,${rbdir},g" \ | 2528 | -e "s,@RBDIR@,${rbdir},g" \ |
2529 | -e "s,@PREFIX@,$PREFIX,g" \ | ||
2529 | -e "s,@CMDLINE@,$cmdline,g" \ | 2530 | -e "s,@CMDLINE@,$cmdline,g" \ |
2530 | <<EOF | 2531 | <<EOF |
2531 | ## Automatically generated. http://www.rockbox.org/ | 2532 | ## Automatically generated. http://www.rockbox.org/ |
@@ -2572,6 +2573,7 @@ export WINDRES=@WINDRES@ | |||
2572 | export DLLTOOL=@DLLTOOL@ | 2573 | export DLLTOOL=@DLLTOOL@ |
2573 | export DLLWRAP=@DLLWRAP@ | 2574 | export DLLWRAP=@DLLWRAP@ |
2574 | export RANLIB=@RANLIB@ | 2575 | export RANLIB=@RANLIB@ |
2576 | export PREFIX=@PREFIX@ | ||
2575 | export PROFILE_OPTS=@PROFILE_OPTS@ | 2577 | export PROFILE_OPTS=@PROFILE_OPTS@ |
2576 | export SIMVER=@SIMVER@ | 2578 | export SIMVER=@SIMVER@ |
2577 | export SIMDIR=\$(ROOTDIR)/uisimulator/sdl | 2579 | export SIMDIR=\$(ROOTDIR)/uisimulator/sdl |
diff --git a/tools/root.make b/tools/root.make index 803a5d53b3..00586379c6 100644 --- a/tools/root.make +++ b/tools/root.make | |||
@@ -22,6 +22,20 @@ TOOLS = $(TOOLSDIR)/rdf2binary $(TOOLSDIR)/convbdf \ | |||
22 | $(TOOLSDIR)/codepages $(TOOLSDIR)/scramble $(TOOLSDIR)/bmp2rb \ | 22 | $(TOOLSDIR)/codepages $(TOOLSDIR)/scramble $(TOOLSDIR)/bmp2rb \ |
23 | $(TOOLSDIR)/uclpack $(TOOLSDIR)/mktccboot $(TOOLSDIR)/mkboot | 23 | $(TOOLSDIR)/uclpack $(TOOLSDIR)/mktccboot $(TOOLSDIR)/mkboot |
24 | 24 | ||
25 | |||
26 | ifeq (,$(PREFIX)) | ||
27 | ifdef SIMVER | ||
28 | # for sims, set simdisk/ as default | ||
29 | PREFIX = simdisk | ||
30 | INSTALL = --install="$(PREFIX)" | ||
31 | else | ||
32 | # /dev/null as magic to tell it wasn't set, error out later in buildzip.pl | ||
33 | INSTALL = --install=/dev/null | ||
34 | endif | ||
35 | else | ||
36 | INSTALL = --install="$(PREFIX)" | ||
37 | endif | ||
38 | |||
25 | RBINFO = $(BUILDDIR)/rockbox-info.txt | 39 | RBINFO = $(BUILDDIR)/rockbox-info.txt |
26 | 40 | ||
27 | # list suffixes to be understood by $* | 41 | # list suffixes to be understood by $* |
@@ -254,19 +268,15 @@ voice: voicetools features | |||
254 | 268 | ||
255 | endif | 269 | endif |
256 | 270 | ||
257 | ifdef SIMVER | ||
258 | |||
259 | install: | 271 | install: |
260 | @echo "Installing your build in your 'simdisk' dir" | 272 | @echo "Installing your build in your '$(PREFIX)' dir" |
261 | $(SILENT)for f in `cat $(BUILDDIR)/apps/features`; do feat="$$feat:$$f" ; done; \ | 273 | $(SILENT)for f in `cat $(BUILDDIR)/apps/features`; do feat="$$feat:$$f" ; done; \ |
262 | $(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) -m \"$(MODELNAME)\" -i \"$(TARGET_ID)\" -s -r "$(ROOTDIR)" --rbdir="$(RBDIR)" -f 0 $(TARGET) $(BINARY) | 274 | $(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) -m "$(MODELNAME)" -i "$(TARGET_ID)" $(INSTALL) -z "zip -r0" -r "$(ROOTDIR)" --rbdir="$(RBDIR)" -f 0 $(TARGET) $(BINARY) |
263 | 275 | ||
264 | fullinstall: | 276 | fullinstall: |
265 | @echo "Installing a full setup in your 'simdisk' dir" | 277 | @echo "Installing a full setup in your '$(PREFIX)' dir" |
266 | $(SILENT)for f in `cat $(BUILDDIR)/apps/features`; do feat="$$feat:$$f" ; done; \ | 278 | $(SILENT)for f in `cat $(BUILDDIR)/apps/features`; do feat="$$feat:$$f" ; done; \ |
267 | $(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) -m \"$(MODELNAME)\" -i \"$(TARGET_ID)\" -s -r "$(ROOTDIR)" --rbdir="$(RBDIR)" -f 2 $(TARGET) $(BINARY) | 279 | $(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) -m "$(MODELNAME)" -i "$(TARGET_ID)" $(INSTALL) -z "zip -r0" -r "$(ROOTDIR)" --rbdir="$(RBDIR)" -f 2 $(TARGET) $(BINARY) |
268 | |||
269 | endif | ||
270 | 280 | ||
271 | help: | 281 | help: |
272 | @echo "A few helpful make targets" | 282 | @echo "A few helpful make targets" |
@@ -292,8 +302,8 @@ help: | |||
292 | @echo "tools - builds the tools only" | 302 | @echo "tools - builds the tools only" |
293 | @echo "voice - creates the voice clips (voice builds only)" | 303 | @echo "voice - creates the voice clips (voice builds only)" |
294 | @echo "voicetools - builds the voice tools only" | 304 | @echo "voicetools - builds the voice tools only" |
295 | @echo "install - installs your build (for simulator builds only, no fonts)" | 305 | @echo "install - installs your build (at PREFIX, defaults to simdisk/ for simulators (no fonts))" |
296 | @echo "fullinstall - installs your build (for simulator builds only, with fonts)" | 306 | @echo "fullinstall - installs your build (like install, but with fonts)" |
297 | @echo "reconf - rerun configure with the same selection" | 307 | @echo "reconf - rerun configure with the same selection" |
298 | 308 | ||
299 | ### general compile rules: | 309 | ### general compile rules: |
@@ -320,4 +330,4 @@ Makefile: $(TOOLSDIR)/configure | |||
320 | $(SILENT)echo "*** tools/configure is newer than Makefile. You should run 'make reconf'." | 330 | $(SILENT)echo "*** tools/configure is newer than Makefile. You should run 'make reconf'." |
321 | 331 | ||
322 | reconf: | 332 | reconf: |
323 | $(SILENT)$(TOOLSDIR)/configure $(CONFIGURE_OPTIONS) | 333 | $(SILENT$)PREFIX=$(PREFIX) $(TOOLSDIR)/configure $(CONFIGURE_OPTIONS) |