My bad.... the script should be "all: $(*.page:.page=.html)", still it doesn't work.
Kosala On 11/21/12, Kosala Atapattu <[email protected]> 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> > kosala@x201:~/programs/homepage/quiki $ > cat Makefile > .SUFFIXES: .html .page > > all: $(*.html:.page=.html) > > %.html : %.page > perl compile_page.pl -T template/main.tpl -o $@ $< > > > kosala@x201:~/programs/homepage/quiki $ > make > make: Nothing to be done for `all'. > > kosala@x201:~/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 > > kosala@x201:~/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 <[email protected]> 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 _______________________________________________ Help-make mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-make
