Simplificando recipe para 'fclean'
This commit is contained in:
parent
59382ff4c3
commit
2d02955697
1 changed files with 1 additions and 50 deletions
51
Makefile
51
Makefile
|
|
@ -20,9 +20,6 @@ TESTS:= isalpha_test isdigit_test isalnum_test isascii_test
|
||||||
%_actual.output : %_test
|
%_actual.output : %_test
|
||||||
./$*_test > ./$*_actual.output ;
|
./$*_test > ./$*_actual.output ;
|
||||||
|
|
||||||
#%_report : %_test %_actual.output
|
|
||||||
# $(shell diff -a $*_expected.output $*_actual.output > $*_report )
|
|
||||||
|
|
||||||
%_report : %_test %_actual.output
|
%_report : %_test %_actual.output
|
||||||
-(diff -a $*_expected.output $*_actual.output && echo "Test OK") > $*_report
|
-(diff -a $*_expected.output $*_actual.output && echo "Test OK") > $*_report
|
||||||
|
|
||||||
|
|
@ -44,52 +41,6 @@ report : $(EXES) $(ACT_OUTPUTS) $(ACT_REPORTS)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#all: $(TESTS)
|
|
||||||
|
|
||||||
#build_output: all
|
|
||||||
# $(foreach E, $(TESTS), \
|
|
||||||
# $(eval A = $(subst _test,_actual.output,$(E))) \
|
|
||||||
# ./$(E) > $(A); \
|
|
||||||
# )
|
|
||||||
#
|
|
||||||
#run: build_output
|
|
||||||
# echo "=== PRUEBAS ==="
|
|
||||||
# $(foreach E, $(TESTS), \
|
|
||||||
# $(eval A = $(subst _test,_actual.output,$(E))) \
|
|
||||||
# $(eval X = $(subst _test,_expected.output,$(E))) \
|
|
||||||
# $(shell diff -a $(X) $(A)) \
|
|
||||||
# $(eval R = ok) \
|
|
||||||
# $(eval R = $(if $(.SHELLSTATUS), NOK)) \
|
|
||||||
# echo "$(E) $(.SHELLSTATUS) - $(R) \n" \
|
|
||||||
# )
|
|
||||||
#
|
|
||||||
|
|
||||||
fclean:
|
fclean:
|
||||||
$(foreach E, $(TESTS), \
|
rm -f report $(ACT_REPORTS) $(ACT_OUTPUTS) $(EXES)
|
||||||
$(eval A = $(subst _test,_actual.output,$(E))) \
|
|
||||||
$(eval R = $(subst _test,_report,$(E))) \
|
|
||||||
rm -f $(E) $(A) $(R) \
|
|
||||||
)
|
|
||||||
rm -f report
|
|
||||||
|
|
||||||
#runmal:
|
|
||||||
# $(foreach E, $(TESTS), \
|
|
||||||
# $(eval X = $(subst _test,_expected.output,$(E))) \
|
|
||||||
# $(eval A = $(subst _test,_actual.output,$(E))) \
|
|
||||||
# $(eval R = $(shell diff -a $(X) $(A))) \
|
|
||||||
# $(if $(R), $(shell echo "$(E) NOK"), $(shell echo "$(E) ok")) \
|
|
||||||
# )
|
|
||||||
#
|
|
||||||
##foo: TESTS
|
|
||||||
|
|
||||||
#%_actual.output : %_test
|
|
||||||
# ./$*_test > ./$*_actual.output
|
|
||||||
# echo ha intentado generar actual
|
|
||||||
#
|
|
||||||
#run_%: %_actual.output
|
|
||||||
# $(shell diff -a $*_expected.output $*_actual.output )
|
|
||||||
# $(info $(.SHELLSTATUS))
|
|
||||||
# $(let R , $(intcmp 0, $(.SHELLSTATUS), ok, nok), $(info $(R)))
|
|
||||||
#
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue