preprocess_target.txt 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. The PREPROCESS global target is available for use in core builds.
  2. When specified, rather than performing a build, Raptor uses the compilers that
  3. would normally be invoked in the build to generate preprocessed versions of
  4. a component's source files. These files are generated into the source tree
  5. alongside the source files themselves, and have filenames that are
  6. appropriately tagged based on the configurations used. No further build is
  7. performed. The general format of the generated filenames is as follows:
  8. source_filename.build_platform.build_variant.target_name.pre
  9. An example, based on the build of a helloworld.exe component using the default
  10. winscw and armv5 configurations:
  11. G:\HelloWorld>dir /b
  12. bld.inf
  13. HelloWorld.cpp
  14. HelloWorld.mmp
  15. G:\HelloWorld>sbs preprocess
  16. G:\HelloWorld>dir /b
  17. bld.inf
  18. HelloWorld.cpp
  19. HelloWorld.cpp.armv5.udeb.helloworld.exe.pre
  20. HelloWorld.cpp.armv5.urel.helloworld.exe.pre
  21. HelloWorld.cpp.winscw.udeb.helloworld.exe.pre
  22. HelloWorld.cpp.winscw.urel.helloworld.exe.pre
  23. HelloWorld.mmp
  24. The PREPROCESS target currently works for files listed in .mmp files using
  25. SOURCE and that would, in normal build operation, be compiled for e32 and
  26. emulator configurations; .pre files represent what would be compiled for the
  27. processed configurations in an actual build by the compilers used.
  28. Notes:
  29. * The PREPROCESS target assumes that source dependencies are satisfied,
  30. therefore would typically be used "post-normal build" where the build itself
  31. generates source that is used in compilation.
  32. * As this is primarily a developer aid, .pre files are not reported as
  33. releasable output. However, they are removed in clean operations if the
  34. PREPROCESS target is used.
  35. * For configurations where PREPROCESS is not currently supported, it will
  36. simply do nothing.
  37. * TARGET name is used in generated filenames in order to support distinct
  38. preprocessor output for source files that are built from more than one .mmp
  39. file.