help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to define rule of rules?


From: Peng Yu
Subject: How to define rule of rules?
Date: Sat, 1 May 2010 17:08:03 -0500

I need to define many rules like RData_rule, png_rule, csv_rule, ....

Is there a way to define a macro that can define these rules (with the
parameter like RData and png)?

define RData_rule
TARGET:=$(patsubst %.R,%.RData,$1)
all: $$(TARGET)
$$(TARGET): $1 $2 $3 $4 $5 $6 $7 $8
        Rscript $$<

endef

define png_rule
TARGET:=$(patsubst %.R,%.png,$1)
all: $$(TARGET)
$$(TARGET): $1 $2 $3 $4 $5 $6 $7 $8
        Rscript $$<

endef

-- 
Regards,
Peng




reply via email to

[Prev in Thread] Current Thread [Next in Thread]