From 07d2e8582eba077cade9945a36037b5f2eb0a29f Mon Sep 17 00:00:00 2001 From: "e.bovendeur" Date: Wed, 18 Nov 2009 09:28:44 +0000 Subject: [PATCH] Fixed the build on Unix machines --- HBC/META.XML | 2 +- Makefile | 6 +++--- buildtype.sh | 14 ++++++++++++++ 3 files changed, 18 insertions(+), 4 deletions(-) create mode 100755 buildtype.sh diff --git a/HBC/META.XML b/HBC/META.XML index 23994328..8d9adbd5 100644 --- a/HBC/META.XML +++ b/HBC/META.XML @@ -3,7 +3,7 @@ USB Loader GX USB Loader GX Team 1.0 r836 - 200911180000 + 200910150000 Loads games from USB-devices USB Loader GX is a libwiigui based USB iso loader with a wii-like GUI. You can install games to your HDDs and boot them with shorter loading times. The interactive GUI is completely controllable with WiiMote, Classic Controller or GC Controller. diff --git a/Makefile b/Makefile index cc35b5cd..c4493fc1 100644 --- a/Makefile +++ b/Makefile @@ -105,14 +105,14 @@ export OUTPUT := $(CURDIR)/$(TARGET) #--------------------------------------------------------------------------------- $(BUILD): @[ -d $@ ] || mkdir -p $@ - @[[ -f source/buildtype.h && ! -s source/buildtype.h ]] || cp /dev/null source/buildtype.h + @/bin/bash ./buildtype.sh @make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile # @echo debug... # start geckoreader.exe channel: @[ -d build ] || mkdir -p build - @[ -s source/buildtype.h ] || echo '#define FULLCHANNEL' > source/buildtype.h + @/bin/bash ./buildtype.sh FULLCHANNEL @make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile #--------------------------------------------------------------------------------- @@ -123,7 +123,7 @@ lang: #--------------------------------------------------------------------------------- all: @[ -d build ] || mkdir -p build - @[[ -f source/buildtype.h && ! -s source/buildtype.h ]] || cp /dev/null source/buildtype.h + @shell bash ./buildtype.sh @make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile @make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile language diff --git a/buildtype.sh b/buildtype.sh new file mode 100755 index 00000000..22066e27 --- /dev/null +++ b/buildtype.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +if [ ! -z "$1" ]; +then + if [ ! -s source/buildtype.h ]; + then + echo "#define $1" > source/buildtype.h + fi +else + if [[ ! -f source/buildtype.h || -s source/buildtype.h ]]; + then + cp /dev/null source/buildtype.h + fi +fi