|
|
|
@ -8,10 +8,14 @@ format:
|
|
|
|
|
# Remove trailing whitespaces
|
|
|
|
|
find ./source -type f -iname '*.[cpp\|c\|h]' -exec sed -i 's/ *$$//' {} \;
|
|
|
|
|
|
|
|
|
|
preprocess:
|
|
|
|
|
preprocess: preprocess_restore
|
|
|
|
|
cp ./source/m3_exec.h ./source/m3_exec.h.bak
|
|
|
|
|
cp ./source/m3_compile.c ./source/m3_compile.c.bak
|
|
|
|
|
awk 'BEGIN {RS=""}{gsub(/\\\n/,"\\\n__NL__ ")}1' ./source/m3_exec.h | sponge ./source/m3_exec.h
|
|
|
|
|
cpp -P ./source/m3_compile.c | sponge ./source/m3_compile.c
|
|
|
|
|
awk '{gsub(/__NL__/,"\n")}1' ./source/m3_compile.c | sponge ./source/m3_compile.c
|
|
|
|
|
mv ./source/m3_exec.h.bak ./source/m3_exec.h
|
|
|
|
|
|
|
|
|
|
preprocess_restore:
|
|
|
|
|
-mv source/m3_compile.c.bak source/m3_compile.c
|
|
|
|
|
|
|
|
|
|