Hi all..

I've got the following snippet which works for the most part...
*** lines wrapped below for email ***

%.o : %.cc
        $(target_gpp) -MMD $(GPPFLAGS) \
               $(and $(findstring
"COVERAGE_ON",${extra_define}),"1",${COVERAGE_FLAGS}) \
               -c $< -o $@

when I issue a make like the following :

% make extra_define=-DCOVERAGE_ON clean all

Here's some output from "-p" after running make..
# command line
extra_define = -DCOVERAGE_ON

The line starting with $(and .. ) is the problem and I would assume that
if I
issue a "-p" on the make line and see it showing up in the output as a
command
line variable, that the above would work.. However, the logic appears to
indicate
that it is in fact not set so the 'and' fails and adds nothing to the
compile line..
For completeness, I'll state that the "1" as the 2nd argument to $(and) is
a placeholder
for some additional logic that does in fact work just fine.. Here are a
few more
statements for completeness :

COVERAGE_FLAGS = -fprofile-arcs -ftest-coverage

Any ideas why Make (3.81 BTW) does not see that "extra_define" is set?  I
use the
same sort of $(findstring..) used elsewhere for $(if) statements and they
work just
fine.. Just not with the $(and) above.. 

-- Rick






_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to