diff makefile @ 1572:9be85c08a69f

fix bower and npm builds Ignore-this: 1867ee8b2ba4b883c89a7f6bd5ab446a
author Drew Perttula <drewp@bigasterisk.com>
date Sun, 28 May 2017 08:50:56 +0000
parents 1b42120d97f5
children 6059de6659c3
line wrap: on
line diff
--- a/makefile	Sun May 28 07:48:04 2017 +0000
+++ b/makefile	Sun May 28 08:50:56 2017 +0000
@@ -73,10 +73,17 @@
 packages:
 	sudo aptitude install coffeescript normalize-audio audacity python-pygame libffi-dev tix libzmq3-dev python-dev libssl-dev python-opencv python-cairo
 
-bower:
-	cd light9/web/lib; bower install
-	cd light9/web/lib/N3.js; npm install; npm run browser
-	cd light9/web/lib/d3; npm install
+
+node_modules/bower/bin/bower:
+	npm install
+
+bin/node:
+	ln -sf `which nodejs` bin/node
+
+bower: node_modules/bower/bin/bower bin/node
+	cd light9/web/lib; nodejs ../../../node_modules/bower/bin/bower install
+	cd light9/web/lib/N3.js; npm install; PATH=../../../../bin:$(PATH) npm run browser
+	cd light9/web/lib/d3; PATH=../../../../bin:$(PATH) npm install
 
 raspberry_pi_packages:
 	sudo apt-get install python-picamera python-dev python-twisted python-virtualenv