summaryrefslogtreecommitdiff
path: root/web/meta/Makefile.am
blob: 4c82ce1a6a3b0d3773e750d8c95d4b94d02f84ed (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
34
35
36
37
38
39
40
SUBDIRS = 

based_in = htdocs
include $(top_srcdir)/Makefile.common

doc_DATA = index.html meta.1.html meta.2.html

stamp-cache: ../allpingers/allpingers.txt
	if [ -e $@ ] ; then \
		mod=`stat -c '%Y' $@`; \
	else \
		mod=0; \
	fi; \
	now=`date +'%s'`; \
	if [ $$(( $$now - $$mod )) -gt $(PINGER_CACHE_AGE) ]; then \
		$(top_srcdir)/bin/update-pinger-cache $< .; \
	else \
		echo "** Skipping Cache Update"; \
	fi

meta.1.html: stamp-cache
	cp -a $< $@

meta.2.html: stamp-cache
	cp -a $< $@

clean:
	rm -f cache.*.txt error.*.txt meta.1.html meta.2.html

install-data-local: stamp-cache
	[ -d $(docdir) ] || mkdir $(docdir)
	cp -a cache.*.txt error.*.txt $(docdir)
	! [ -f .htaccess ] || cp -a .htaccess $(docdir)

uninstall-local:
	rm -f $(docdir)/cache.*.txt
	rm -f $(docdir)/error.*.txt
	rm -f $(docdir)/.htaccess

.PHONY: stamp-cache