External Tools - Compilefile
Posted: Sat Jul 06, 2013 12:42 am
Some years ago, I tested a long time with this function. This run well, if you use only a single file. Using include files, this function is definitely useless.Before Compile/Run
The tool will be executed right before the compiler is called to compile a source code. Using the %COMPILEFILE token, you can get the code to be compiled and modify it. This makes it possible to write a small pre-processor for the source code.
Is it possible, that the Pb compiler is using codefiles with a specific subfix, if the file with this subfix is available. For example, I have a project with tree files:
- MainFile.pb
- IncFile1.pb
- IncFile2.pb
- MainFile.pb.Compilefile
- IncFile2.pb.Compilefile
- The compiler finds MainFile.pb.Compilefile and use the code from this file.
- If the compiler runs to XIncludeFile "IncFile1.pb" and there is no IncFile1.pb.Compilefile, the compiler is using IncFile1.pb
- If the compiler runs to XIncludeFile "IncFile2.pb" and there is an IncFile2.pb.Compilefile, the compiler is using IncFile2.pb.Compilefile