1825801 Members
2292 Online
109687 Solutions
New Discussion

Re: Make command

 
SOLVED
Go to solution
Timothy P. Jackson
Valued Contributor

Make command

When using the Make command, does it actually compile the C code again? I am running a make command and it tells me that the -A option is used only with Ansi C and so the option is ignored. The code that is being brought into the make command is only object code, so why does it care if the Ansi C compiler is on the system.

Any insite on this would be greatly appreciated!

Tim
5 REPLIES 5
James R. Ferguson
Acclaimed Contributor
Solution

Re: Make command

Hi Tim:

The 'make' utility analyzes the 'makefile' contents to ascertain if any of the objects are out-of-date and need to be re-compiled and/or relinked. If so, the appropriate actions are taken.

Regards!

...JRF...

Steven Schweda
Honored Contributor

Re: Make command

> When using the Make command, does it
> actually compile the C code again? [...]

It does what the makefile tells it to do.
With my weak psychic powers, I can't see
what's in your makefile, nor what you've done
so far.

> [...] it tells me [...]

_WHO_ tells you? As usual, showing actual
commands with their actual error messages can
be more helpful than vague descriptions and
interpretations.

For starters, what is this system?

uname -a

This sounds like an attempt to use a (lame)
bundled C compiler to do some serious work,
for which it was not intended. But with
approximately no useful information, it's
hard to be sure.

> [...] so why does it care [...]

Why does _WHO_ care? If you're trying to use
C compiler options which don't exist on your
C compiler, then the compiler might care.
Dennis Handly
Acclaimed Contributor

Re: Make command

>does it actually compile the C code again?

Only if your .c files are newer than your .o files.

>why does it care if the ANSI C compiler is on the system.

The cc driver doesn't bother to use advanced AI technology to determine that the option specified would be ignored anyway. Since you didn't pay for it, the cost would be too high.

Timothy P. Jackson
Valued Contributor

Re: Make command

Thanks everyone!

I think I understand now what I am looking at.

Thanks again!

Tim
Steven Schweda
Honored Contributor

Re: Make command

> Jul 19, 2010 16:13:41 GMT 2 pts

And what would you say that the (nearly
information-free) question was worth?

By the way,

man make

explains a few basic facts about "make".