[Libclc-dev] Ninja build is broken
Daniel Liew
daniel.liew at imperial.ac.uk
Fri Jan 17 10:26:21 PST 2014
Hi All,
I was just playing around to see if building libclc with Ninja works
and it's broken. It appears this is due to the $(DESTDIR) that appears
in the install command.
$ ./configure.py -g ninja
$ ninja
ninja: error: build.ninja:197: bad $-escape (literal $ must be written as $$)
command = mkdir -p $(DESTDIR)//usr/local/lib/clc && cp -r $
^ near here
The trouble is I don't think there is anyway to have $(DESTDIR) work
because AFAIK you can't pass variable assignments to Ninja.
I also tried escaping the '$' and changing the $() to a ${} so that
${DESTDIR} is passed to the shell, i.e. in build.ninja
rule install
command = mkdir -p $${DESTDIR}//usr/local/lib/clc && cp -r $
built_libs/nvptx--bugle.bc $${DESTDIR}//usr/local/lib/clc && mkdir -p $
$${DESTDIR}//usr/local/include && cp -r ./generic/include/clc $
$${DESTDIR}//usr/local/include && mkdir -p $
$${DESTDIR}//usr/local/share/pkgconfig && cp -r libclc.pc $
$${DESTDIR}//usr/local/share/pkgconfig
description = INSTALL
and then trying to run:
$ DESTDIR=xxx ninja install
but the environment variable is not being expanded by the shell (I
confirmed that the variable was in the shell environment by adding "
env & " to the beginning the of the install command).
Any thoughts?
Thanks,
Dan.
More information about the Libclc-dev
mailing list