File: gcclab

package info (click to toggle)
gcl 2.6.14-19
  • links: PTS
  • area: main
  • in suites: trixie
  • size: 60,804 kB
  • sloc: ansic: 177,407; lisp: 151,508; asm: 128,169; sh: 22,510; cpp: 11,923; tcl: 3,181; perl: 2,930; makefile: 2,360; sed: 334; yacc: 226; lex: 95; awk: 30; fortran: 24; csh: 23
file content (29 lines) | stat: -rwxr-xr-x 419 bytes parent folder | download | duplicates (19)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh
TEMP=/tmp/gcc$$tmp
BIL="$@"

while [ $# -gt 0 ]
do
	case "$1" in
	-S)
		Sflag=1;;
        -o)
	        OUT=$2; shift ;;  
  
         *.c)
 		FILE=$1;;
	esac
	shift
done

FILE=`echo "${FILE}" | sed -e 's:\.c$::g'`
gcc -o ${TEMP}.s ${BIL} -S
cat ${TEMP}.s | awk -f gcclab.awk > ${TEMP}1.s

if [ "${Sflag}" = "1" ] ; then
  mv ${TEMP}1.s ${FILE}.s
else
as -o ${FILE}.o ${TEMP}1.s
fi
rm -f ${TEMP}.s ${TEMP}1.s