#---*- Makefile -*-------------------------------------------------------------
#$Author: andrius $
#$Revision: 6144 $
#$Date: 2018-04-16 09:16:29 +0300 (Pr, 16 bal. 2018) $
#$URL: svn://www.crystallography.net/cod-tools/tags/v2.3/makefiles/Makefile-run_coms $
#------------------------------------------------------------------------------

COMS   = ${wildcard *.com}
LOGS   = ${COMS:%.com=%.log}
DEPEND = ${COMS:%.com=.%.d}

#------------------------------------------------------------------------------

.PHONY: all run clean cleanAll

all: run

include ${DEPEND}

run: ${LOGS}

#------------------------------------------------------------------------------

%.log: %.com
	./$< 2>&1 | tee $@

.%.d: %.com
	mkcomdepend $< > $@

%: %.log;

#------------------------------------------------------------------------------

clean:
	rm -f ${LOGS}

cleanAll distclean: clean
	rm -f ${DEPEND}
	rm -f ${CLEAN_FILES}
