summaryrefslogtreecommitdiff
path: root/web/load/Makefile.am
blob: 5b11ded12d2ef4621c940e03788e6095fb073264 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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