unifdef

Remove or process conditional C preprocessor directives selectively

brewmacoslinux
Try with needOr install directly
Source

About

Selectively process conditional C preprocessor directives

Commands

unifdef

Examples

Remove all #ifdef DEBUG blocks from a C source file$ unifdef -DDEBUG input.c > output.c
Process multiple conditional symbols and show what would be removed$ unifdef -DLINUX -UWINDOWS -d input.c
Remove preprocessor directives for undefined symbol and keep code$ unifdef -UFEATURE_X source.c -o source_processed.c