# 引数は、対象ファイル群、出力ファイル
# 用例: $(call report_files,list_file_target,file_out)
define report_files
- $(call chk_file_ext,$2)
$(foreach tfile,$1,$(call report_file,$(tfile),$2))
endef
TEST = $(notdir $(CURRDIR))
# コマンドファイルのソース
-#CMDSRC_FILE := $(CMD_FILE)
-CMDSRC_FILE := $(CMD_FILE).c
+CMDSRC_FILE := $(CMD_FILE)
+#CMDSRC_FILE := $(CMD_FILE).c
.PHONY: check set reset time cleantime clean cleanall
@$(call disp_test_log,$(LOG_FILE))
set: $(TEST0_FILE)
+ @-$(call exec_cmd,$^,$@,$(ERR_FILE))
@$(CAT) $^
-reset: cleanall $(TEST0_FILE)
- @$(CAT) $(TEST0_FILE)
+reset: cleanall set
time: cleantime $(TIME_FILE)
cleanall: clean
@$(RM) $(TEST0_FILE)
-$(TEST0_FILE) $(TEST1_FILE): $(CMD_FILE)
+$(TEST1_FILE): $(CMD_FILE)
@-$(call exec_cmd,$^,$@,$(ERR_FILE))
$(DIFF_FILE): $(TEST0_FILE) $(TEST1_FILE)
@$(call report_files,$(LOG_FILE) $(CMDSRC_FILE) $(TEST0_FILE) $(ERR_FILE) $(DIFF_FILE) $(TEST1_FILE),$@)
$(TIME_FILE): $(CMD_FILE)
- @if test ! -x $^; then $(CHMOD) u+x $^; fi
@-$(call time_cmd,$(TEST),$^,$@)