1.11M Members

Passing variables to a makefile

 
0
 

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

 
0
 

You can use an environment variable:

$cat Makefile

something:
        @echo ${MY_VAR}

Then you can do something like:

$ MY_VAR="DATA" make
DATA
$
You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: