Sorry, if the question about Makefiles is off-topic here but I didn't find Makefile-specific NG.
I try to use a call function in a Makefile. This code was up to now part of a Makefile rule: ruleA: $(MAKE) ruleB ruleB: if [ -f file1 ] && [ -f file2 ]; then \ awk '/^#/ { next } {print}' file2; \ else \ exit 1; \ fi; This works fine. Now I replaced this code by a call function ruleA: $(call ruleB,file1) ruleB = \ if [ -f $(1) ] && [ -f file2 ]; then \ awk '/^#/ { next } {print}' file2; \ else \ exit 1; \ fi; (so, basically just the function invocation and the function parameter were changed.) When "make" now runs the target "ruleA" I get the error message: /bin/sh: -c: line 0: unexpected EOF while looking for matching `'' /bin/sh: -c: line 1: syntax error: unexpected end of file The problem seems to be the "awk" invocation. When I remove it, than "make" works. Any ideas what problem I have here? Tim