[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


From: Sebastian Glita
Subject: make
Date: Mon, 25 Mar 2002 13:12:18 +0200

    I have a problem with "transporting" dollar sign through multiple
function calls.
    I have attached a tar'ed gzip'ed example.
    The correct output (action) of `make' should be (when `case'=default):
cc  -DX='"$"'    a.c   -o a
but surprisingly, it goes like this:
cc  -DX='""'    a.c   -o a
    I took a *little* time to debug what `make' was doing, and I came up
with the following question:
    When using the builtin `call' function, why are the `define_variable'd
$(1) ... $(N) automatic variables *recursive* ? Since their values are
previously obtained from expanding the actual parameters, recursively
expanding their values when encountered has no extra effect, except to
divide the number of consecutively pairs of `$'s ! Do I presume right ?
    I changed the last argument for `define_variable' in `function.c'
file in the function:
static char *
func_call (o, argv, funcname)
     char *o;
     char **argv;
     const char *funcname;
from 1 to 0.
    It works well now !
    I have a `K7 Athlon' running `Red Hat Linux 7.2' machine.
This is the output of `make --version':
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for i686-pc-linux-gnu
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
        Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
Report bugs to <address@hidden>.
Sebastian Glita
Computer Science Faculty

Attachment: bug.tgz
Description: application/compressed

reply via email to

[Prev in Thread] Current Thread [Next in Thread]