Commit 6e3c5adc authored by malenov's avatar malenov
Browse files

filter LC3plus defines to be included in options.h

parent 5d5400b4
Loading
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -96,12 +96,21 @@ if [ $INCLUDE_SPLIT -eq 1 ]; then
            sed '/#define DEFINES_H/ d'
    )
    
    lc3plus_defines_filtered=""
    while IFS=' \n' read -r line;
    do
       line=`echo $line | tr -d '\n'`
       if grep -wqF "$line" "$targetdir/lib_lc3plus/defines.h"; then
           lc3plus_defines_filtered+=$line$'\n'
       fi
    done <<< $lc3plus_defines    

    # Append LC3plus defines to options.h
    echo "
/* LC3plus switches */
#ifndef OPTIONS_H_LC3_DEFINES
#define OPTIONS_H_LC3_DEFINES
$lc3plus_defines
$lc3plus_defines_filtered
#endif /* OPTIONS_H_LC3_DEFINES */
" >>$targetdir/lib_com/options.h
fi