JeffS <[email protected]> writes:
> My question: since $@  (apparently) expands to sms , shouldn't the
> "true" branch of the ifeq  conditional be executed (with the
> consequence that the output should read yep, they are equal)? [I am at
> a loss as to why the output is no, they are not equal.]

The ifeq conditional was evaluated long before the make recipe is.  If
you want to have a conditional in a recipe that uses automatic
variables, use the $(if ...) function.  

For your use case, it may help to have a utility function to do the
string comparison.

$(targets):
        echo current target is $@
        echo $(if $(call eq,$@,sms),yep they are equal,nope they're not equal)

    --jtc

-- 
J.T. Conklin

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

Reply via email to