help-make
[Top][All Lists]
Advanced

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

Re: help with implicit rules


From: Kosala Atapattu
Subject: Re: help with implicit rules
Date: Wed, 21 Nov 2012 14:11:28 +0530

My bad.... the script should be "all: $(*.page:.page=.html)", still it
doesn't work.

Kosala

On 11/21/12, Kosala Atapattu <address@hidden> wrote:
> Hi Paul,
>
> Sorry for not stating the problem. The Makefile doesn't do anything.
> It doesn't seem to fireup the implicit rule.
>
> <snip>
> address@hidden:~/programs/homepage/quiki $
> cat Makefile
> .SUFFIXES: .html .page
>
> all: $(*.html:.page=.html)
>
> %.html : %.page
>         perl compile_page.pl -T template/main.tpl -o $@ $<
>
>
> address@hidden:~/programs/homepage/quiki $
> make
> make: Nothing to be done for `all'.
>
> address@hidden:~/programs/homepage/quiki $
> ls -l *.page
> -rw-r--r-- 1 kosala kosala  71 Sep 16 12:13 banner.page
> -rw-r--r-- 1 kosala kosala  93 Sep 16 12:13 footer.page
> -rw-r--r-- 1 kosala kosala   0 Nov 20 09:23 kosala.page
> -rw-r--r-- 1 kosala kosala   0 Sep 16 12:13 neloufer.page
> -rw-r--r-- 1 kosala kosala  32 Sep 16 12:13 site_map.page
> -rw-r--r-- 1 kosala kosala 275 Sep 16 12:13 test.page
>
> address@hidden:~/programs/homepage/quiki $
>
> </snip>
>
> When I do a make -p
>
> # Not a target:
> %.html: %.page
> #  commands to execute (from `Makefile', line 6):
>         perl compile_page.pl -T template/main.tpl -o $@ $<
> ....
>
> # Not a target:
> .page:
> #  Implicit rule search has not been done.
> #  Modification time never checked.
> #  File has not been updated.
> ....
>
> # Not a target:
> .html:
> #  Implicit rule search has not been done.
> #  Modification time never checked.
> #  File has not been updated.
>
> This looks like the rule is not fired.... couldn't figure out why.
>
> Ko
>
>
> On 11/20/12, Paul Smith <address@hidden> wrote:
>> On Tue, 2012-11-20 at 11:04 +0530, Kosala Atapattu wrote:
>>> I'm trying to write a implicit rule to convert a text page to a html
>>> using
>>> perl based wiki preprocessor... I got the perl part working but I can't
>>> seem to get Make to do the rest. I have the following make file.
>>>
>>> <Makefile>
>>>
>>> .SUFFIXES: .html .page
>>>
>>> %.html : %.page
>>>         echo $<
>>>         perl compile_page.pl -T template/main.tpl -o $@ $<
>>>
>>> </Makefile>
>>>
>>> What did I do wrong here.. according to the doc I should be able to do
>>> this
>>> rt?
>>
>> It looks right to me.  You don't need the .SUFFIXES line when using
>> pattern rules but it shouldn't hurt either.
>>
>> You haven't given any indication of what the problem is, though, so
>> that's about all I can say.  Try explaining what result you expected to
>> get, and what result you actually got (with as much cut-and-paste as is
>> reasonable).  Then we can help.
>>
>>
>>
>
>
> --
> Kosala
> --------------------------------------------
> Disclaimer: Views expressed in this mail are my personal views and
> they would not reflect views of the employer.
> --------------------------------------------
> blog.kosala.net
> www.linux.lk/~kosala/
> www.kosala.net
>


-- 
Kosala
--------------------------------------------
Disclaimer: Views expressed in this mail are my personal views and
they would not reflect views of the employer.
--------------------------------------------
blog.kosala.net
www.linux.lk/~kosala/
www.kosala.net



reply via email to

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