Home > Blockchain >  GNU Make condition ifneq check at least on variable not is not empty
GNU Make condition ifneq check at least on variable not is not empty

Time:10-29

I like to check if at least on variable is not empty in a list of multiple.

for example i like to combine the following working contion into one statement:

ifneq (${VAR1},)
    ...command true for all ...
else ifneq (${V2},)
    ... same command as above...
else ifneq (${VAR3},)
    ... same command as first...
else ifneq (${V4},)
   ... same command as first...
else
    ...other command....
endif

I like to have a MAKE (not shell) condition like

ifneq (${VAR1},) || (${V2},) ||  (${VAR3},) || (${VAR3},)
   ...command true for all ...
else
   ...other command....
endif

CodePudding user response:

ifneq ($(VAR1)$(VAR2)$(VAR3),)
  • Related