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

Re: Bug report

On Mon, 17 May 1999, Fritz Zaucker wrote:

> wmk produces a 
>     -ooutputfile optionI 
> for wml. This is not good if -o lines are specified in the .wmlrc
> file.

You're right. I didn't understand this problem when you reported it few
weeks ago, it's clear now.

> I tried to add an option to wmk (-N) that would suppress the creation
> of the -o line for wml. This is a rather trivial patch which I'd
> happily submit.

Go ahead ;-)

> However, when I tried to put -N into the .wmkrc file (and this is what
> would be needed in conjunction with the -o lines in .wmlrc) I noticed,
> that .wmkrc is only read if wmk process a directory and not when it
> processes a single file.
> Looks to me as if the code for reading .wmkrc is at the wrong place
> (inside sub determine_files).

I agree, why are the .wmkrc files read in this routine?

> Cheers,
> Fritz
> P.S.: Or would the fix to my problem be that wml ignores command line
>       option -o if it finds one in .wmlrc? That would work for my
>       particular situation, but might be confusing in general.

No, command-line options _must_ override those in .wmlrc.

In the next release, output files might even be computed on-the-fly
before pass 9, so i think one should inform wml (or wmk).
Don't know how. Your `-N' flag is a good idea. Or we could use a special
shebang line, e.g #!wml --auto-outputfiles
Another idea is to replace call to `wml -o outputfile' by
    wml inputfile >tmpfile
    if size(tmpfile)>0 then mv tmpfile outputfile


Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com