5 PROGS
="java javac jar make sed"
7 IMG
=be
/nikiroo
/utils
/ui
/ImageUtilsAwt
10 while [ "$*" != "" ]; do
11 key
=`echo "$1" | cut -f1 -d=`
12 val
=`echo "$1" | cut -f2 -d=`
16 --help) # This help message
17 echo The following arguments can be used
:
18 cat "$0" |
grep '^\s*--' |
grep '#' |
while read ln; do
19 cmd
=`echo "$ln" | cut -f1 -d')'`
20 msg
=`echo "$ln" | cut -f2 -d'#'`
24 --prefix) #=PATH Change the prefix to the given path
28 echo "Unsupported parameter: '$1'" >&2
37 [ $valid = false
] && exit 1
39 MESS
="A required program cannot be found:"
40 for prog
in $PROGS; do
41 out
="`whereis -b "$prog" 2>/dev/null`"
42 if [ "$out" = "$prog:" ]; then
43 echo "$MESS $prog" >&2
48 [ $valid = false
] && exit 2
50 if [ "`whereis tput`" = "tput:" ]; then
55 #ok='"`tput bold`[`tput setf 2` OK `tput init``tput bold`]`tput init`"';
56 #ko='"`tput bold`[`tput setf 4` !! `tput init``tput bold`]`tput init`"';
57 ok
='"`tput bold`[`tput setaf 2` OK `tput init``tput bold`]`tput init`"';
58 ko
='"`tput bold`[`tput setaf 1` !! `tput init``tput bold`]`tput init`"';
62 echo "MAIN = be/nikiroo/fanfix/Main" > Makefile
63 echo "MORE = $IMG" >> Makefile
64 echo "TEST = be/nikiroo/fanfix/test/Test" >> Makefile
65 echo "TEST_PARAMS = $cols $ok $ko" >> Makefile
66 echo "NAME = fanfix" >> Makefile
67 echo "PREFIX = $PREFIX" >> Makefile
68 echo "JAR_FLAGS += -C bin/ org -C bin/ be -C ./ LICENSE -C ./ VERSION -C libs/ licenses" >> Makefile
69 echo "SJAR_FLAGS += -C src/ org -C src/ be" >> Makefile
71 cat Makefile.base
>> Makefile