Found some clues to an answer in the source.
function.c has an EXPERIMENTAL block containing
the functions $(eq ...) and $(not ...). No $(and ...)
or $(or ...) though.
I suppose this would bring it in line with the forms
of the conditional directives.
For those familiar with function.c, how does the following
look:
/*
string-boolean and operator
*/
static char *
func_and(char* o, char **argv, char *funcname)
{
unsigned char *s;
int result = 0;
for(s = (unsigned char*)argv[0]; isspace(*s); ++s);
if(*s)
for(s = (unsigned char*)argv[1]; isspace(*s); ++s);
result = *s;
o = variable_buffer_output(o, result ? "1" : "", result);
return o;
}
/*
string-boolean or operator
*/
static char *
func_or(char* o, char **argv, char *funcname)
{
unsigned char *s;
int result = 0;
for(s = (unsigned char*)argv[0]; isspace(*s); ++s);
if(!(*s))
for(s = (unsigned char*)argv[1]; isspace(*s); ++s);
result = *s;
o = variable_buffer_output(o, result ? "1" : "", result);
return o;
}
Zartaj
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 06, 2001 9:17 AM
To: [EMAIL PROTECTED]
Subject: $(if) feature in make 3.80?
Will $(if ...) get boolean operators in make 3.80? Something like:
$(if $(eq condition1, condition2), ...)
$(if $(and condition1, condition2), ...)
etc.
I have found $(if ...) to be a very useful function. I often use it
where a conditional directive could not work. But having a
conditional without other boolean functions makes it much harder
to use.
Thanks,
Zartaj
_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make
_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make