MakeMe File Processing

MakeMe builds targets according to a defined life cycle.

  1. The MakeMe DOM object me is created and initialized.
  2. The start.me file is read to determine which platforms to build. For each platform specified in the start.me 'platforms' collection, the following steps below are executed.
  3. The directories collection dir, and me.global properties are initialized.
  4. The os/OS.me file is loaded for the required platform to supply O/S specific rules and definitions
  5. The standard.me file is loaded to supply with the standard MakeMe definitions.
  6. The platform MakeMe file is loaded and all MakeMe files referenced in blend[] are loaded depth-first. This continues recursively, depth first.
  7. All relative paths in the target properties: includes, headers, resources, sources and files are rebased relative to the directory supplying the MakeMe file. Scripts lacking a home directory property default to the directory containing the MakeMe file.
  8. Targets are enabled or disabled depending on their enable property expression.
  9. A list of top-level targets to build is created based on the MakeMe commandline and target dependencies. See below Selecting Targets for more details.
  10. The targets to build are examined and their properties are blended with the defaults/internal properties.
  11. The target dependencies are resolved and added to the target list.
  12. The target sources have wild-cards expanded. Targets are dynamically created for all objects to be built. The C/C++ source files are parsed and header targets are built for non-system include directives that have no leading spaces. i.e. #include "filename" starting in column 0.
  13. The target is built. If the target is an executable, library, or object, it is built using the transition rules specified in me.rules. If the target has a build event script, it is run.

Selecting Targets

MakeMe follows a simple process when selecting the targets to build.

  1. The set of names specified on the MakeMe command line is used as a starting target list. If the name does not match a target name, the list of targets is search to see if the name matches any targets with a type of that name. All matching targets are added to the list. For example: this allows targets of type clean to be run when me clean is invoked.
  2. If no names are specified on the MakeMe command line, a default build is performed. A list of candidate targets to build is populated with all executables, libraries, files and scripts with a type of "build".
  3. Targets that are disabled (enable property evaluates to false) are removed from the list
  4. Targets referenced in the depends property are added to the list (recursively)
  5. Additional targets are created dynamically for source items to be compiled and include headers

To reiterate, there are thus two paradigms when invoking MakeMe:

When specifying a name that is a target, these must match the target name property. When specifying an action, these must match a target type property.

© Embedthis Software, 2003-2015. All rights reserved.