On Sun, Aug 28, 2016 at 11:04:51AM -0700, Sterling Hughes wrote:
> As a resolution, can we quote these values and have this behavior obeyed?  

I'm afraid not.  If the two tokens are quoted, they are interpreted as a
single yaml string (good).  The viper library then splits the string
into separate tokens (bad).  Double-quoting the cflag doesn't work
either; in fact it breaks the build process.  When I build the following
target:

    ### Package: targets/test-sim
    pkg.name: "targets/test-sim"
    pkg.type: "target"
    pkg.description:
    pkg.author:
    pkg.homepage:

    pkg.cflags:
        - "'-I /tmp'"

The two tokens still get split on the command line as follows:

2016/08/28 11:42:51 [DEBUG] gcc -c -o 
/home/ccollins/repos/mynewt/core/bin/targets/test-sim/app/fs/nffs/nffs_gc.o 
nffs_gc.c '-I DAPP_NAME="test" -DARCH_sim -DBSP_NAME="native" -DFEATURE_FCB 
-DFEATURE_FS -DFEATURE_NFFS -DFEATURE_TEST -DMN_LINUX -O0 -Wall -Werror -ggdb 
-m32 /tmp' -I/home/ccollins/repos/mynewt/core/apps/

That is, each inner quote "sticks" to its adjacent token.

I don't see any way around this, short of modifying Viper.

Specifying an include path as a target cflag seems like an unusual thing
to do.  Is there a likely scenario where someone would do this?

Chris

Reply via email to