Alexandre Julliard : makefiles: Create source dir symlinks from the makefiles.

Alexandre Julliard julliard at winehq.org
Fri Nov 22 16:17:25 CST 2019


Module: wine
Branch: master
Commit: 4152f944f653713fa9cf380470391d660f10bd6e
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=4152f944f653713fa9cf380470391d660f10bd6e

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri Nov 22 14:35:08 2019 +0100

makefiles: Create source dir symlinks from the makefiles.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 aclocal.m4      | 10 ++++------
 configure       | 16 ----------------
 configure.ac    |  6 ++----
 tools/makedep.c | 22 ++++++++++++++++++++++
 4 files changed, 28 insertions(+), 26 deletions(-)

diff --git a/aclocal.m4 b/aclocal.m4
index 194b3a9d93..577bf7a37c 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -282,14 +282,12 @@ AC_DEFUN([WINE_APPEND_RULE],[AC_REQUIRE([WINE_CONFIG_HELPERS])wine_fn_append_rul
 
 dnl **** Create symlinks from config.status ****
 dnl
-dnl Usage: WINE_CONFIG_SYMLINK(target,src,files,enable,srcfile)
+dnl Usage: WINE_CONFIG_SYMLINK(target,src,enable)
 dnl
 AC_DEFUN([WINE_CONFIG_SYMLINK],[AC_REQUIRE([WINE_CONFIG_HELPERS])dnl
-m4_ifval([$4],[if test $4; 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_foreach([f],[$3],[ ]m4_ifval([$1],[$1/])f)m4_ifval([$4],[
+m4_ifval([$3],[if test $3; then
+])AC_CONFIG_LINKS([$1:$2])dnl
+wine_fn_config_symlink[ $1]m4_ifval([$3],[
 fi])[]dnl
 ])])
 
diff --git a/configure b/configure
index 4de04f3575..22e0932b00 100755
--- a/configure
+++ b/configure
@@ -19947,16 +19947,6 @@ Makefile: $srcdir/Makefile.in config.status \$(MAKEDEP)
 depend: \$(MAKEDEP) dummy
 	\$(MAKEDEP)"
 
-if test "x$enable_fonts" != xno; then
-ac_config_links="$ac_config_links fonts/marlett.ttf:fonts/marlett.ttf"
-ac_config_links="$ac_config_links fonts/symbol.ttf:fonts/symbol.ttf"
-ac_config_links="$ac_config_links fonts/tahoma.ttf:fonts/tahoma.ttf"
-ac_config_links="$ac_config_links fonts/tahomabd.ttf:fonts/tahomabd.ttf"
-ac_config_links="$ac_config_links fonts/wingding.ttf:fonts/wingding.ttf"
-test "$srcdir" = "." || wine_fn_config_symlink fonts/marlett.ttf fonts/symbol.ttf fonts/tahoma.ttf fonts/tahomabd.ttf fonts/wingding.ttf
-fi
-ac_config_links="$ac_config_links loader/l_intl.nls:loader/l_intl.nls"
-test "$srcdir" = "." || wine_fn_config_symlink loader/l_intl.nls
 ac_config_links="$ac_config_links wine:tools/winewrapper"
 wine_fn_config_symlink wine
 if test "x$enable_win64" != xno -o -n "$with_wine64"; then
@@ -21973,12 +21963,6 @@ do
   case $ac_config_target in
     "include/config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/config.h" ;;
     "include/stamp-h") CONFIG_COMMANDS="$CONFIG_COMMANDS include/stamp-h" ;;
-    "fonts/marlett.ttf") CONFIG_LINKS="$CONFIG_LINKS fonts/marlett.ttf:fonts/marlett.ttf" ;;
-    "fonts/symbol.ttf") CONFIG_LINKS="$CONFIG_LINKS fonts/symbol.ttf:fonts/symbol.ttf" ;;
-    "fonts/tahoma.ttf") CONFIG_LINKS="$CONFIG_LINKS fonts/tahoma.ttf:fonts/tahoma.ttf" ;;
-    "fonts/tahomabd.ttf") CONFIG_LINKS="$CONFIG_LINKS fonts/tahomabd.ttf:fonts/tahomabd.ttf" ;;
-    "fonts/wingding.ttf") CONFIG_LINKS="$CONFIG_LINKS fonts/wingding.ttf:fonts/wingding.ttf" ;;
-    "loader/l_intl.nls") CONFIG_LINKS="$CONFIG_LINKS loader/l_intl.nls:loader/l_intl.nls" ;;
     "wine") CONFIG_LINKS="$CONFIG_LINKS wine:tools/winewrapper" ;;
     "wine64") CONFIG_LINKS="$CONFIG_LINKS wine64:tools/winewrapper" ;;
     "tools/makedep") CONFIG_COMMANDS="$CONFIG_COMMANDS tools/makedep" ;;
diff --git a/configure.ac b/configure.ac
index 93a74a27c8..bbea41416a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2806,10 +2806,8 @@ Makefile: $srcdir/Makefile.in config.status \$(MAKEDEP)
 depend: \$(MAKEDEP) dummy
 	\$(MAKEDEP)])
 
-WINE_CONFIG_SYMLINK(fonts,fonts,[marlett.ttf,symbol.ttf,tahoma.ttf,tahomabd.ttf,wingding.ttf],["x$enable_fonts" != xno])
-WINE_CONFIG_SYMLINK(loader,loader,[l_intl.nls])
-WINE_CONFIG_SYMLINK(,tools,[wine],,winewrapper)
-WINE_CONFIG_SYMLINK(,tools,[wine64],["x$enable_win64" != xno -o -n "$with_wine64"],winewrapper)
+WINE_CONFIG_SYMLINK(wine,tools/winewrapper)
+WINE_CONFIG_SYMLINK(wine64,tools/winewrapper,["x$enable_win64" != xno -o -n "$with_wine64"])
 
 WINE_CONFIG_MAKEFILE(dlls/acledit)
 WINE_CONFIG_MAKEFILE(dlls/aclui)
diff --git a/tools/makedep.c b/tools/makedep.c
index 27b33eb276..d0e963f759 100644
--- a/tools/makedep.c
+++ b/tools/makedep.c
@@ -2386,6 +2386,24 @@ static void output_symlink_rule( const char *src_name, const char *link_name )
 }
 
 
+/*******************************************************************
+ *         output_srcdir_symlink
+ *
+ * Output rule to create a symlink back to the source directory, for source files
+ * that are needed at run-time.
+ */
+static void output_srcdir_symlink( struct makefile *make, const char *obj )
+{
+    char *src_file;
+
+    if (!make->src_dir) return;
+    src_file = src_dir_path( make, obj );
+    output( "%s: %s\n", obj, src_file );
+    output_symlink_rule( src_file, obj );
+    strarray_add( &make->all_targets, obj );
+}
+
+
 /*******************************************************************
  *         output_install_commands
  */
@@ -2862,7 +2880,10 @@ static void output_source_sfd( struct makefile *make, struct incl_file *source,
         if (!(source->file->flags & FLAG_SFD_FONTS)) output( "all: %s\n", ttf_file );
     }
     if (source->file->flags & FLAG_INSTALL)
+    {
         add_install_rule( make, source->name, ttf_obj, strmake( "D$(fontdir)/%s", ttf_obj ));
+        output_srcdir_symlink( make, ttf_obj );
+    }
 
     if (source->file->flags & FLAG_SFD_FONTS)
     {
@@ -2913,6 +2934,7 @@ static void output_source_nls( struct makefile *make, struct incl_file *source,
 {
     add_install_rule( make, source->name, source->name,
                       strmake( "D$(datadir)/wine/%s", source->name ));
+    output_srcdir_symlink( make, strmake( "%s.nls", obj ));
 }
 
 




More information about the wine-cvs mailing list