[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]
Re: including files depending on language
- From: Denis Barbier <nospam@thanx>
- Date: Wed, 17 Feb 1999 09:51:32 +0100 (CET)
On Tue, 16 Feb 1999, Davor Cengija wrote:
> I'm quite new to this, so.... (if there is a mailing list
> archive, it would help me a lot... anyone?)
Welcome Davor,
you can browse the mailing-list archive from
http://www.engelschall.com/sw/wml/news/list.html
Archiving has been disabled in November, i will try to activate it
again.
Wml is a succession of 9 passes, each one for a specific usage.
Languages are concerned by passes 1,2,6 and 9 (see wml::std::lang(3))
Inclusion of files is handled during pass 1.
I explain this point to let you understand that conditional inclusion of
files must be processed during the first pass. Otherwise side-effects
could give strange results (pleonasm?).
After reading the wml_p1_ipp(1) manpage, you will write something like:
####################
#use wml::std::lang
$(incl_en:*# )<lang:new id=en short>
$(incl_de:*# )<lang:new id=de short>
$(incl_fr:*# )<lang:new id=fr short>
$(incl_en:*# )#include 'incl.en.wml'
$(incl_de:*# )#include 'incl.de.wml'
$(incl_fr:*# )#include 'incl.fr.wml'
####################
Kind of magic, no? To build only english and german files, type
wml -Dincl_en=1 -Dincl_de=1 foo.wml
and you guess now how to build french files too.
A better solution is to place those variable definitions in the top
.wmlrc file.
But why you don't use the canonical way, as explained in
wml::std::lang(3)?
Denis
--
D. Barbier
http://imacs.polytechnique.fr
______________________________________________________________________
Website META Language (WML) www.engelschall.com/sw/wml/
Official Support Mailing List sw-wml@engelschall.com
Automated List Manager majordomo@engelschall.com