Hello Bob and Liming,
I am coming back to you after re-reading Bob's answer:
> I meet another problem related to .asl file. In one of platforms build process, there is a step which need to compile a .asl file a .h file firstly and that .h file will be included by a module’s source code.
> That step cannot be handled in edk2 build since the compilation command use different build option, so it’s done in a pre-build script. I want to make edk2 build be able to handle such case. So together with your case, I think we may need a solution that can do:
> 1. Create a module which contains the .asl file and the build option to compile that .asl file.
> 2. Find a way to describe the dependency relation between the module contains .asl and the corresponding module contains .c file
I split my module into one module containing the .asl file, and a second module containing .c source files. However I could not find a way to describe a dependency between the two modules (as suggested in the second step).
This part of Bob's answer makes me think it's not possible using current edk2 build system:
> That step cannot be handled in edk2 build since the compilation command use different build option, so it’s done in a pre-build script.
I will have to reproduce the solution to multiple folders and for multiple platforms. Using a pre-build script would not be a scalable solution.
I would need to create a dependency between file extensions (or between modules which are edk2 library classes) using the build system.
Would you have an idea of how to do it, or if this is currently not possible and this implies modification in the build system, is there a way I could help?
Regards,
Pierre