On Sat, Jul 9, 2011 at 10:26 AM, Lane Schwartz <[email protected]> wrote:
> # Define a rule template
> define COMPILE
>
> file$n.view: file$n.lf bla.file
>     echo "compiling"
>
> endef
>
>
> # Dynamically generate new makefile rules
> $(foreach n,1 2 3 4 5,\
>     $(eval COMPILE))

Oops. Typo. In eval, you need $COMPILE instead of COMPILE. Correction below:

# Define a rule template
define COMPILE

file$n.view: file$n.lf bla.file
    echo "compiling"

endef


# Dynamically generate new makefile rules
$(foreach n,1 2 3 4 5,\
    $(eval $COMPILE))

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

Reply via email to