Logiweb(TM)

6.3.4 File output from the compilation

Prev Up Next Page 63 of 800 Search internet


By default, output files from the compiler end in ~/.logiweb. If you do

   ls ~/.logiweb

you will see that that directory contains subdirectories named 'logiweb' and 'name'. If you do

   ls ~/.logiweb/logiweb

you will see that that directory contains these subdirectories:

   01AB1F51C8C17606A5C0331B5689B4858C796547B9A0A4AEF0BCB2BB0806
   dll

The ~/.logiweb/logiweb/01AB1F51C8C17606A5C0331B5689B4858C796547B9A0A4AEF0BCB2BB0806 directory is the rendering directory of the base page, i.e. the directory which holds the output from running lgc base.lgs. If you do

   ls ~/.logiweb/name

you will see that that directory contains a symbolic link named base which points to the rendering directory of the base page.

So you can get to the rendering directory of the base page along the path ~/.logiweb/name/base.

If you compile several pages named base, then each will get its own rendering directory, and ~/.logiweb/name/base will point to the last base page you compiled.

If you followed the instructions and did compilation in a directory named foo then you will see that foo also contains a link named base which points to the rendering directory of the base page.

By default, lgc places the rendering directory under ~/.logiweb/logiweb/ and generates two symbolic links to it, one in ~/.logiweb/name/ and one in the current directory. The link in the current directory if for the convenience of you, the author, and allows you to get to your new page easily. The link in ~/.logiweb/name/ makes it easy to reference your page from other pages later on.

Now we are at it, ~/.logiweb/logiweb/ also contained a subdirectory named dll. If you do

   ls ~/.logiweb/logiweb/dll

you get

   521FC2292E93F16E6364E9EB6DF851F393BB2A50.c
   521FC2292E93F16E6364E9EB6DF851F393BB2A50.so

The Logiweb compiler lgc(1) runs on top of the Logiweb Abstract Machine lgwam(1) and that machine has very limited input/output facilities. The only powerful thing it can do is to send an arbitrary string through a C compiler, load the result dynamically, and invoke the compiled functions.

The lgc compiler needs to read and write files and a couple of other things. For that reason it produces a string which defines functions for doing so. Then lgwam stores the string in 521FC2292E93F16E6364E9EB6DF851F393BB2A50.c and invokes a C compiler on it to get a shared object 521FC2292E93F16E6364E9EB6DF851F393BB2A50.so. Then lgwam loads that shared object and grants access to it to lgc.

Prev Up Next Page 63 of 800 Search logiweb.eu

Copyright © 2010 Klaus Grue, GRD-2010-01-05