Index: tools/addtargetdir.pl =================================================================== --- tools/addtargetdir.pl (revision 19667) +++ tools/addtargetdir.pl (working copy) @@ -21,7 +21,7 @@ for () { if (/^([^:]+): (\S+) (.*)/) { my ($target, $src, $rest) = ($1, $2, $3); my $dir = dirname $src; - $dir =~ s/$rbroot//; + $dir =~ s/^.*$rbroot//; print "$builddir$dir/$target: $src $rest\n"; } elsif (/^([^:]+): \\/) { @@ -32,7 +32,7 @@ for () { if (/^\s+([^ ]+) (.*)/) { my ($src, $rest) = ($1, $2); my $dir = dirname $src; - $dir =~ s/$rbroot//; + $dir =~ s/^.*$rbroot//; print "$builddir$dir/$target2: $src $rest\n"; $target2 = ""; } Index: tools/configure =================================================================== --- tools/configure (revision 19667) +++ tools/configure (working copy) @@ -133,6 +133,16 @@ simcc () { output="rockboxui.exe" # use this as output binary name ;; + MINGW*) + echo "MinGW host detected" + + # sdl version + GCCOPTS="$GCCOPTS `sdl-config --cflags`" + LDOPTS="`sdl-config --libs` -mconsole" + + output="rockboxui.exe" # use this as output binary name + ;; + Linux) echo "Linux host detected" if [ "0" != `sdl-config --libs |grep -c mwindows` ]; then Index: tools/functions.make =================================================================== --- tools/functions.make (revision 19667) +++ tools/functions.make (working copy) @@ -39,7 +39,7 @@ mkdepfile = $(shell \ -e "s: pluginbitmaps/: $(BUILDDIR)/pluginbitmaps/:g" \ -e "s: lib/: $(APPSDIR)/plugins/lib/:g" \ -e "s: codeclib.h: $(APPSDIR)/codecs/lib/codeclib.h:g" \ - > $(1)_ && mv $(1)_ $(1) ) + >> $(1)_) # function to create .bmp dependencies bmpdepfile = $(shell \ Index: tools/genlang =================================================================== --- tools/genlang (revision 19667) +++ tools/genlang (working copy) @@ -89,29 +89,29 @@ my $voiceout = $o; my $check = ($binary?1:0) + ($prefix?1:0) + ($update?1:0) + ($voiceout?1:0) + ($sortfile?1:0); if($check > 1) { - print "Please use only one of -p, -u, -o, -b and -s\n"; + print STDERR "Please use only one of -p, -u, -o, -b and -s\n"; exit; } if(!$check) { - print "Please use at least one of -p, -u, -o, -b and -s\n"; + print STDERR "Please use at least one of -p, -u, -o, -b and -s\n"; exit; } if(($binary || $update || $voiceout || $sortfile) && !$english) { - print "Please use -e too when you use -b, -o, -u or -s\n"; + print STDERR "Please use -e too when you use -b, -o, -u or -s\n"; exit; } my $target_id = $i; if($binary && !$target_id) { - print "Please specify a target id number (with -i)!\n"; + print STDERR "Please specify a target id number (with -i)!\n"; exit; } my $target = $t; if(!$target && !$update && !$sortfile) { - print "Please specify a target (with -t)!\n"; + print STDERR "Please specify a target (with -t)!\n"; exit; } my $verbose=$v; @@ -540,6 +540,10 @@ if($prefix) { open(CFILE, ">$prefix.c") || die "Error: couldn't create file $prefix.c\n"; + # get header file name + $headername = "$prefix.h"; + $headername =~ s/(.*\/)*//; + print HFILE < /dev/null # there must be a "real" command in the rule - $(call mkdepfile,$(DEPFILE),$(SRC) $(OTHER_SRC)) + $(call mkdepfile,$(DEPFILE),$(SRC)) + $(call mkdepfile,$(DEPFILE),$(OTHER_SRC)) + @mv $(DEPFILE)_ $(DEPFILE) $(call bmpdepfile,$(DEPFILE),$(BMP) $(PBMP)) bin: $(DEPFILE) $(TOOLS) $(BUILDDIR)/$(BINARY) Index: tools/svnversion.sh =================================================================== --- tools/svnversion.sh (revision 19667) +++ tools/svnversion.sh (working copy) @@ -13,33 +13,37 @@ # Prints the revision "rXYZ" of the first argument, as reported by svnversion. # Prints "unknown" if svnversion fails or says "exported". svnversion_safe() { - # LANG=C forces svnversion to not localize "exported". - if OUTPUT=`LANG=C svnversion "$@"`; then - if [ "$OUTPUT" = "exported" ]; then - - # Not a SVN repository, maybe a git-svn one ? - if [ -z "$1" ]; then - GITDIR="./.git" - else - GITDIR="$1/.git" - fi + if [ -z `which svnversion` ]; then + echo "unknown" + else + # LANG=C forces svnversion to not localize "exported". + if OUTPUT=`LANG=C svnversion "$@"`; then + if [ "$OUTPUT" = "exported" ]; then - # First make sure it is a git repository - if [ -d "$GITDIR" ]; then - OUTPUT=`LANG=C git --git-dir="$GITDIR" svn info 2>/dev/null|grep '^Revision: '|cut -d\ -f2` - if [ -z "$OUTPUT" ]; then - echo "unknown" + # Not a SVN repository, maybe a git-svn one ? + if [ -z "$1" ]; then + GITDIR="./.git" else - echo "r$OUTPUT" + GITDIR="$1/.git" fi - else # not a git repository - echo "unknown" + + # First make sure it is a git repository + if [ -d "$GITDIR" ]; then + OUTPUT=`LANG=C git --git-dir="$GITDIR" svn info 2>/dev/null|grep '^Revision: '|cut -d\ -f2` + if [ -z "$OUTPUT" ]; then + echo "unknown" + else + echo "r$OUTPUT" + fi + else # not a git repository + echo "unknown" + fi + else + echo "r$OUTPUT" fi else - echo "r$OUTPUT" + echo "unknown" fi - else - echo "unknown" fi }