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 13 of 17 Topic 26125 of 26955
Post > Topic >>

Re: using a shell script to compile your C programs

by Antoninus Twink <nospam@[EMAIL PROTECTED] > May 9, 2008 at 12:12 PM

On  9 May 2008 at  7:49, pereges wrote:
> hello, i think this C program for generating make files on linux was
> written by you which I found by searching through archives :

To be honest, this program is a bit of a joke. Several major problems
were pointed out before, and none of them seem to be fixed in the code
below. To give just one example:

> void makeinstall(int argc, char **argv)
> {
>   printf("install:\n");
>   printf("\tcp %s /usr/local/bin\n", argv[1]);
>   putchar('\n');
> }

There should be a variable (usually called PREFIX) that lets you choose
to install somewhere other than a privileged system-wide directory.
Wherever it gets installed, it should be chmod'd to set appropriate
permissions. The right tool for installing files is (duh!) install, not
cp.

I know it's overwhelming when you first start out, but the GNU autotools
really are the gold standard in automating compilation, especially for
cross-platform deployment. It's overkill for a small project, of course,
but time spent learning about autoconf and automake is an investment for
the future.

Writing correct makefiles is far from being a trivial task, so why not
take advantage of the fact that someone else has already done it to a
highly professional standard?  Above all, relying on Heathfield to
reinvent the wheel badly is just a mistake.
 




 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 Thu Jul 24 2:50:36 CDT 2008.