lout-users
[Top][All Lists]
Advanced

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

Re: Setup files: processing and deployment


From: Jeff Kingston
Subject: Re: Setup files: processing and deployment
Date: Fri, 20 Feb 2009 08:29:42 +1100
User-agent: Mutt/1.4i

On Wed, Feb 18, 2009 at 11:07:31PM +0100, Yves Forkl wrote:
> Hi all,
> 
> 1) In which order does Lout process the setup files, and which is the 
> relationship between them? I am especially curious about the role of 
> standard.ld.

In the order it encounters them.  It encounters standard.ld on
line 488 of file bsf.

> 2) I've been systematically using symlinks from my setup files into the 
> Lout library and database directories, in some cases replacing the 
> original file. Is this a reasonable approach? (Lout seems to compile 
> some of the setup files, e.g. standard.ld, which left me with "fatal 
> error: cannot write to database file /opt/lout/lout.lib/data/standard.lix".)

You need to distinguish between Lout source files like bsf, dsf, bookf,
and book, and database files like standard.ld (anything ending in .ld).
Lout source files are simply read, so symlinks to those are fine.  But
database files are accessed via an index file, a .li file (or .lix
temporarily while it is being built).  When you ask to access a database
file, Lout's first step is to check whether there is an index file with
the same name (only .li instead of .ld) alongside it in the directory.
If there is, and the timestamps are OK, it uses that file, otherwise
it builds it first.

Clearly if you have a symlink to the file you will be in trouble,
since Lout sees the link name, not its value, and the link name does
not include the parent directory.  Dropping the .ld from the link name
and adding .li will not find the existing .li file.

However, I don't see why there should be a problem with standard.ld,
because it is accessed via @SysDatabase { standard }, which means
that Lout supplies its own path to this file by prepending the name
of the Lout system database directory to it.  I can't see why Lout
should be accessing this file under any other name.

> 3) How can I keep the modifications to the original Lout installation to 
> a minimum, say, like just using a reference to a kind of "root" file of 
> my modified setup? Would this have to be done in standard.ld?

The basic problem here is that @Include expects a single string, there
is no way to (say) concatenate the value of a symbol to a string and
use that as the name of the file to include.

But beyond that I think it would all depend on precisely what you were
trying to do; I think we would need to get down to details.

For myself I can say that all I ever need to do is what it says in
Section 4.1 of the user's guide:  copy setup files from the standard
directory to the directory of the current document, change @SysInclude
to @Include for those files, and then fiddle with them.  This has
always worked well for me, for many years now.  You might look at
the part near the end of the section, which explains how to merge
all the setup material into a single file.  Perhaps that is what
you need; then to change setups you just need to change a single
@Include, to include one of these merged setup files.

Keep asking by all means if there is more to the story.

Jeff


reply via email to

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