Help for smake.sh created

This commit is contained in:
Kolan Sh 2011-07-08 11:10:48 +04:00
parent db013f10e3
commit ad09bce8d8
1 changed files with 14 additions and 1 deletions

View File

@ -15,11 +15,24 @@ RULES_FILE=$SMAKE_DIR/rules.smk
DEBUG=1 DEBUG=1
# Parameters processing # Parameters processing
TEMP=`getopt -o c:x:i:l:t: --long cc:,cxx:,include:,libraries:,target: -- "$@"` TEMP=`getopt -o hc:x:i:l:t: --long help,cc:,cxx:,include:,libraries:,target: -- "$@"`
eval set -- "$TEMP" eval set -- "$TEMP"
while true ; do while true ; do
case "$1" in case "$1" in
-h|--help) echo "Usage: smake.sh [key]... [goal]..." ;
echo "Keys:"
echo -e "-h, --help\t\t\tShow this help and exit."
echo -e "-c [CC], --cc [CC]\t\tUse CC as C compiler."
echo -e "-x [CXX], --cxx [CXX]\t\tUse CXX as C++ compiler."
echo -e "-i [INC], --include [INC]\tSet INC as include path."
echo -e "-l [LIB], --libraries [LIB]\tSet LIB as libraries that must be linked with."
echo -e "-t [TGT], --target [TGT]\tSet target name."
echo
echo -e "This program works on any Linux with GNU Baurne's shell"
echo -e "Report bugs to <mecareful@gmail.com>"
exit 0 ;
;;
-c|--cc) REP_CC=$2 ; echo "CC=$REP_CC" ; shift 2 ;; -c|--cc) REP_CC=$2 ; echo "CC=$REP_CC" ; shift 2 ;;
-x|--cxx) REP_CXX=$2 ; echo "CXX=$REP_CXX" ; shift 2 ;; -x|--cxx) REP_CXX=$2 ; echo "CXX=$REP_CXX" ; shift 2 ;;
-i|--include) REP_INCLUDE=$2 ; echo "INCLUDE=$REP_INCLUDE"; shift 2 ;; -i|--include) REP_INCLUDE=$2 ; echo "INCLUDE=$REP_INCLUDE"; shift 2 ;;