#---*- Makefile -*-------------------------------------------------------
#$Author: saulius $
#$Date: 2019-03-07 15:48:47 +0000 (Thu, 07 Mar 2019) $
#$Revision: 190 $
#$URL: svn+ssh://saulius-grazulis.lt/home/saulius/svn-repositories/makefiles/run_coms_importsh/Makelocal-run_coms_importsh $
#------------------------------------------------------------------------

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

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

.PHONY: all run clean cleanAll distclean import

all: run

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

include ${DEPEND}

run: ${LOGS}

import:
	./import.sh

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

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

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

%: %.log;

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

clean:
	rm -f ${LOGS}

cleanAll distclean: clean
	rm -f ${DEPEND}
	rm -f ${CLEAN_FILES}
	rm -f ${CLEAN_DIRS:%=%/*}
