include common.mak
-include target.mak
include IDSITE

depend::
	rm -f $(TARGETMAK)
	printf "TARGET=" >> $(TARGETMAK)
	for f in $(wildcard access*.log.gz); \
	do \
		printf "$${f%.gz}.archive " >> $(TARGETMAK); \
	done
	echo >> $(TARGETMAK)
	echo 'all : $$(TARGET)' >> $(TARGETMAK)

donelogclean::
	for f in $(wildcard access*.log.archive); \
	do \
		if [ -e $${f%.archive}.gz ]; then \
			rm -rf $${f%.archive}.gz; \
		fi; \
	done

clean::
	rm -f $(TARGETMAK) $(TARGET)
