move_macros

Change prefix in macros

Description:

This transformation allows to modify the prefix of macros.

The motivation for this transformation is to help move whole libraries or source sets from one naming conventioin to another.

Please use this transformation as a boilerplate for your own customized version.

For example, the following file:

#define BOOST_SOME_MACRO 1
// ...
#ifdef BOOST_SOME_MACRO
// ...
#endif

will be transformed into:

#define BOOM_SOME_MACRO 1
// ...
#ifdef BOOM_SOME_MACRO
// ...
#endif

Note: This transformation actually does not check whether the given identifier is indeed a macro name and the prefix replacement is performed systematically on all identifiers that match.

Note: The transformation is performed in place, which means that the source files are modified.

Transformation index