Maker.cfg configuration file (TDK)
TDK generates a Maker.cfg configuration file from information in the TDK model. The information is specified through the Generator stereotype that is applied to the Model. The tagged values of the Generator stereotype tag definitions determine how the Maker.cfg file is configured.
For more information about setting up Maker.cfg file through the Generator stereotype, see TDK model configuration options (TDK).
Typically, you do not need to know anymore about the Maker.cfg fie, but more information is provided in this topic.
To generate the make file needed for completing the build process of the Code Generator DLL, TDK uses PowerMaker. PowerMaker is a command line program that generates makefiles for specific purposes. Typically, you do not need to know any more about PowerMaker, but if you want more information, see PowerMaker utility (TDK).
The TDK compiler translates SDL files to CPP files, compiles to OBJ files (adding library files), before linking the OBJ files to some libraries. This generates the Code Generator DLL.
There is an extra activity that the TDK must perform, that is, the creation of a Code Generator DLL. The Maker.cfg determines where the Code Generator DLL is created:
%RTS_ROOT%\System\<generation folder for a language>
TDK creates the required files in the Code Generator DLL folder. The generate.sdl file starts ACS and calls the associated Code Generator DLL.
The Code Generator DLL is generated from the following lines in the Maker.cfg file:
#Select among C CPP ADA95 ADA83 JAVA
var $Lang = '"CPP"';
#The folder under Artisan System where to put the generator folder
var $LangFolder = '"CppGen"';
#Set to the contents of Scheme.ini file
var $Scheme = '"C++"';
#Set to the name of the ACS script folder (that is the "Template Scheme")
var $ShdName = [Release] "ShdTest", [Debug] "ShdTestDbg";
#Set to 1 if Harness generation required
var $Harness = "1";
...................
rule MakeScript
$Source = none;
$Target = 'THESCRIPT';
var $ShdQuotedName = '"' $ShdName '"';
command
'MakeShadowScripts' $TargetDll $LangFolder $ShdQuotedName $Lang '"%SHADOW_COMDIR%"' $Scheme $Harness;
end command;
end rule;
First, the rule. It is always executed by the makefile (no Source dependency and THESCRIPT is a dependency of the other targets that are always executed by the make engine).
The rule calls a special utility that is able to generate correct stubs in the target directory. This utility is MakeShadowScripts.exe and it resides in the ACS's binary folder.
MakeShadowScripts needs to know the following information, which is provided through the command line in the order shown:
$TargetDll — The full double quoted pathname of the Code Generator DLL that is being generated.
$LangFolder — The double quoted language folder. The language folder determines where the ACS Code Generator DLL is created. For example, for C++ "%RTS_ROOT\System\CppGen", and for Ada "%RTS_ROOT\System\AdaGen".
$ShdQuotedName — The double quoted name of the Code Generator DLL, that is, the folder that will contain the generate.sdl file. For example, ShdTestForCpp or ShdForJavaSpecial.
$Lang — The double quoted acronym for the language that is being generated. Select from C, CPP, C_Sharp (for C#, IDL and SQL), ADA95 (for Ada 95 and SPARK 95), ADA83 (for Ada 83 and SPARK 83), JAVA or VB.
%SHADOW_COMDIR% — The double quoted directory in which ACS and Modeler can exchange information. ACS stores the temporary model cache in this directory.
$Scheme — The double quoted content of the Scheme.ini file, which is created in the Code Generator DLL folder. Can be Ada 83, Ada 95, SPARK 83, SPARK 95, C, C++, C_Sharp, Javaor VB.
$Harness — This is no longer used and should be set to 0.