help-make
[Top][All Lists]
Advanced

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

Re: Colons in targets/dependencies


From: Paul D. Smith
Subject: Re: Colons in targets/dependencies
Date: Sat, 8 Dec 2001 16:11:25 -0500

%% Nick Moffitt <address@hidden> writes:

  nm> Next question:
  nm>   Can you tell me why the following gives me " *** No rule to
  nm> make target `downloads/index.html'.  Stop."?

Because you've not provided a rule to build downloads/index.html.

This pattern:

  nm> downloads/%: http//zork.net/%

doesn't do what you think it does: declaring a pattern rule without a
command isn't like creating an explicit rule without a command.  See the
GNU make manual, section "Canceling Implicit Rules".

  nm> http//%:
  nm>         cd downloads
  nm>         wget http://$*
 
  nm> .PHONY: http//%

This .PHONY also doesn't mean anything.

  nm> .DEFAULT: downloads/index.html    

Try something like:

  GET = downloads/index.html

  http//%:
        ...

  .PHONY: all
  all: $(GET:%=http//zork.net/%)

maybe.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://www.paulandlesley.org/gmake/
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist



reply via email to

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