The eCos Component Writer's Guide
Prev |  | Next

# no_define

## Name

Property no_define -- Suppress the normal generation of a preprocessor #define symbol in a configuration header file.

## Synopsis

    cdl_option <name> {
        no_define
        …
    }

## Description

By default all active and enabled properties result in either one or two #define'd symbols in the package's configuration header file, and this is one of the main ways in which options can affect packages at build-time. It is possible to suppress the default #define's by specifying a no_define property in the body of an option or other CDL entity. This property takes no arguments and should occur only once in a given body.

The no_define property is frequently used in conjunction with one of the other header-file related properties such as define. If one of the other properties is used to export the required information to a configuration header file then often there is little point in exporting the default #define as well — in fact there could be a name clash. The no_define property can also be useful if the sole purpose of an option is to affect which files get built, and the default #define would never get tested in any source code. However in such cases the default #define is mostly harmless and there is little to be gained by suppressing it.

## Example

    cdl_component CYG_HAL_STARTUP {
        display       "Startup type"
        flavor        data
        legal_values  { "RAM" "ROM" }
        default_value {"RAM"}
        no_define
        define -file system.h CYG_HAL_STARTUP
        …
    }

## See Also

Properties define, define_format, define_header, define_proc and if_define.

Prev | Home | Next
make_object | Up | parent