Alexandre Julliard : makefiles: Generate the common rules for import libraries from configure.

Alexandre Julliard julliard at winehq.org
Thu Oct 10 13:26:51 CDT 2013


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Oct 10 10:51:32 2013 +0200

makefiles: Generate the common rules for import libraries from configure.

---

 .gitignore               |    1 -
 aclocal.m4               |    2 +-
 configure                |   21 ++++++++++++++-------
 configure.ac             |   14 +++++++++++++-
 dlls/Makeimplib.rules.in |   14 --------------
 tools/make_makefiles     |    5 ++---
 6 files changed, 30 insertions(+), 27 deletions(-)

diff --git a/.gitignore b/.gitignore
index f7e8b2b..f5133b7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,7 +22,6 @@ Makefile
 dlldata.c
 dlls/*/*.def
 dlls/Makedll.rules
-dlls/Makeimplib.rules
 dlls/actxprxy/actxprxy_activscp.h
 dlls/actxprxy/actxprxy_activscp_p.c
 dlls/actxprxy/actxprxy_comcat.h
diff --git a/aclocal.m4 b/aclocal.m4
index 9e2e147..0058603 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -351,7 +351,7 @@ wine_fn_config_lib ()
     ac_flags=$[2]
     ac_dir=dlls/$ac_name
 
-    wine_fn_all_rules dlls/Makeimplib.rules
+    wine_fn_all_rules Make.rules.in
     wine_fn_clean_rules
 
     wine_fn_append_rule \
diff --git a/configure b/configure
index c67e7ba..4744a1a 100755
--- a/configure
+++ b/configure
@@ -627,6 +627,7 @@ LIBOBJS
 PORCFLAGS
 LINGUAS
 ALL_TEST_RESOURCES
+MAKE_IMPLIB_RULES
 LDAPLIBS
 LIBRT
 LIBPOLL
@@ -801,7 +802,6 @@ SHELL'
 ac_subst_files='MAKE_RULES
 MAKE_TEST_RULES
 MAKE_DLL_RULES
-MAKE_IMPLIB_RULES
 MAKE_PROG_RULES'
 ac_user_opts='
 enable_option_checking
@@ -16053,6 +16053,18 @@ ac_config_commands="$ac_config_commands include/stamp-h"
 
 $as_echo_n "creating Makefile rules..." >&6
 
+
+MAKE_IMPLIB_RULES="DLLFLAGS = $DLLFLAGS
+"
+
+if test "x$CROSSTEST_DISABLE" = x
+then
+    as_fn_append MAKE_IMPLIB_RULES "MAKEDEPFLAGS = -xo -xcross.o
+all: \$(STATICLIB:.a=.cross.a)
+"
+fi
+
+
 wine_rules_file=conf$$rules.make
 rm -f $wine_rules_file
 ALL_POT_FILES=""
@@ -16213,7 +16225,7 @@ wine_fn_config_lib ()
     ac_flags=$2
     ac_dir=dlls/$ac_name
 
-    wine_fn_all_rules dlls/Makeimplib.rules
+    wine_fn_all_rules Make.rules.in
     wine_fn_clean_rules
 
     wine_fn_append_rule \
@@ -16597,10 +16609,6 @@ wine_fn_config_makerules dlls/Makedll.rules Make.rules
 MAKE_DLL_RULES=dlls/Makedll.rules
 ac_config_files="$ac_config_files dlls/Makedll.rules"
 
-wine_fn_config_makerules dlls/Makeimplib.rules Make.rules
-MAKE_IMPLIB_RULES=dlls/Makeimplib.rules
-ac_config_files="$ac_config_files dlls/Makeimplib.rules"
-
 wine_fn_config_makerules programs/Makeprog.rules Make.rules
 MAKE_PROG_RULES=programs/Makeprog.rules
 ac_config_files="$ac_config_files programs/Makeprog.rules"
@@ -18173,7 +18181,6 @@ do
     "Make.rules") CONFIG_FILES="$CONFIG_FILES Make.rules" ;;
     "Maketest.rules") CONFIG_FILES="$CONFIG_FILES Maketest.rules" ;;
     "dlls/Makedll.rules") CONFIG_FILES="$CONFIG_FILES dlls/Makedll.rules" ;;
-    "dlls/Makeimplib.rules") CONFIG_FILES="$CONFIG_FILES dlls/Makeimplib.rules" ;;
     "programs/Makeprog.rules") CONFIG_FILES="$CONFIG_FILES programs/Makeprog.rules" ;;
     "Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS Makefile" ;;
     "Make.tmp") CONFIG_FILES="$CONFIG_FILES Make.tmp:Make.vars.in:Makefile.in" ;;
diff --git a/configure.ac b/configure.ac
index f407355..90feb73 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2597,6 +2597,19 @@ AH_BOTTOM([#endif /* WINE_CROSSTEST */
 AC_CONFIG_COMMANDS([include/stamp-h], [echo timestamp > include/stamp-h])
 AS_ECHO_N("creating Makefile rules...") >&AS_MESSAGE_FD
 
+dnl Import library rules
+
+AC_SUBST(MAKE_IMPLIB_RULES,"DLLFLAGS = $DLLFLAGS
+")
+if test "x$CROSSTEST_DISABLE" = x
+then
+    AS_VAR_APPEND([MAKE_IMPLIB_RULES],"MAKEDEPFLAGS = -xo -xcross.o
+all: \$(STATICLIB:.a=.cross.a)
+")
+fi
+
+dnl Main makefile
+
 WINE_APPEND_RULE([
 # Rules automatically generated by configure
 
@@ -2624,7 +2637,6 @@ WINE_CONFIG_EXTRA_DIR(include/wine)
 WINE_CONFIG_MAKERULES([Make.rules],[MAKE_RULES])
 WINE_CONFIG_MAKERULES([Maketest.rules],[MAKE_TEST_RULES],[Make.rules])
 WINE_CONFIG_MAKERULES([dlls/Makedll.rules],[MAKE_DLL_RULES],[Make.rules])
-WINE_CONFIG_MAKERULES([dlls/Makeimplib.rules],[MAKE_IMPLIB_RULES],[Make.rules])
 WINE_CONFIG_MAKERULES([programs/Makeprog.rules],[MAKE_PROG_RULES],[Make.rules])
 
 WINE_CONFIG_DLL(acledit)
diff --git a/dlls/Makeimplib.rules.in b/dlls/Makeimplib.rules.in
deleted file mode 100644
index 5e59a50..0000000
--- a/dlls/Makeimplib.rules.in
+++ /dev/null
@@ -1,14 +0,0 @@
-# Global rules for building a static import library     -*-Makefile-*-
-#
-# Each individual makefile should define the following variables:
-# MODULE       : name of the main module being built
-#
-# plus all variables required by the global Make.rules.in
-#
-
-DLLFLAGS = @DLLFLAGS@
-MAKEDEPFLAGS = -xo -xcross.o
-
- at CROSSTEST_DISABLE@ all: $(STATICLIB:.a=.cross.a)
-
- at MAKE_RULES@
diff --git a/tools/make_makefiles b/tools/make_makefiles
index 42814bf..8785326 100755
--- a/tools/make_makefiles
+++ b/tools/make_makefiles
@@ -26,7 +26,6 @@ my %makerules =
 (
  "MAKE_RULES" => "Make.rules",
  "MAKE_DLL_RULES" => "dlls/Makedll.rules",
- "MAKE_IMPLIB_RULES" => "dlls/Makeimplib.rules",
  "MAKE_TEST_RULES" => "Maketest.rules",
  "MAKE_PROG_RULES" => "programs/Makeprog.rules",
 );
@@ -312,7 +311,7 @@ sub parse_makefile($)
         if (/^\@(MAKE.*RULES)\@/)
         {
             my $var = $1;
-            $make{"=rules"} = $makerules{$var};
+            $make{"=rules"} = $makerules{$var} || $var;
             next;
         }
         if (/^\s*(MODULE|IMPORTLIB|TESTDLL|MANPAGE)\s*=\s*(.*)/)
@@ -486,7 +485,7 @@ sub update_makefiles(@)
             (my $dir = $file) =~ s/^(.*)\/Makefile/$1/;
             push @lines, "WINE_CONFIG_TEST($dir$flag_args)\n";
         }
-        elsif ($rules eq $makerules{"MAKE_IMPLIB_RULES"})
+        elsif ($rules eq "MAKE_IMPLIB_RULES")
         {
             (my $name = $file) =~ s/^dlls\/(.*)\/Makefile/$1/;
             push @lines, "WINE_CONFIG_LIB($name$flag_args)\n";




More information about the wine-cvs mailing list