sociomantic-tsunami / makd

A Make library/framework to build D projects
Boost Software License 1.0
9 stars 20 forks source link

Fix for replacing `@DFLAGS@` with build flags #112

Closed jens-mueller-sociomantic closed 6 years ago

jens-mueller-sociomantic commented 6 years ago

This change replaces the sed delimiter used for replacing the string @DFLAGS@ with the contents of $DFLAGS to use \# instead of /. This is safer because # is unlikely to be in $DFLAGS whereas / is part of most filesystem paths. An alternative is to escape any usage of / in the contents of $DFLAGS.

Fixes sociomantic-tsunami/makd#111.

leandro-lucarella-sociomantic commented 6 years ago

Mmm, the replacing is quite weak anyway, I guess it would be better to add a more robust replacing...

leandro-lucarella-sociomantic commented 6 years ago

Thanks for the PR @jens-mueller-sociomantic, but I made #113 to replace it, as this is a bug fix, it should first go to the v1.11.x branch, which is the lowest maintained branch that had the issue. But actually #111 is showing a more general weakness in the current replacement scheme, so I prefer to fix the issue for all values, not just this one, so I will use awk to replace all values (making this a bug fix for v1.10.x, the lowest maintained branch).

If you agree with this, please mark it as "duplicate of #113" and close this :)

jens-mueller-sociomantic commented 6 years ago

Duplicate of #113.