Antoninus Twink wrote:
> 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
RH already said that is rather primitive
> 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.
Nope. No such command in POSIX, so mit mai not be available.
The PREFIX and chmod stuff could easily be added though
> 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.
More than a decade ago we had to the same thing (defelop a makefile
generator) as there were enough members in the team who coudn't be
bothered
to learn how to write makefiles. Not to speak of configuring the much more
complex automake...
Bye, Jojo


|