Alexandre Julliard : makefiles: Generate dependencies for symlinks that are needed at build time.

Alexandre Julliard julliard at winehq.org
Tue Sep 24 03:22:00 CDT 2013


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Sep 23 12:52:14 2013 +0200

makefiles: Generate dependencies for symlinks that are needed at build time.

---

 Makefile.in  |    2 --
 aclocal.m4   |   29 ++++++++++++++++++++---------
 configure    |   29 ++++++++++++++---------------
 configure.ac |   17 +++++++----------
 4 files changed, 41 insertions(+), 36 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index 72161fc..a07abd2 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -77,8 +77,6 @@ tools/wmc tools/wrc: tools
 tools tools/wmc tools/wrc: libs/wine
 tools/widl tools/wmc tools/wrc: libs/wpp
 
-dlls/shell32/Makefile dlls/shell32/__depend__: dlls/shell32/AUTHORS
-
 $(MAKEDEP): include/config.h
 	@cd $(TOOLSDIR)/tools && $(MAKE) makedep$(TOOLSEXT)
 
diff --git a/aclocal.m4 b/aclocal.m4
index 08ba797..1e1bece 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -599,12 +599,20 @@ distclean::
 
 wine_fn_config_symlink ()
 {
-    ac_link=$[1]
+    ac_linkdir=
+    if test "x$[1]" = "x-d"
+    then
+        ac_linkdir=$[2]
+        shift; shift
+    fi
+    ac_links=$[@]
     wine_fn_append_rule ALL_MAKEFILE_DEPENDS \
-"$ac_link:
-	@./config.status $ac_link
+"$ac_links:
+	@./config.status \$[@]
 distclean::
-	\$(RM) $ac_link"
+	\$(RM) $ac_links"
+    test -n "$ac_linkdir" || return
+    wine_fn_append_rule ALL_MAKEFILE_DEPENDS "$ac_linkdir/Makefile $ac_linkdir/__depend__: $ac_links"
 }
 
 if test "x$CROSSTEST_DISABLE" != x
@@ -635,13 +643,16 @@ AC_DEFUN([WINE_CONFIG_EXTRA_DIR],
 
 dnl **** Create symlinks from config.status ****
 dnl
-dnl Usage: WINE_CONFIG_SYMLINK(name,target,enable)
+dnl Usage: WINE_CONFIG_SYMLINK(target,src,files,enable,srcfile)
 dnl
 AC_DEFUN([WINE_CONFIG_SYMLINK],[AC_REQUIRE([WINE_CONFIG_HELPERS])dnl
-m4_ifval([$3],[if test "x$[$3]" != xno; then
-])AC_CONFIG_LINKS([$1:]m4_default([$2],[$1]))dnl
-m4_if([$2],,[test "$srcdir" = "." || ])wine_fn_config_symlink $1[]m4_ifval([$3],[
-fi])])
+m4_ifval([$4],[if test "x$[$4]" != xno; then
+])m4_foreach([f],[$3],
+[AC_CONFIG_LINKS(m4_ifval([$1],[$1/])f[:]m4_ifval([$2],[$2/])m4_ifval([$5],[$5],f))])dnl
+m4_if([$1],[$2],[test "$srcdir" = "." || ])dnl
+wine_fn_config_symlink[]m4_if([$1],[$2],,m4_ifval([$1],[ -d $1]))[]m4_foreach([f],[$3],[ ]m4_ifval([$1],[$1/])f)m4_ifval([$4],[
+fi])[]dnl
+])])
 
 dnl **** Create a make rules file from config.status ****
 dnl
diff --git a/configure b/configure
index a2f8e22..7cbe217 100755
--- a/configure
+++ b/configure
@@ -15830,12 +15830,20 @@ distclean::
 
 wine_fn_config_symlink ()
 {
-    ac_link=$1
+    ac_linkdir=
+    if test "x$1" = "x-d"
+    then
+        ac_linkdir=$2
+        shift; shift
+    fi
+    ac_links=$@
     wine_fn_append_rule ALL_MAKEFILE_DEPENDS \
-"$ac_link:
-	@./config.status $ac_link
+"$ac_links:
+	@./config.status \$@
 distclean::
-	\$(RM) $ac_link"
+	\$(RM) $ac_links"
+    test -n "$ac_linkdir" || return
+    wine_fn_append_rule ALL_MAKEFILE_DEPENDS "$ac_linkdir/Makefile $ac_linkdir/__depend__: $ac_links"
 }
 
 if test "x$CROSSTEST_DISABLE" != x
@@ -15845,24 +15853,15 @@ then
 	@echo \"crosstest is not supported (mingw not installed?)\" && false"
 fi
 ac_config_links="$ac_config_links dlls/shell32/AUTHORS:AUTHORS"
-wine_fn_config_symlink dlls/shell32/AUTHORS
+wine_fn_config_symlink -d dlls/shell32 dlls/shell32/AUTHORS
 ac_config_links="$ac_config_links dlls/wineps.drv/generic.ppd:dlls/wineps.drv/generic.ppd"
 test "$srcdir" = "." || wine_fn_config_symlink dlls/wineps.drv/generic.ppd
 if test "x$enable_fonts" != xno; then
 ac_config_links="$ac_config_links fonts/marlett.ttf:fonts/marlett.ttf"
-test "$srcdir" = "." || wine_fn_config_symlink fonts/marlett.ttf
-fi
-if test "x$enable_fonts" != xno; then
 ac_config_links="$ac_config_links fonts/symbol.ttf:fonts/symbol.ttf"
-test "$srcdir" = "." || wine_fn_config_symlink fonts/symbol.ttf
-fi
-if test "x$enable_fonts" != xno; then
 ac_config_links="$ac_config_links fonts/tahoma.ttf:fonts/tahoma.ttf"
-test "$srcdir" = "." || wine_fn_config_symlink fonts/tahoma.ttf
-fi
-if test "x$enable_fonts" != xno; then
 ac_config_links="$ac_config_links fonts/tahomabd.ttf:fonts/tahomabd.ttf"
-test "$srcdir" = "." || wine_fn_config_symlink fonts/tahomabd.ttf
+test "$srcdir" = "." || wine_fn_config_symlink fonts/marlett.ttf fonts/symbol.ttf fonts/tahoma.ttf fonts/tahomabd.ttf
 fi
 ac_config_links="$ac_config_links po/LINGUAS:po/LINGUAS"
 test "$srcdir" = "." || wine_fn_config_symlink po/LINGUAS
diff --git a/configure.ac b/configure.ac
index b687119..8b78cfe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2554,16 +2554,13 @@ AH_BOTTOM([#endif /* WINE_CROSSTEST */
 
 AC_CONFIG_COMMANDS([include/stamp-h], [echo timestamp > include/stamp-h])
 
-WINE_CONFIG_SYMLINK(dlls/shell32/AUTHORS,AUTHORS)
-WINE_CONFIG_SYMLINK(dlls/wineps.drv/generic.ppd)
-WINE_CONFIG_SYMLINK(fonts/marlett.ttf,,enable_fonts)
-WINE_CONFIG_SYMLINK(fonts/symbol.ttf,,enable_fonts)
-WINE_CONFIG_SYMLINK(fonts/tahoma.ttf,,enable_fonts)
-WINE_CONFIG_SYMLINK(fonts/tahomabd.ttf,,enable_fonts)
-WINE_CONFIG_SYMLINK(po/LINGUAS)
-WINE_CONFIG_SYMLINK(tools/l_intl.nls,,enable_tools)
-WINE_CONFIG_SYMLINK(wine,tools/winewrapper)
-WINE_CONFIG_SYMLINK(wine64,tools/winewrapper,enable_win64)
+WINE_CONFIG_SYMLINK(dlls/shell32,,[AUTHORS])
+WINE_CONFIG_SYMLINK(dlls/wineps.drv,dlls/wineps.drv,[generic.ppd])
+WINE_CONFIG_SYMLINK(fonts,fonts,[marlett.ttf,symbol.ttf,tahoma.ttf,tahomabd.ttf],enable_fonts)
+WINE_CONFIG_SYMLINK(po,po,[LINGUAS])
+WINE_CONFIG_SYMLINK(tools,tools,[l_intl.nls],enable_tools)
+WINE_CONFIG_SYMLINK(,tools,[wine],,winewrapper)
+WINE_CONFIG_SYMLINK(,tools,[wine64],enable_win64,winewrapper)
 
 WINE_CONFIG_EXTRA_DIR(dlls/gdi32/dibdrv)
 WINE_CONFIG_EXTRA_DIR(dlls/gdi32/enhmfdrv)




More information about the wine-cvs mailing list