Re: [LIP] Implicit make rules
keerthi <linux_cowboy-/[email protected]>
| Newsgroups | gmane.user-groups.linux.india.programmers |
|---|---|
| Message-ID | <[email protected]> |
How about replacing the suffix rule '.mkd.html' with a
pattern rule '%.html'? Or is there any constraint
that it has to be a suffix rule?
Thanks,Keerthi
--- Sandip Bhattacharya <[email protected]> wrote:
> Can I make an implicit suffix rule, where the source
> and destination are
> in different directories?
>
> Problem:
> I am writing documentation in markdown syntax. I
> want the makefile to
> generate html documentation to a subdirectory called
> html/. I have
> written the following Makefile.
>
> ===============================
> MKD=Markdown.pl
>
> DOCS=html/config.html
>
> .SUFFIXES:
>
> .SUFFIXES: .html .mkd
>
> .mkd.html:
> echo $@
> cat html/header.html > html/$<.html
> $(MKD) $< >> html/$<.html
> cat html/footer.html >> html/$<.html
>
> all: $(DOCS)
> ===============================
>
> This doesnt work unless I remove the "html/" from
> the $DOCS variable. Of
> course in this case, I land up having the html files
> in the same
> directory as the source, and also since the fresh
> html files are always
> made in a different directory this rule will run
> regardless of whether
> the source is updated or not.
>
> Any ideas?
>
> Thanks,
> Sandip
>
> --
> Sandip Bhattacharya * Puroga Technologies *
> sandip-/[email protected]
> Work: http://www.puroga.com * Home/Blog:
> http://www.sandipb.net/blog
>
> PGP/GPG Signature: 51A4 6C57 4BC6 8C82 6A65 AE78
> B1A1 2280 A129 0FF3
>
>
>
>
-------------------------------------------------------
> This SF.Net email is sponsored by Yahoo.
> Introducing Yahoo! Search Developer Network - Create
> apps using Yahoo!
> Search APIs Find out how you can build Yahoo!
> directly into your own
> Applications - visit
>
http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
> _______________________________________________
> linux-india-programmers mailing list
> linux-india-programmers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
>
https://lists.sourceforge.net/lists/listinfo/linux-india-programmers
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005