Commits

Sean Wilkinson  committed c831ba9

Quit deleting minified test script after every run

  • Participants
  • Parent commits 162b5c5

Comments (0)

Files changed (1)

 #
 #   This contains live instructions for development on the Quanah library.
 #
-#                                                       ~~ (c) SRW, 18 Aug 2012
+#                                                       ~~ (c) SRW, 02 Sep 2012
 
 PROJECT_ROOT    :=  $(realpath $(dir $(firstword $(MAKEFILE_LIST))))
 
 QUANAH  :=  src/quanah.js
 SRCJS   :=  $(JSLIBS) $(QUANAH) tools/chubby-checker.js $(wildcard tests/*.js)
 EXEJS   :=  main.js
+MINJS   :=  $(EXEJS:%.js=%-min.js)
 HTML    :=  index.html
 
 CAT     :=  $(call contingent, gcat cat)
             fi                                                          ;   \
             $(RM) $${QUICK_JS_FILE}
 
-faster:
-	@   QUICK_JS_FILE="$(strip $(call random-prefix, $(EXEJS)))"    ;   \
-            $(call compile-js,                                              \
-                $(filter-out $(JSLIBS), $(SRCJS)), $${QUICK_JS_FILE})   ;   \
-            $(call aside, "$(JS) $${QUICK_JS_FILE}")                    ;   \
-            $(TIME) $(JS) $${QUICK_JS_FILE}                             ;   \
+faster: $(MINJS)
+	@   $(call aside, "$(JS) $<")                                   ;   \
+            $(TIME) $(JS) $<                                            ;   \
             if [ $$? -eq 0 ]; then                                          \
                 $(call hilite, 'Success.')                              ;   \
             else                                                            \
                 $(call alert, 'Failure.')                               ;   \
-            fi                                                          ;   \
-            $(RM) $${QUICK_JS_FILE}
+            fi
 
 quick:
 	@   QUICK_JS_FILE="$(strip $(call random-prefix, $(EXEJS)))"    ;   \
 $(JSLIBS): jslint.js json2.js
 	@   $(CAT) $^ > $@
 
+$(MINJS): $(EXEJS)
+	@   $(call compile-js, $<, $@)
+
 ###
 
 #-  NOTE: I cache a few JavaScript frameworks and libraries in a directory on