Hi all,

I'm having troubles at using make-functions to create make-rules. I find
info pages quite confusing about this.

Here is the sample code, that is demonstrates the idea

# --------BEGIN
tests_SRC=1.c 2.c
tests=$(tests_SRC:.c=.out))

define out_template =
$(DEST_DIR)/$$($(1):.c=.out) : $(1)
        echo $$@ $(1)
endef

$(eval $(call $(out_template 1.c)))
$(eval $(call $(out_template 2.c)))

all: $(tests)

check: $(tests)
        for f in $(tests) ; do ./$$f ; done
#---------END

Usual respond is

make: *** No rule to make target `1.out', needed by `all'.  Stop.

How can I make the things right?

_______________________________________________
Help-make mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-make

Reply via email to