On Wed, Apr 30, 2014 at 08:29:30AM -0300, Fernando de Oliveira wrote: > Em 30-04-2014 02:47, Bruce Dubbs escreveu: > > Ken Moffat wrote: > > > > Just a comment here, but isn't something run in $( ) done in a subshell? > > If so, the the assignment to the variable goes away when the subshell > > terminates. > > Yes, that was my first thought. > > Running: > > > > $ cat x.sh > > #!/bin/bash > > $(x=1) > > echo $x > > #EOF > > > > Returns a blank line. > > > > I think you want: > > > > NSS_USE_SYSTEM_SQLITE=$([ -f /usr/include/sqlite3.h ] && echo 1) > > > > or similar. > > > > -- Bruce > > > > I don't remember when this was introduced, by whom, but I think it has > been there for more than a year. I am not stating that the book is > right, but it seems to be. > > Last time or one of the last times I updated nss in the book, I did test > the command, but in a 32 system. Now I tested and inspected my 64bit system. > > Grepping the logs, I do have in may LFS-7.3 (only 64bit I have): > > $ cat /etc/lfs-release > SVN-20130512 > > ... -L../../../dist/Linux3.10_x86_64_glibc_PTH_64_OPT.OBJ/lib -lsqlite3 ... > > and similar in my older and newer 32bit machines. > > Also, I did the following test: > > $ echo $([ $(uname -m) = x86_64 ] && echo USE_64=1) \ > $([ -f /usr/include/sqlite3.h ] && echo NSS_USE_SYSTEM_SQLITE=1) > USE_64=1 NSS_USE_SYSTEM_SQLITE=1 > > So I assume that replacing echo by make would produce the same result. > > Again, I am not defending that the book should stay as is, but am trying > to understand if my arguments are wrong. If they are right, I also would > like to understand what is happing in your case, ĸen. > Heh, I've just got back to this (fun and games with ff-29 on LFS-7.2, fixed by using system icu). I too have just tried manually running the command, but replacing 'make' with a script to show $* and everything looks fine : $./showargs BUILD_OPT=1 \ > NSPR_INCLUDE_DIR=/usr/include/nspr \ > USE_SYSTEM_ZLIB=1 \ > ZLIB_LIBS=-lz \ > $([ $(uname -m) = x86_64 ] && echo USE_64=1) \ > $([ -f /usr/include/sqlite3.h ] && echo NSS_USE_SYSTEM_SQLITE=1) > -j1 called with: BUILD_OPT=1 NSPR_INCLUDE_DIR=/usr/include/nspr USE_SYSTEM_ZLIB=1 ZLIB_LIBS=-lz USE_64=1 NSS_USE_SYSTEM_SQLITE=1 -j1
So I've no idea. Maybe it is me. ĸen -- das eine Mal als Tragödie, dieses Mal als Farce -- http://lists.linuxfromscratch.org/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
