[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Single rule with dependencies with different suffixes
From: |
Paul Smith |
Subject: |
Single rule with dependencies with different suffixes |
Date: |
Wed, 28 Jan 2009 00:51:02 -0600 |
Let's say I have a Makefile with two sets of source files that differ
by their suffix, but I want the same command to be applied to them:
# begin
JS_SRCS = foo.js bar.js
CSS_SRCS = quux.css frob.css
%.min.js : %.js
minify $< > $@
%.min.css : %.css
minify $< > $@
all : ${JS_SRCS} ${CSS_SRCS}
# end
So make would produce: foo.min.js bar.min.js quux.min.css frob.min.css
Is it possible to combine the two rules with the minify command into a
single rule?
Cheers,
-Paul
--
Paul Smith
http://www.pauladamsmith.com/
- Single rule with dependencies with different suffixes,
Paul Smith <=