Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added notify dynamics in makefile depending on the OS. Removed some d…

…ebug output in the view.
  • Loading branch information...
commit c62a6d91c773a00684bb95e62c27d4882d1fd4cb 1 parent 1ff5af3
@dedeibel authored
Showing with 11 additions and 3 deletions.
  1. +11 −2 Makefile
  2. +0 −1  src/cljs/game_of_life/view.cljs
View
13 Makefile
@@ -7,7 +7,16 @@ DEPS = ${CLJS_DEPS} ${CLJ_DEPS}
MAIN_JS = game_of_life.js
OUTPUT_DIR = cljs-out
-NOTIFY_COMMAND = growlnotify -m compile-done cljs-watch
+
+NOTIFY_COMMAND = -b
+UNAMEOS = $(shell uname)
+ifeq ($(UNAMEOS),Linux)
+ NOTIFY_COMMAND = -c 'kdialog --passivepopup cljs-compile-done 3'
+endif
+ifeq ($(UNAMEOS),Darwin)
+ NOTIFY_COMMAND = -c 'growlnotify -m compile-done cljs-watch'
+endif
+
ADDITIONAL_CLASSPATH = ${PWD}/${CLJ_SRC}
# CLJS_ARGS = :optimizations :simple :pretty-print true
@@ -24,7 +33,7 @@ ${MAIN_JS}: ${DEPS}
.PHONY: watch
watch: ${DEPS}
- @export CLASSPATH=${CLASSPATH}:${ADDITIONAL_CLASSPATH}; cljs-watch -s "${CLJS_SRC}" -c '${NOTIFY_COMMAND}' '{${CLJS_ARGS}:output-dir "${OUTPUT_DIR}" :output-to "${MAIN_JS}"}'
+ @export CLASSPATH=${CLASSPATH}:${ADDITIONAL_CLASSPATH}; cljs-watch -s "${CLJS_SRC}" ${NOTIFY_COMMAND} '{${CLJS_ARGS}:output-dir "${OUTPUT_DIR}" :output-to "${MAIN_JS}"}'
.PHONY: clean
clean:
View
1  src/cljs/game_of_life/view.cljs
@@ -59,7 +59,6 @@
)
(defn- check_range [view_settings x y]
- (.log js/console (str "check range " x "x" y))
(if (or (< x 0) (< y 0)
(> x (columns view_settings)) (> y (rows view_settings)))
((:out_of_rangefn view_settings) x y)
Please sign in to comment.
Something went wrong with that request. Please try again.