Add trivial script to separate preproc of compilation for debug
This commit is contained in:
1 parent
4cafe4dce1
commit
c3f6e3c5f0
1 file changed
+16
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
mkdir -p /tmp/prepro-$USER
|
||||
name=/tmp/prepro-$USER/$$.c
|
||||
param1=""
|
||||
param2=""
|
||||
while test $# -gt 0 ; do
|
||||
case $1 in
|
||||
-c) param2="$param2 -c" ;;
|
||||
*\.c) param1="$param1 $1" ;;
|
||||
*) param1="$param1 $1" ; param2="$param2 $1" ;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
cc $param1 -E |grep -v '^#' > ${name} \
|
||||
&& perl -i -e 's/;/;\n/g' ${name} \
|
||||
&& cc $param2 ${name}
|
||||
Reference in new issue
Block a user