#---*- Makefile -*-------------------------------------------------------------
#$Author: antanas $
#$Revision: 9927 $
#$Date: 2024-04-09 14:42:11 +0300 (Tue, 09 Apr 2024) $
#$URL: svn+ssh://www.crystallography.net/home/coder/svn-repositories/cod-tools/tags/v3.11.0/makefiles/Makefile-run_coms $
#------------------------------------------------------------------------------

COMS   = $(sort $(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)
