Hi all,

I would like to call a makefile with a particular variable and value so that the variable is used to make decisions inside the makefile.

Thanks

You can use an environment variable:

$cat Makefile

something:
        @echo ${MY_VAR}

Then you can do something like:

$ MY_VAR="DATA" make
DATA
$
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.