multiply include options
This commit is contained in:
parent
f0bf0b48f1
commit
2b14ce2fa8
|
@ -19,6 +19,8 @@ DEBUG=1
|
||||||
TEMP=`getopt -o hc:x:i:l:t: --long help,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"
|
||||||
|
|
||||||
|
include_changed=false
|
||||||
|
|
||||||
while true ; do
|
while true ; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h|--help) echo "Usage: smake.sh [key]... [goal]..." ;
|
-h|--help) echo "Usage: smake.sh [key]... [goal]..." ;
|
||||||
|
@ -36,7 +38,7 @@ while true ; do
|
||||||
;;
|
;;
|
||||||
-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) [ $include_changed == false ] && REP_INCLUDE="" && include_changed=true; REP_INCLUDE="$REP_INCLUDE $2" ; shift 2 ;;
|
||||||
-l|--libraries) REP_LIBRARIES=$2 ; echo "LIBRARIES=$REP_LIBRARIES"; shift 2 ;;
|
-l|--libraries) REP_LIBRARIES=$2 ; echo "LIBRARIES=$REP_LIBRARIES"; shift 2 ;;
|
||||||
-t|--target) REP_TARGET=$2 ; echo "TARGET=$REP_TARGET"; shift 2 ;;
|
-t|--target) REP_TARGET=$2 ; echo "TARGET=$REP_TARGET"; shift 2 ;;
|
||||||
--) shift ; break ;;
|
--) shift ; break ;;
|
||||||
|
@ -56,7 +58,8 @@ sed "s~REP_CC~$REP_CC~ ; s~REP_CXX~$REP_CXX~ ; \
|
||||||
s~REP_LIBRARIES~$REP_LIBRARIES~ ; s~REP_TARGET~$REP_TARGET~" $ENV_FILE >> Makefile
|
s~REP_LIBRARIES~$REP_LIBRARIES~ ; s~REP_TARGET~$REP_TARGET~" $ENV_FILE >> Makefile
|
||||||
|
|
||||||
# INCLUDE0, INCLUDE1, INCLUDE2, ...
|
# INCLUDE0, INCLUDE1, INCLUDE2, ...
|
||||||
REP_INCLUDE=`echo $REP_INCLUDE | sed "s~-I~~g"`
|
REP_INCLUDE=`echo $REP_INCLUDE | sed 's~\~~$(HOME)~g ; s~/*$~~'`
|
||||||
|
echo "INCLUDE=$REP_INCLUDE";
|
||||||
|
|
||||||
i=1
|
i=1
|
||||||
for d in $REP_INCLUDE; do
|
for d in $REP_INCLUDE; do
|
||||||
|
|
Loading…
Reference in New Issue