orocos-toolchain / orogen

Code generator for components and type handling in Rock - the Robot Construction Kit - and the Orocos Toolchain
http://rock-robotics.org
Other
4 stars 35 forks source link

Recude redundant flags pkgconfig files #91

Closed 2maz closed 7 years ago

2maz commented 7 years ago

Trying to clean the autogenerated pkgconfig files a bit, since the pc files generated by orogen currently contain redundant flags and also quoted flags (is there really a need for the quoting?)

doudou commented 7 years ago

is there really a need for the quoting?

As far as I can see, the quoting is needed or we may end up with wrong cflags in cases where spaces are used in e.g. paths. The flag lines are parsed as shell strings.

2maz commented 7 years ago

That will require fixing Utilrb::PkgConfig.cflags in general, since it does not account for quoting. Still, I will leave that change out (while bringing in the change from cflags to raw_cflags)

doudou commented 7 years ago

That will require fixing Utilrb::PkgConfig.cflags in general, since it does not account for quoting.

You sure about that ? It uses Shellwords which should handle quoting properly.

2maz commented 7 years ago

I did check. The splitting is working and raw_flags is containing the correctly split list, but then the concatenation for generating cflags is done using join(" ") -- not taking into account any quoting.

doudou commented 7 years ago

That will require fixing Utilrb::PkgConfig.cflags in general, since it does not account for quoting. Still, I will leave that change out (while bringing in the change from cflags to raw_cflags)

#cflags historically returned a string. #raw_cflags was introduced to provide a direct access to the array without changing #cflags. Same for the other accessors.

2maz commented 7 years ago

updated