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

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


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Oct 10 11:22:08 2013 +0200

makefiles: Generate the common rules for programs from configure.

---

 .gitignore                    |    1 -
 aclocal.m4                    |    2 +-
 configure                     |   18 ++++++++++--------
 configure.ac                  |    9 +++++++--
 programs/Makeprog.rules.in    |   16 ----------------
 programs/winetest/Makefile.in |    4 ++--
 tools/make_makefiles          |    5 ++---
 7 files changed, 22 insertions(+), 33 deletions(-)

diff --git a/.gitignore b/.gitignore
index 1d35e05..4cb2af7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -286,7 +286,6 @@ loader/wine64-preloader
 loader/wine_info.plist
 msg.pot
 po/*.mo
-programs/Makeprog.rules
 programs/rpcss/epm.h
 programs/rpcss/epm_s.c
 programs/rpcss/irot.h
diff --git a/aclocal.m4 b/aclocal.m4
index fb013fb..9ee387a 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -524,7 +524,7 @@ wine_fn_config_program ()
 
     AS_VAR_IF([$ac_enable],[no],[wine_fn_disabled_rules $ac_clean; return])
 
-    wine_fn_all_rules programs/Makeprog.rules
+    wine_fn_all_rules Make.rules.in
     wine_fn_clean_rules $ac_clean
     wine_fn_append_rule "$ac_dir: __builddeps__"
     wine_fn_pot_rules
diff --git a/configure b/configure
index da3d922..91af939 100755
--- a/configure
+++ b/configure
@@ -627,6 +627,7 @@ LIBOBJS
 PORCFLAGS
 LINGUAS
 ALL_TEST_RESOURCES
+MAKE_PROG_RULES
 MAKE_DLL_RULES
 MAKE_IMPLIB_RULES
 LDAPLIBS
@@ -801,8 +802,7 @@ PACKAGE_NAME
 PATH_SEPARATOR
 SHELL'
 ac_subst_files='MAKE_RULES
-MAKE_TEST_RULES
-MAKE_PROG_RULES'
+MAKE_TEST_RULES'
 ac_user_opts='
 enable_option_checking
 enable_win16
@@ -16082,6 +16082,13 @@ all: $deps
 "
 
 
+MAKE_PROG_RULES="
+DLLFLAGS    = $DLLFLAGS
+
+all: $deps
+"
+
+
 
 wine_rules_file=conf$$rules.make
 rm -f $wine_rules_file
@@ -16418,7 +16425,7 @@ wine_fn_config_program ()
   wine_fn_disabled_rules $ac_clean; return
 fi
 
-    wine_fn_all_rules programs/Makeprog.rules
+    wine_fn_all_rules Make.rules.in
     wine_fn_clean_rules $ac_clean
     wine_fn_append_rule "$ac_dir: __builddeps__"
     wine_fn_pot_rules
@@ -16623,10 +16630,6 @@ wine_fn_config_makerules Maketest.rules Make.rules
 MAKE_TEST_RULES=Maketest.rules
 ac_config_files="$ac_config_files Maketest.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"
-
 
 wine_fn_config_dll acledit enable_acledit
 wine_fn_config_dll aclui enable_aclui implib
@@ -18194,7 +18197,6 @@ do
     "include/wine") CONFIG_COMMANDS="$CONFIG_COMMANDS include/wine" ;;
     "Make.rules") CONFIG_FILES="$CONFIG_FILES Make.rules" ;;
     "Maketest.rules") CONFIG_FILES="$CONFIG_FILES Maketest.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 6bc985a..b5358c0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2608,7 +2608,7 @@ all: \$(STATICLIB:.a=.cross.a)
 ")
 fi
 
-dnl Dll rules
+dnl Dll and program rules
 
 if test -n "$DLLEXT"
 then
@@ -2626,6 +2626,12 @@ MODULEFLAGS = -shared \$(srcdir)/\$(MAINSPEC) \$(EXTRADLLFLAGS)
 all: $deps
 ")
 
+AC_SUBST(MAKE_PROG_RULES,"
+DLLFLAGS    = $DLLFLAGS
+
+all: $deps
+")
+
 dnl Main makefile
 
 WINE_APPEND_RULE([
@@ -2654,7 +2660,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([programs/Makeprog.rules],[MAKE_PROG_RULES],[Make.rules])
 
 WINE_CONFIG_DLL(acledit)
 WINE_CONFIG_DLL(aclui,,[implib])
diff --git a/programs/Makeprog.rules.in b/programs/Makeprog.rules.in
deleted file mode 100644
index 1813173..0000000
--- a/programs/Makeprog.rules.in
+++ /dev/null
@@ -1,16 +0,0 @@
-# Global rules for building a Winelib program     -*-Makefile-*-
-#
-# Each individual makefile should define the following variables:
-# MODULE       : name of the main module being built
-# APPMODE      : program mode (-mwindows,-mconsole)
-# EXTRALIBS    : extra libraries to link in (optional)
-# EXTRADEFS    : extra symbol definitions, like -DWINELIB (optional)
-#
-# plus all variables required by the global Make.rules.in
-#
-
-DLLFLAGS    = @DLLFLAGS@
-
-all: $(MODULE)$(DLLEXT) $(MODULE)$(FAKEEXT)
-
- at MAKE_RULES@
diff --git a/programs/winetest/Makefile.in b/programs/winetest/Makefile.in
index cddea98..898e995 100644
--- a/programs/winetest/Makefile.in
+++ b/programs/winetest/Makefile.in
@@ -16,8 +16,6 @@ SVG_SRCS = winetest.svg
 
 EXTRA_OBJS = build.res @ALL_TEST_RESOURCES@
 
- at MAKE_PROG_RULES@
-
 clean::
 	$(RM) build.rc build.nfo
 
@@ -28,3 +26,5 @@ build.nfo:
 	-$(CC) -v 2>$@
 
 build.res: build.nfo
+
+ at MAKE_PROG_RULES@
diff --git a/tools/make_makefiles b/tools/make_makefiles
index dc1f92a..d265955 100755
--- a/tools/make_makefiles
+++ b/tools/make_makefiles
@@ -26,7 +26,6 @@ my %makerules =
 (
  "MAKE_RULES" => "Make.rules",
  "MAKE_TEST_RULES" => "Maketest.rules",
- "MAKE_PROG_RULES" => "programs/Makeprog.rules",
 );
 
 # Programs that we want to install in the bin directory too
@@ -351,7 +350,7 @@ sub parse_makefile($)
 
     if (defined $make{"=flags"} && defined $make{"=rules"} &&
         ($make{"=rules"} eq "MAKE_DLL_RULES" ||
-         $make{"=rules"} eq $makerules{"MAKE_PROG_RULES"}))
+         $make{"=rules"} eq "MAKE_PROG_RULES"))
     {
         die "Custom install-lib rule not allowed in $file" if defined ${$make{"=flags"}}{"install-lib"};
         die "Custom install-dev rule not allowed in $file" if defined ${$make{"=flags"}}{"install-dev"};
@@ -472,7 +471,7 @@ sub update_makefiles(@)
             $args .= ",[$implib]" if $implib && $implib ne $name;
             push @lines, "WINE_CONFIG_DLL($name$args)\n";
         }
-        elsif ($rules eq $makerules{"MAKE_PROG_RULES"})
+        elsif ($rules eq "MAKE_PROG_RULES")
         {
             (my $name = $file) =~ s/^programs\/(.*)\/Makefile/$1/;
             if ($name =~ /\./)




More information about the wine-cvs mailing list