Alexandre Julliard : makefiles: Fix expansion of '$$' in make variables.
Module: wine Branch: master Commit: 581be47a45b2c566083e543d28609708b26002e2 URL: http://source.winehq.org/git/wine.git/?a=commit;h=581be47a45b2c566083e543d28... Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Oct 26 14:39:06 2015 +0900 makefiles: Fix expansion of '$$' in make variables. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/makedep.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tools/makedep.c b/tools/makedep.c index c81a57e..3c30a0c 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -1518,23 +1518,21 @@ static char *get_expanded_make_variable( struct makefile *make, const char *name var = get_make_variable( make, p + 2 ); tmp = replace_substr( expand, p, end - p, var ? var : "" ); free( var ); + /* switch to the new string */ + p = tmp + (p - expand); + free( expand ); + expand = tmp; } else if (p[1] == '{') /* don't expand ${} variables */ { if (!(end = strchr( p + 2, '}' ))) fatal_error( "syntax error in '%s'\n", expand ); p = end + 1; - continue; } else if (p[1] == '$') { - tmp = replace_substr( expand, p, 2, "$" ); + p += 2; } else fatal_error( "syntax error in '%s'\n", expand ); - - /* switch to the new string */ - p = tmp + (p - expand); - free( expand ); - expand = tmp; } /* consider empty variables undefined */
participants (1)
-
Alexandre Julliard