Hey everyone,
I found a very strange behaviour in `ifeq` and `ifneq`. Consider we have
the following snippet:
arch = @(TUP_ARCH)
ARCH = $(CONFIG_TUP_ARCH)
ifneq ($(arch), $(ARCH))
error 'arch' and 'ARCH' should be the same
else
: |> printf "Config-consts are matching: $(arch), $(ARCH)\n" |>
endif
What should the expected output be?
1. `@(TUP_ARCH)` and `$(CONFIG_TUP_ARCH)` should be the same
"In other words, $(CONFIG_FOO) and @(FOO) are interchangeable." -- from
http://gittup.org/tup/manual.html
2. `ifneq` will compare the lval and rval after evaluation and
string-compare them => if they are the same the execution will jump to the `
else` clause, if not, it will raise the error.
So I expect it will print "Config-consts are matching: x86_64, x86_64", but
instead it will raise the defined error.
If I switch from `ifneq` to `ifeq`, the executaion will jump to the `else`
branch, and will print "Config-consts are matching: x86_64, x86_64", which
is silly, as the `else` should be executed when the lval and rval are not
the same, however the printed message shows that they are..
What causes this problem and why? Am I missing something?
(tup version: 0.7.3)
Cheers,
P
--
--
tup-users mailing list
email: [email protected]
unsubscribe: [email protected]
options: http://groups.google.com/group/tup-users?hl=en
---
You received this message because you are subscribed to the Google Groups
"tup-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.