You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by he...@apache.org on 2012/05/11 20:15:03 UTC
[1/2] webos commit: CB-557 make sure Makefile works on Win & OSX
Updated Branches:
refs/heads/master 058a2967a -> 09736633c
CB-557 make sure Makefile works on Win & OSX
Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-webos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-webos/commit/09736633
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-webos/tree/09736633
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-webos/diff/09736633
Branch: refs/heads/master
Commit: 09736633c9bdcbfe2bf8eab4e977fe39b8e0fbbb
Parents: 9f8802c
Author: hermwong <he...@gmail.com>
Authored: Fri May 11 11:11:26 2012 -0700
Committer: hermwong <he...@gmail.com>
Committed: Fri May 11 11:11:26 2012 -0700
----------------------------------------------------------------------
Makefile | 38 +++++++++++++++++++++++++++++---------
1 files changed, 29 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-webos/blob/09736633/Makefile
----------------------------------------------------------------------
diff --git a/Makefile b/Makefile
old mode 100755
new mode 100644
index 17377e8..6a5f5d3
--- a/Makefile
+++ b/Makefile
@@ -19,6 +19,7 @@ ECHO = echo
ECHO_N = echo -n
JAVA = java
PGVERSION = 1.7.0
+UNAME := $(shell uname)
NAME = `$(CAT) framework/appinfo.json | $(GREP) '"id"' | $(CUT) -d \" -f 4`
VERSION = `$(CAT) framework/appinfo.json | $(GREP) '"version"' | $(CUT) -d \" -f 4`
@@ -31,31 +32,50 @@ clean :: clean_libs
clean_libs:
-$(RM_RF) lib
-
+
package:
-ifeq ($(findstring palm-package.bat,$(wildcard *.bat)), )
+ifeq ($(UNAME), Linux)
+ palm-package framework/
+else
+ifeq ($(UNAME), Darwin)
+# mac OSX
palm-package framework/
else
+# assume windows OS
palm-package.bat framework/
endif
-
+endif
+
+
deploy:
-ifeq ($(findstring palm-install.bat,$(wildcard *.bat)), )
+ifeq ($(UNAME), Linux)
+ palm-install $(NAME)_$(VERSION)_all.ipk
+else
+ifeq ($(UNAME), Darwin)
+# mac OSX
palm-install $(NAME)_$(VERSION)_all.ipk
else
+# assume windows OS
palm-install.bat $(NAME)_$(VERSION)_all.ipk
endif
-
+endif
+
run:
-ifeq ($(findstring palm-install.bat,$(wildcard *.bat)), )
+ifeq ($(UNAME), Linux)
+ palm-launch $(NAME)
+else
+ifeq ($(UNAME), Darwin)
+# mac OSX
palm-launch $(NAME)
else
+# assume windows OS
palm-launch.bat $(NAME)
endif
-
+endif
+
copy_js:
cp lib/cordova.js framework/cordova-$(PGVERSION).js
-
+
js: lib/cordova.js
lib/cordova.js: js/cordova-core.js js/acceleration.js js/accelerometer.js js/application.js js/audio.js js/camera.js js/compass.js js/contacts.js js/debugconsole.js js/device.js js/file.js js/geolocation.js js/map.js js/mojo.js js/mouse.js js/network.js js/notification.js js/orientation.js js/position.js js/service.js js/sms.js js/telephony.js js/window.js js/windowproperties.js lib/thumbs.0.5.2.js
@@ -85,4 +105,4 @@ lib/cordova.js: js/cordova-core.js js/acceleration.js js/accelerometer.js js/app
$(CAT) js/telephony.js >> $@
$(CAT) js/window.js >> $@
$(CAT) js/windowproperties.js >> $@
- $(CAT) lib/thumbs.0.5.2.js >> $@
+ $(CAT) lib/thumbs.0.5.2.js >> $@
\ No newline at end of file