How are you doing the if/then/else statement? TVF would only see the VARIABLE setting if you use tvf::svrf_var; #IFDEF doesn't see it at all. (Preprocessor directives are evaluated before the SVRF statements -- that is what makes them preprocessor.)