On Sun, Mar 30, 2008 at 07:52:02PM +0100, Juergen Kilb wrote: > attached is a patch against SVN revison 7889. > > I had problems with the openssl rule and found out, that the THUD > variable was not set. The reason was the 'ifneq' statement which > should set THUD.
Are you sure? Because it works here. It may happen that you'll have to run 'ptxdist platformconfig' again and just save the result; we have recently added support for strange platforms like blackfin that need different toolchains for u-boot, kernel and userland; if you run the command above, the corresponding variables should be set magically. > "ifneq ($(and $(PTXCONF_ARCH_ARM),$(PTXCONF_ENDIAN_LITTLE)),)" > > Let's say PTXCONF_ARCH_ARM and PTXCONF_ENDIAN_LITTLE is 'y' > > so it is expanded to > "ifneq ($(and y,y),)" > > "and y,y" will return y and $y is expanded to 'nothing' so 'nothing' is equal > to 'nothing' and THUD is not set. Please check "info automake": `$(and CONDITION1[,CONDITION2[,CONDITION3...]])' The `and' function provides a "short-circuiting" AND operation. Each argument is expanded, in order. If an argument expands to an empty string the processing stops and the result of the expansion is the empty string. If all arguments expand to a non-empty string then the result of the expansion is the expansion of the last argument. So the arguments are expanded as you described, the $(and) function expands to the expansion of the last argument (y), which is != nothing. Should be right. Stand alone example: [EMAIL PROTECTED]:~$ cat Makefile BAZ=$(and $(FOO),$(BAR)) all: @echo $(BAZ) [EMAIL PROTECTED]:~$ make FOO= BAR= [EMAIL PROTECTED]:~$ make FOO=y BAR= [EMAIL PROTECTED]:~$ make FOO= BAR=y [EMAIL PROTECTED]:~$ make FOO=y BAR=y y Q.E.D. Robert -- Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de Pengutronix - Linux Solutions for Science and Industry Handelsregister: Amtsgericht Hildesheim, HRA 2686 Hannoversche Str. 2, 31134 Hildesheim, Germany Phone: +49-5121-206917-0 | Fax: +49-5121-206917-9 -- ptxdist mailing list ptxdist@pengutronix.de