Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to compile Boost with some specific options (eg: using zlib from its latest source)

So I try next bash code like:

WD=`pwd`
#//...
cd $BOOST_ROOT_DIR

echo_run ./bootstrap.sh
#// problem with \"$WD/$ZLIB_ROOT_DIR\"
echo_run ./b2 -j4 -d0 debug release --toolset=gcc --with-thread --with-system --with-filesystem --with-program_options --with-regex --with-date_time --with-iostreams -sZLIB_SOURCE=\"$WD/$ZLIB_ROOT_DIR\"   link=static runtime-link=static --prefix=./$BOOST_INSTALL_SUBDIR install
echo Done!

But I get next outputfrom b2:

./b2 -j4 -d0 debug release --toolset=gcc --with-thread --with-system --with-filesystem --with-program_options --with-regex --with-date_time --with-iostreams -sZLIB_SOURCE="/home/tim/Рабочий стол/mask-viewer-standalone/MaskLoader/zlib_libraries" link=static runtime-link=static --prefix=./install-dir install
notice: could not find main target стол/mask-viewer-standalone/MaskLoader/zlib_libraries"
notice: assuming it is a name of file to create.

Which is preatty scarry!( (стол is part of russian Ubuntu translation of Desctop - Рабочий стол)

So I wonder - what I do wrong - how to make b2 friend of paths with spaces?

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

You can quote the shell variables like: -sZLIB_SOURCE="$WD"/"$ZLIB_ROOT_DIR". Do not escape the quotes.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.