Make it possible to pass -D parameters configure
authorJesus Sanchez-Palencia <jesus.sanchez-palencia.fernandez.fil@intel.com>
Fri, 2 Aug 2013 20:50:27 +0000 (17:50 -0300)
committerJesus Sanchez-Palencia <jesus.sanchez-palencia.fernandez.fil@intel.com>
Fri, 2 Aug 2013 20:50:27 +0000 (17:50 -0300)
After this commit --desktop will no longer be supported. One should
pass -D type=desktop instead. The default (if not passing any -D type)
will fallback to mobile.

configure
tizen-wrt.gyp

index 0aef728..47fa6f2 100755 (executable)
--- a/configure
+++ b/configure
@@ -8,12 +8,12 @@ if [ ! `which gyp` ]; then
    exit 1
 fi
 
-TYPE=mobile
 if [ $# -eq 1 ] && [ $1 == "--desktop" ]; then
-    TYPE=desktop
+   echo -e "\n--desktop is deprecated. Please use '-D type=desktop' instead.\n"
+   exit 1
 fi
 
 echo To build use: ninja -C out/Default
 echo Works with individual targets too: ninja -C out/Default tizen_notification
 
-gyp -D build=Debug -D type=$TYPE --depth=. tizen-wrt.gyp
+gyp -D build=Debug $@ --depth=. tizen-wrt.gyp
index ed653ab..df22be2 100644 (file)
@@ -1,4 +1,5 @@
 {
+  'variables': { 'type%': 'mobile' },
   'target_defaults': {
     'conditions': [
       ['type != "mobile"', {