[TxMt] C Compile and Build Commands

Mark Cotner mark.cotner at gmail.com
Fri Jan 20 03:13:27 UTC 2006


This will build in the current directory minus the .c extension.

TM_FILENAME_BASE=`echo $TM_FILENAME | cut -d\. -f1`
#echo Base Filename: "$TM_FILENAME_BASE"

echo '<pre>'
cd "$TM_DIRECTORY"
cc -I. -o "$TM_FILENAME_BASE" "$TM_FILENAME"
if (($? >= 1)); then exit; else echo "build successful"; fi
echo '</pre>'

# cc must be in your path, if you've installed OS X gcc package you should
be fine

This will build and run the file your working on and display the output.
The object file is filename minus the .c extension.
TM_FILENAME_BASE=`echo $TM_FILENAME | cut -d\. -f1`
#echo Base Filename: "$TM_FILENAME_BASE"

echo '<pre>'
cd "$TM_DIRECTORY"
cc -I. -o "$TM_FILENAME_BASE" "$TM_FILENAME"
if (($? >= 1)); then exit; fi
./"${TM_FILENAME_BASE}"
echo '</pre>'

# cc must be in your path, if you've installed OS X gcc package you should
be fine

'njoy,
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20060119/099391b6/attachment.html>


More information about the textmate mailing list