The variable ASFILES (as given through the file src/Makefile.asfiles) specifies the source files with extension .as.nw that are considered to build the libraries. For each of these files two versions of .as files will be generated.
These files are used by the ALDOR compiler for the build of the project libraries. Here line numbers of the form
#line LINENUMBER "FILENAME"
|
are generated into the .as file. This is done by means of the ’-L’ option of NOTANGLE. The ’-L’ option, however, copies the indentation directly from the .as.nw file. There is no nested indentation as in the first case.
By the script tools/aldordoc2codechunk.pl.nw, the contents of the +++ environments will be prepended by "+++ " and moved to the following code chunk before the file is piped to NOTANGLE.
Both versions differ only in indentation and the fact that the second version will have the line numbers from the .as.nw file added.
The reason for the generation of two versions is that it is easier to generate the dependencies from the source files that have a proper indentation (first version).
The file src/Makefile.asfiles is generated by tools/asfiles.pl.nw (see Section 29.3) and looks as follows.
There is, in fact another Aldor source file that goes into the library, namely src/mymyalpsversion.as. It provides a domain implementation for the category VersionInformationType (defined in the library Aldor). However, since the information in this file can be generated from the information that is stored in Makefile.def.nw, we rather generate this file by the code below. The generated output can be found in Section 15.1.
There should be no duplicates in SRCS. We want to compile the file src/mymyalpsversion.as first so that there will be an existing library when the other files are compiled.
In order to avoid to specify the paths of the .as.nw files, we use the vpath directive.
The generation of the .as files with prefix is given below. The generation of the .as files without prefix is the standard one as described in Section 29.4.