Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Gnu make question (@CC@)

8 views
Skip to first unread message

James

unread,
Jun 2, 2017, 5:40:58 PM6/2/17
to
What does this mean?

CC = @CC@

TIA
James

Kaz Kylheku

unread,
Jun 2, 2017, 6:03:32 PM6/2/17
to
On 2017-06-02, James <hsle...@yahoo.com> wrote:
> What does this mean?
>
> CC = @CC@

That syntax occurs in .in template files in Autoconf projects.

It indicates a variable substitution, which is performed using sed.

You might see the above in a "Makefile.in" which gets filtered to
"Makefile", in which the @CC@ is replaced with something.

The substitution is performed with sed, because it's a minimal
dependency. A more fancy template-based generation tool could be used
for this task, but then the configure script would be depending on such a
tool being installed.

The double ended delimiting @CC@ allows for some variables to be prefixes
of other variables. If it was just @CC, then there would be an ambiguity
between a pair of variables like, say, @CC and @CCACHE which would
substantially complicate the sed job compared to just
"sed -e 's/@CC@/whatever/g' ..."
0 new messages