Q: Makefile failing on last file I'm trying to use a makefile to make some tests for my other program.
DIFF=$(TXT_FILES:$(TESTS_DIR)/%.txt=$(DIFF_DIR)/%.dif), $(STDIN_FILES:$(TESTS_DIR/%.stdin=$(DIFF_DIR)%.dif)

$(DIFF_DIR)/%.dif: $(TESTS_DIR)/%.txt $(DIFF_DIR)/%.out
    ./03uzduotis/getfasta $< | diff $(DIFF_DIR)/$*.out - > $@

$(DIFF_DIR)/%.dif: $(TESTS_DIR)/%.stdin $(DIFF_DIR)/%.out
    cat $< | ./03uzduotis/getfasta - | diff $(DIFF_DIR)/$*.out - > $@

The problem I'm having is that when I launch the makefile, it goes through all test files except the last one, citing "There is no rule to make Test1.dif required by "tests""
I have checked by removing some Test files that it indeed dies on the last file no matter which file is the last one.

A: Seems like these an extraneous comma in here:
DIFF=$(TXT_FILES:$(TESTS_DIR)/%.txt=$(DIFF_DIR)/%.dif), $(STDIN_FILES:$(TESTS_DIR/%.stdin=$(DIFF_DIR)%.dif)

$(DIFF) is going to look like ddir/one.dif ddir/two.dif, ddir/stdin1.dif  The middle file name there really does have a comma as part of the name.  Lists in Make are separated by whitespace, not commas.
I suspect your error message isn't exact, since from your example all filenames should have been prefixed with $(DIFF_DIR)/, and the comma is the error message too.
You've also got a missing ) and a missing / in the substitution $(TESTS_DIR/%.stdin=$(DIFF_DIR)%.dif.  Likely part of that is a typo in your question as the unbalanced parenthesizes would cause a parse error.  
