help-make
[Top][All Lists]
Advanced

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

one command for multiple pattern rules


From: Maciej Walezak
Subject: one command for multiple pattern rules
Date: Tue, 12 Feb 2002 17:18:43 +0100

Hi there,

With the old fasioned suffic rules I can write something like this:

.SUFFIXES: .c .sc .cc .scc .cpp .scpp
.sc.c .scc.cc .scpp.cpp:
        command -i $< -o $@

With the pattern rules I have no better idea that to write the same command for 
every single pattern rule

%.c: %.sc
        command -i $< -o $@

%.cc: %.scc
        command -i $< -o $@

%.cpp: %.scpp
        command -i $< -o $@

Is there a possibility to write it in more compact way i.e. without redundantly 
repeating the command?
I need the pattern rules because what I am really going to need is:

$(DIR)/%.c: %.sc

and so on ..

thanks in advance
--
Maciej Walezak
-GDN-



reply via email to

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