INCLUDES

ESA will recursively (maximum depth: 64) parse the files included with the include directive, producing a single output file without any include statement. Each include file will be included and compiled just once - please note that other assembler directives are simply ignored, so whether a file has already been included is determined by looking at the physical identity of files. F.ex.:

           IFND       GFX_ENGINE
           include    "headers.i"
           ENDC

is compiled like this:

           IFND       GFX_ENGINE

           ENDC

if headers.i had already been included previously.

When absolute path are not used, the directory which will be scanned to find the files included from a source file is the source file one, plus the directories previously indicated with the incdir directive (to implement this feature, ESA uses the temporary assign ESAINCDIR:). F.ex., if the source file development:project/sources/main.s contains this code:

           incdir      "development:includes"
           incdir      "development:project/includes"
           include     "headers.i"

the file headers.i is first searched in development:project/sources, then in development:includes and development:project/includes.

Directory/file names can be enclosed in both single and double quotes.

Please note that it does not make any sense (nor work) to compile ESA include files separately from the source(s) which make(s) use of them because ESA can generate unique labels only when all the source files are available.



home