Alexandre Julliard : makedep: Don't expand variable references that use ${} .

Alexandre Julliard julliard at winehq.org
Mon Jan 6 14:47:12 CST 2014


Module: wine
Branch: master
Commit: ce25c89585efc345f528a2d82b8856d84be82909
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ce25c89585efc345f528a2d82b8856d84be82909

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Sat Jan  4 20:33:57 2014 +0100

makedep: Don't expand variable references that use ${}.

---

 Make.vars.in                |    5 ++---
 dlls/appwiz.cpl/Makefile.in |    2 +-
 libs/wine/Makefile.in       |   12 ++++++------
 tools/makedep.c             |    6 ++++++
 tools/widl/Makefile.in      |    2 +-
 tools/winegcc/Makefile.in   |    6 +++---
 tools/wrc/Makefile.in       |    2 +-
 7 files changed, 20 insertions(+), 15 deletions(-)

diff --git a/Make.vars.in b/Make.vars.in
index 185e656..15ef9c0 100644
--- a/Make.vars.in
+++ b/Make.vars.in
@@ -6,12 +6,11 @@ bindir          = @bindir@
 libdir          = @libdir@
 datarootdir     = @datarootdir@
 datadir         = @datadir@
-infodir         = @infodir@
 mandir          = @mandir@
-fontdir         = $(datadir)/wine/fonts
+fontdir         = ${datadir}/wine/fonts
 includedir      = @includedir@/wine
 dlldir          = @dlldir@
-fakedlldir      = $(dlldir)/fakedlls
+fakedlldir      = ${dlldir}/fakedlls
 top_srcdir      = @top_srcdir@
 top_builddir    = @top_builddir@
 srcdir          = @srcdir@
diff --git a/dlls/appwiz.cpl/Makefile.in b/dlls/appwiz.cpl/Makefile.in
index b1c3319..4efd915 100644
--- a/dlls/appwiz.cpl/Makefile.in
+++ b/dlls/appwiz.cpl/Makefile.in
@@ -1,7 +1,7 @@
 MODULE    = appwiz.cpl
 IMPORTS   = uuid urlmon advpack comctl32 advapi32 shell32 user32 comdlg32
 DELAYIMPORTS = msi
-EXTRADEFS = -DINSTALL_DATADIR="\"$(datadir)\""
+EXTRADEFS = -DINSTALL_DATADIR="\"${datadir}\""
 
 C_SRCS = \
 	addons.c \
diff --git a/libs/wine/Makefile.in b/libs/wine/Makefile.in
index 5286e85..6b44ea4 100644
--- a/libs/wine/Makefile.in
+++ b/libs/wine/Makefile.in
@@ -1,12 +1,12 @@
 EXTRALIBS = $(LIBPORT) @LIBDL@ @COREFOUNDATIONLIB@ @CORESERVICESLIB@
 EXTRADEFS = -DWINE_UNICODE_API="" \
-	-DBINDIR='"$(bindir)"' \
-	-DDLLDIR='"$(dlldir)"' \
+	-DBINDIR='"${bindir}"' \
+	-DDLLDIR='"${dlldir}"' \
 	-DDLLPREFIX='"$(DLLPREFIX)"' \
-	-DLIB_TO_BINDIR=\"`$(MAKEDEP) -R $(libdir) $(bindir)`\" \
-	-DLIB_TO_DLLDIR=\"`$(MAKEDEP) -R $(libdir) $(dlldir)`\" \
-	-DBIN_TO_DLLDIR=\"`$(MAKEDEP) -R $(bindir) $(dlldir)`\" \
-	-DBIN_TO_DATADIR=\"`$(MAKEDEP) -R $(bindir) $(datadir)/wine`\"
+	-DLIB_TO_BINDIR=\"`$(MAKEDEP) -R ${libdir} ${bindir}`\" \
+	-DLIB_TO_DLLDIR=\"`$(MAKEDEP) -R ${libdir} ${dlldir}`\" \
+	-DBIN_TO_DLLDIR=\"`$(MAKEDEP) -R ${bindir} ${dlldir}`\" \
+	-DBIN_TO_DATADIR=\"`$(MAKEDEP) -R ${bindir} ${datadir}/wine`\"
 STATICLIB = libwine_static.a
 
 C_SRCS = \
diff --git a/tools/makedep.c b/tools/makedep.c
index f7e2865..28f60fd 100644
--- a/tools/makedep.c
+++ b/tools/makedep.c
@@ -1157,6 +1157,12 @@ static char *get_expanded_make_variable( const char *name )
             tmp = replace_substr( expand, p, end - p, var ? var : "" );
             free( var );
         }
+        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, "$" );
diff --git a/tools/widl/Makefile.in b/tools/widl/Makefile.in
index 4565f54..12d0ea3 100644
--- a/tools/widl/Makefile.in
+++ b/tools/widl/Makefile.in
@@ -19,7 +19,7 @@ C_SRCS = \
 LEX_SRCS   = parser.l
 BISON_SRCS = parser.y
 
-EXTRADEFS   = -DDEFAULT_INCLUDE_DIR=\"$(includedir)/windows/\"
+EXTRADEFS   = -DDEFAULT_INCLUDE_DIR=\"${includedir}/windows/\"
 
 @MAKE_RULES@
 
diff --git a/tools/winegcc/Makefile.in b/tools/winegcc/Makefile.in
index 6b72211..7c0c71c 100644
--- a/tools/winegcc/Makefile.in
+++ b/tools/winegcc/Makefile.in
@@ -1,7 +1,7 @@
 EXTRADEFS = \
-	-DINCLUDEDIR="\"$(includedir)\"" \
-	-DDLLDIR="\"$(dlldir)\"" \
-	-DLIBDIR="\"$(libdir)\"" \
+	-DINCLUDEDIR="\"${includedir}\"" \
+	-DDLLDIR="\"${dlldir}\"" \
+	-DLIBDIR="\"${libdir}\"" \
 	-DCC="\"$(CC)\"" \
 	-DCPP="\"@CPPBIN@\"" \
 	-DCXX="\"@CXX@\"" \
diff --git a/tools/wrc/Makefile.in b/tools/wrc/Makefile.in
index 9d956b8..2b7a3f4 100644
--- a/tools/wrc/Makefile.in
+++ b/tools/wrc/Makefile.in
@@ -1,4 +1,4 @@
-EXTRADEFS = -DINCLUDEDIR="\"$(includedir)\""
+EXTRADEFS = -DINCLUDEDIR="\"${includedir}\""
 PROGRAMS = wrc$(EXEEXT)
 MANPAGES = wrc.man.in
 ALL_LIBS = @LIBGETTEXTPO@ $(LIBWPP) $(LIBWINE_STATIC) $(LIBPORT)




More information about the wine-cvs mailing list