7 UI
=be
/nikiroo
/utils
/ui
/test
/TestUI
11 while [ "$*" != "" ]; do
12 key
=`echo "$1" | cut -f1 -d=`
13 val
=`echo "$1" | cut -f2 -d=`
15 --help) # This help message
16 echo The following arguments can be used
:
17 cat "$0" |
grep '^\s*--' |
grep '#' |
while read ln; do
18 cmd
=`echo "$ln" | cut -f1 -d')'`
19 msg
=`echo "$ln" | cut -f2 -d'#'`
23 --prefix) #=PATH Change the prefix to the given path
26 --ui) #=no Disable UI (Swing/AWT) support
27 [ "$val" = no
-o "$val" = false
] && UI
= && JUI
=
28 if [ "$val" = yes -o "$val" = true
]; then
29 UI
=be
/nikiroo
/utils
/ui
/test
/TestUI
32 --android) #=yes Enable Android UI support
33 [ "$val" = no
-o "$val" = false
] && ANDROID
= && JANDROID
=
34 if [ "$val" = yes -o "$val" = true
]; then
35 ANDROID
=be
/nikiroo
/utils
/android
/test
/TestAndroid
39 echo "Unsupported parameter: '$1'" >&2
46 [ $valid = false
] && exit 1
48 MESS
="A required program cannot be found:"
49 for prog
in $PROGS; do
50 out
="`whereis -b "$prog" 2>/dev/null`"
51 if [ "$out" = "$prog:" ]; then
52 echo "$MESS $prog" >&2
57 [ $valid = false
] && exit 2
59 if [ "`whereis tput`" = "tput:" ]; then
64 ok
='"`tput bold`[`tput setf 2` OK `tput init``tput bold`]`tput init`"';
65 ko
='"`tput bold`[`tput setf 4` !! `tput init``tput bold`]`tput init`"';
70 echo "MAIN = be/nikiroo/utils/test_code/Test" > Makefile
71 echo "MORE = $UI $ANDROID" >> Makefile
72 echo "TEST = be/nikiroo/utils/test_code/Test" >> Makefile
73 echo "TEST_PARAMS = $cols $ok $ko" >> Makefile
74 echo "NAME = nikiroo-utils" >> Makefile
75 echo "PREFIX = $PREFIX" >> Makefile
76 echo "JAR_FLAGS += -C bin/ be -C bin/ org -C ./ LICENSE -C ./ VERSION -C libs/ licenses" >> Makefile
77 echo "SJAR_FLAGS += -C src/ org -C src/ be -C ./ LICENSE -C ./ VERSION -C libs/ licenses" >> Makefile
79 cat Makefile.base
>> Makefile