Permalink
Browse files

improved makefile

  • Loading branch information...
1 parent 036a08e commit 2b93b46de9e944a2215029c1160d2fbd0fec3236 @k2nr committed Mar 1, 2012
Showing with 16 additions and 20 deletions.
  1. +2 −5 coffee/mode.coffee
  2. +13 −10 makefile
  3. +1 −5 mode.js
View
@@ -305,7 +305,7 @@ class g.CommandMode extends g.Mode
getKeyMapping : -> g.model.getCMap()
setExecuter : (@executer) -> this
- setSources : (@sources) -> this
+ setSources : (@sources) -> this
class g.EmergencyMode extends g.Mode
getName : -> "EmergencyMode"
@@ -355,10 +355,7 @@ class g.FMode extends g.Mode
isValidKey : (key) ->
unless key.length == 1 then return false
- if @keys.indexOf( key ) < 0
- return false
- else
- return true
+ return @keys.indexOf( key ) >= 0
searchTarget : ->
for elem, i in @hints
View
@@ -1,17 +1,20 @@
-.SUFFIXES:.coffee .js
+.SUFFIXES: .coffee .js
+.PHONY: all clean
-COFFEE = coffee
+COFFEE_CMD = coffee
COFFEE_DIR = ./coffee
-COFFEE_FILES = $(COFFEE_DIR)/*.coffee
+COFFEE_FILES := $(wildcard $(COFFEE_DIR)/*.coffee)
+GEN_JS = $(patsubst $(COFFEE_DIR)/%.coffee,%.js,$(COFFEE_FILES))
-all:
- $(COFFEE) -o . -c $(COFFEE_FILES)
+all: $(GEN_JS)
-.coffee.js:
- $(COFFEE) -o . -c $<
+%.js: $(COFFEE_DIR)/%.coffee
+ $(COFFEE_CMD) -o . -c $<
-vichrome.zip: all
- zip $@ *.js manifest.json *.html lib/* lib/dicts/* icons/* css/*
+zip: all
+ zip vichrome.zip *.js manifest.json *.html lib/* lib/dicts/* icons/* css/*
+
+crx: all
clean:
- rm -f ./*.js vichrome.zip
+ rm -f $(GEN_JS) vichrome.zip vichrome.crx
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit 2b93b46

Please sign in to comment.