help-make
[Top][All Lists]
Advanced

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

Re: "No targets" message with pattern rule


From: August Karlstrom
Subject: Re: "No targets" message with pattern rule
Date: Sun, 05 Feb 2006 23:14:47 +0100
User-agent: Mozilla Thunderbird 1.0.7 (X11/20051013)

Nick Patavalis wrote:
%.suffix2: %.suffix1
       cp $< $@

Well, you get no targets because you have specified *no targets*! You
never indicated to Make *what* you want to build. If you say:

   $ make test1.suffix2

it will work. In the makefile you simply indicated that: "If you need
a .suffix2 file, then you can make it from the corresponding .suffix1
file like this". But you never said what you want to make.

OK I see. So what should I add to the makefile to tell make to create a .suffix2 file for each .suffix1 file? I have tried the following but it doesn't seem to work:

.PHONY: main

main: $(wildcard *.suffix2)

%.suffix2: %.suffix1
        cp $< $@


August




reply via email to

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