add more rules for date ranges
[julm/air-duino.git] / GNUmakefile
index 7ab4aaa794487d348a872aeaf687df387b67ba33..e54abbf91cc69ae392ae78c6419ebb58ae45e284 100644 (file)
@@ -58,7 +58,9 @@ ARDUINO_LIBS := \
 
 USER_LIB_PATH := $(abspath ./libraries)
 
+ifeq ($(NO_INO),)
 include $(ARDMK_DIR)/Arduino.mk
+endif
 
 ino: $(TARGET_EEP) $(TARGET_HEX)
 
@@ -107,6 +109,15 @@ rrd/$(year)/$(month).rrd
         LINE1:$(sensor)'#ff0000':"$(sensor)";
 endef
 
+define view/year/month/png
+view/$(year)/$(month)/png: \
+$(foreach sensor,$(sensors), view/$(sensor)/$(year)/$(month)/png)
+endef
+define view/year/month/day/png
+view/$(year)/$(month)/$(day)/png: \
+$(foreach sensor,$(sensors), view/$(sensor)/$(year)/$(month)/$(day)/png)
+endef
+
 #
 ## HTML5
 ###
@@ -188,7 +199,7 @@ $(call view/sensor/year/$(view))
 endef
 
 define foreach/year/month/sensor/view
-.PHONY:                       view/$(sensor)/$(year)/$(month)/$(view)
+.PHONY:                         view/$(sensor)/$(year)/$(month)/$(view)
 view/$(sensor)/$(year)/$(view): view/$(sensor)/$(year)/$(month)/$(view)
 $(call view/sensor/year/month/$(view))
 endef
@@ -199,10 +210,15 @@ $(call view/year/month/$(view))
 endef
 
 define foreach/year/month/day/sensor/view
-.PHONY:                                view/$(sensor)/$(year)/$(month)/$(day)/$(view)
+.PHONY:                                  view/$(sensor)/$(year)/$(month)/$(day)/$(view)
 view/$(sensor)/$(year)/$(month)/$(view): view/$(sensor)/$(year)/$(month)/$(day)/$(view)
 $(call view/sensor/year/month/day/$(view))
 endef
+define foreach/year/month/day/view
+.PHONY:                        view/$(year)/$(month)/$(day)/$(view)
+view/$(year)/$(month)/$(view): view/$(year)/$(month)/$(day)/$(view)
+$(call view/year/month/day/$(view))
+endef
 
 $(foreach sensor,$(sensors), \
        $(foreach view,$(views), \