summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--web/load/Makefile.am33
1 files changed, 33 insertions, 0 deletions
diff --git a/web/load/Makefile.am b/web/load/Makefile.am
new file mode 100644
index 0000000..5b11ded
--- /dev/null
+++ b/web/load/Makefile.am
@@ -0,0 +1,33 @@
+SUBDIRS =
+
+based_in = htdocs
+include $(top_srcdir)/Makefile.common
+
+doc_DATA = result/index.html
+
+result/index.html: $(ECHOLOT_BASE)/results/thesaurus/index.txt $(ECHOLOT_BASE)/data $(ECHOLOT_BASE)/data/*
+ $(top_srcdir)/bin/load-update $(ECHOLOT_BASE) $(LOAD_RRD_DIR); \
+ [ -d result ] || mkdir result
+ if [ -e $@ ] ; then \
+ mod=`stat -c '%Y' $@`; \
+ else \
+ mod=0; \
+ fi; \
+ now=`date +'%s'`; \
+ if [ $$(( $$now - $$mod )) -gt $(LOAD_AGE) ]; then \
+ $(top_srcdir)/bin/load-graphs $(LOAD_RRD_DIR); \
+ else \
+ echo "** Skipping Load build"; \
+ fi
+
+clean:
+ rm -rf result
+
+install-data-local: result/index.html
+ [ -d $(docdir) ] || mkdir $(docdir)
+ cp result/*.png $(docdir)
+ cp result/*.html $(docdir)
+
+uninstall-local:
+ rm -f $(docdir)/*.png
+ rm -f $(docdir)/*.html