On Wed, 2009-01-28 at 15:50 +0100, Stephan Beal wrote:
> On Wed, Jan 28, 2009 at 7:51 AM, Paul Smith <[email protected]> wrote:
> > %.min.js : %.js
> 
> Does this not have the problem that the second time it's run it will
> match foo.js, bar.js, foo.min.js, and bar.min.js (as *.min.js was
> generated on the first run)? And on the 3rd run foo.min.min.js, etc.,
> etc? (i haven't tried it, but it would seem to have this property.)

Possibly but I don't think so.  In order for it to match, the patterns
have to match.  If the target matches "foo.min.js" so that the pattern
is "foo", then the prerequisite can't be "foo.min.js" as well.  It can
only be "foo.js"

So, if your prerequisites of "all" are foo.min.js and bar.min.js, no
confusion results: it will try to build based on foo.js and bar.js.

Certainly if you do something like "all: $(wildcard *.js)" then badness
will ensue... but no one would do that right?

> > Is it possible to combine the two rules with the minify command into a
> > single rule?
> 
> Now wait a minute - i thought YOU were the one here with all the answers!

Heh.  That's not me :-)

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[email protected]>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.mad-scientist.us
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist


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

Reply via email to