Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C > Re: using a she...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 17 of 17 Topic 26125 of 26977
Post > Topic >>

Re: using a shell script to compile your C programs

by Bart <bc@[EMAIL PROTECTED] > May 9, 2008 at 06:04 AM

On May 9, 8:10=A0am, pereges <Brol...@[EMAIL PROTECTED]
> wrote:
> Do you see anything wrong about this method ? For eg. I write a shell
> script a.sh containing :
>
> cc -o test file1.c file2.c file3.c
>
> and then execute the shell script ( sh a.sh) to compile and create the
> executable. What is the difference between this method and writing a
> make file ?

I find it fairly impossible to use either modern IDEs at one end of
the scale and makefiles at the other.

I use a simple utility, which I suppose could called be called a mini
IDE (to glorify it a little), which is given a project file like the
following (as set up for your program in the other thread):

module test.c
module bbox.c
module common.c
module radar.c
module raydetect.c
module raytrace.c
module raytriangle.c
module reader.c
module reflection.c

file bbox.h
file common.h
file radar.h
file raydetect.h
file raytrace.h
file raytriangle.h
file reader.h
file reflection.h

The utility shows a list of these files/modules and uses cursor keys
to highlight one or the other. Then, you have this extensive list of
commands:

Enter Edit (can use any editor)
C     Compile
L     Link
R     Run
CA    Compile all

Plus a few combinations of the above (this is really cutting edge...).

Point: this sort of thing really can be kept fairly simple. Of course
you need to write such an utility first.

If I didn't have this and had to use shell commands only, I'd probably
still end up with something similar by building a set of short,
dedicated .bat files (or whatever they might be called on your system)
that minimises typing.

--
Bartc
 




 17 Posts in Topic:
using a shell script to compile your C programs
pereges <Broli00@[EMAI  2008-05-09 00:10:09 
Re: using a shell script to compile your C programs
"Joachim Schmitz&quo  2008-05-09 09:14:45 
Re: using a shell script to compile your C programs
Spiros Bousbouras <spi  2008-05-09 00:21:25 
Re: using a shell script to compile your C programs
"Default User"   2008-05-09 17:44:58 
Re: using a shell script to compile your C programs
Richard Heathfield <rj  2008-05-09 07:37:22 
Re: using a shell script to compile your C programs
"Dan" <voids  2008-05-09 17:37:58 
Re: using a shell script to compile your C programs
Spiros Bousbouras <spi  2008-05-09 00:39:30 
Re: using a shell script to compile your C programs
pereges <Broli00@[EMAI  2008-05-09 00:49:32 
Re: using a shell script to compile your C programs
Richard Heathfield <rj  2008-05-09 08:28:56 
Re: using a shell script to compile your C programs
"Joachim Schmitz&quo  2008-05-09 12:33:07 
Re: using a shell script to compile your C programs
pereges <Broli00@[EMAI  2008-05-09 00:56:56 
Re: using a shell script to compile your C programs
Eligiusz Narutowicz<el  2008-05-09 11:50:17 
Re: using a shell script to compile your C programs
Antoninus Twink <nospa  2008-05-09 12:12:35 
Re: using a shell script to compile your C programs
"Joachim Schmitz&quo  2008-05-09 12:52:42 
Re: using a shell script to compile your C programs
pereges <Broli00@[EMAI  2008-05-09 04:16:40 
Re: using a shell script to compile your C programs
"Joachim Schmitz&quo  2008-05-09 13:26:47 
Re: using a shell script to compile your C programs
Bart <bc@[EMAIL PROTEC  2008-05-09 06:04:02 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 3:53:42 CDT 2008.