[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: $(if) feature in make 3.80?
From: |
zartaj . majeed |
Subject: |
RE: $(if) feature in make 3.80? |
Date: |
Fri, 6 Apr 2001 11:40:46 -0700 |
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: address@hidden [mailto:address@hidden
Sent: Friday, April 06, 2001 9:17 AM
To: address@hidden
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
address@hidden
http://mail.gnu.org/mailman/listinfo/help-make