makefiles: Generate the common rules for dlls from configure.
This commit is contained in:
parent
a3b76d3366
commit
41c7ba4b5d
|
@ -21,7 +21,6 @@
|
|||
Makefile
|
||||
dlldata.c
|
||||
dlls/*/*.def
|
||||
dlls/Makedll.rules
|
||||
dlls/actxprxy/actxprxy_activscp.h
|
||||
dlls/actxprxy/actxprxy_activscp_p.c
|
||||
dlls/actxprxy/actxprxy_comcat.h
|
||||
|
|
|
@ -393,14 +393,14 @@ wine_fn_config_dll ()
|
|||
dnl enable_win16 is special in that it disables import libs too
|
||||
[if wine_fn_has_flag implib && test "$ac_enable" != enable_win16
|
||||
then
|
||||
wine_fn_depend_rules dlls/Makedll.rules
|
||||
wine_fn_depend_rules Make.rules.in
|
||||
wine_fn_clean_rules $ac_clean
|
||||
else
|
||||
wine_fn_disabled_rules $ac_clean
|
||||
return
|
||||
fi],
|
||||
|
||||
[wine_fn_all_rules dlls/Makedll.rules
|
||||
[wine_fn_all_rules Make.rules.in
|
||||
wine_fn_clean_rules $ac_clean
|
||||
wine_fn_append_rule \
|
||||
"$ac_dir: __builddeps__
|
||||
|
|
|
@ -627,6 +627,7 @@ LIBOBJS
|
|||
PORCFLAGS
|
||||
LINGUAS
|
||||
ALL_TEST_RESOURCES
|
||||
MAKE_DLL_RULES
|
||||
MAKE_IMPLIB_RULES
|
||||
LDAPLIBS
|
||||
LIBRT
|
||||
|
@ -801,7 +802,6 @@ PATH_SEPARATOR
|
|||
SHELL'
|
||||
ac_subst_files='MAKE_RULES
|
||||
MAKE_TEST_RULES
|
||||
MAKE_DLL_RULES
|
||||
MAKE_PROG_RULES'
|
||||
ac_user_opts='
|
||||
enable_option_checking
|
||||
|
@ -16065,6 +16065,24 @@ all: \$(STATICLIB:.a=.cross.a)
|
|||
fi
|
||||
|
||||
|
||||
if test -n "$DLLEXT"
|
||||
then
|
||||
deps="\$(MODULE)$DLLEXT \$(MODULE).fake"
|
||||
else
|
||||
deps="\$(MODULE)"
|
||||
fi
|
||||
|
||||
MAKE_DLL_RULES="
|
||||
DLLFLAGS = $DLLFLAGS
|
||||
MAINSPEC = \$(MODULE:%.dll=%).spec
|
||||
IDL_TLB_RES = \$(IDL_TLB_SRCS:.idl=_t.res)
|
||||
MODULEFLAGS = -shared \$(srcdir)/\$(MAINSPEC) \$(EXTRADLLFLAGS)
|
||||
|
||||
all: $deps
|
||||
"
|
||||
|
||||
|
||||
|
||||
wine_rules_file=conf$$rules.make
|
||||
rm -f $wine_rules_file
|
||||
ALL_POT_FILES=""
|
||||
|
@ -16266,14 +16284,14 @@ wine_fn_config_dll ()
|
|||
if eval test \"x\$"$ac_enable"\" = x"no"; then :
|
||||
if wine_fn_has_flag implib && test "$ac_enable" != enable_win16
|
||||
then
|
||||
wine_fn_depend_rules dlls/Makedll.rules
|
||||
wine_fn_depend_rules Make.rules.in
|
||||
wine_fn_clean_rules $ac_clean
|
||||
else
|
||||
wine_fn_disabled_rules $ac_clean
|
||||
return
|
||||
fi
|
||||
else
|
||||
wine_fn_all_rules dlls/Makedll.rules
|
||||
wine_fn_all_rules Make.rules.in
|
||||
wine_fn_clean_rules $ac_clean
|
||||
wine_fn_append_rule \
|
||||
"$ac_dir: __builddeps__
|
||||
|
@ -16605,10 +16623,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 dlls/Makedll.rules Make.rules
|
||||
MAKE_DLL_RULES=dlls/Makedll.rules
|
||||
ac_config_files="$ac_config_files dlls/Makedll.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"
|
||||
|
@ -18180,7 +18194,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" ;;
|
||||
"dlls/Makedll.rules") CONFIG_FILES="$CONFIG_FILES dlls/Makedll.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" ;;
|
||||
|
|
19
configure.ac
19
configure.ac
|
@ -2608,6 +2608,24 @@ all: \$(STATICLIB:.a=.cross.a)
|
|||
")
|
||||
fi
|
||||
|
||||
dnl Dll rules
|
||||
|
||||
if test -n "$DLLEXT"
|
||||
then
|
||||
deps="\$(MODULE)$DLLEXT \$(MODULE).fake"
|
||||
else
|
||||
deps="\$(MODULE)"
|
||||
fi
|
||||
|
||||
AC_SUBST(MAKE_DLL_RULES,"
|
||||
DLLFLAGS = $DLLFLAGS
|
||||
MAINSPEC = \$(MODULE:%.dll=%).spec
|
||||
IDL_TLB_RES = \$(IDL_TLB_SRCS:.idl=_t.res)
|
||||
MODULEFLAGS = -shared \$(srcdir)/\$(MAINSPEC) \$(EXTRADLLFLAGS)
|
||||
|
||||
all: $deps
|
||||
")
|
||||
|
||||
dnl Main makefile
|
||||
|
||||
WINE_APPEND_RULE([
|
||||
|
@ -2636,7 +2654,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([programs/Makeprog.rules],[MAKE_PROG_RULES],[Make.rules])
|
||||
|
||||
WINE_CONFIG_DLL(acledit)
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
# Global rules for building dlls -*-Makefile-*-
|
||||
#
|
||||
# Each individual makefile should define the following variables:
|
||||
# MODULE : name of the main module being built
|
||||
# EXTRALIBS : extra libraries to link in (optional)
|
||||
#
|
||||
# plus all variables required by the global Make.rules.in
|
||||
#
|
||||
|
||||
DLLFLAGS = @DLLFLAGS@
|
||||
MAINSPEC = $(MODULE:%.dll=%).spec
|
||||
IDL_TLB_RES = $(IDL_TLB_SRCS:.idl=_t.res)
|
||||
MODULEFLAGS = -shared $(srcdir)/$(MAINSPEC) $(EXTRADLLFLAGS)
|
||||
|
||||
all: $(MODULE)$(DLLEXT) $(MODULE)$(FAKEEXT)
|
||||
|
||||
@MAKE_RULES@
|
|
@ -25,7 +25,6 @@ use strict;
|
|||
my %makerules =
|
||||
(
|
||||
"MAKE_RULES" => "Make.rules",
|
||||
"MAKE_DLL_RULES" => "dlls/Makedll.rules",
|
||||
"MAKE_TEST_RULES" => "Maketest.rules",
|
||||
"MAKE_PROG_RULES" => "programs/Makeprog.rules",
|
||||
);
|
||||
|
@ -351,7 +350,7 @@ sub parse_makefile($)
|
|||
}
|
||||
|
||||
if (defined $make{"=flags"} && defined $make{"=rules"} &&
|
||||
($make{"=rules"} eq $makerules{"MAKE_DLL_RULES"} ||
|
||||
($make{"=rules"} eq "MAKE_DLL_RULES" ||
|
||||
$make{"=rules"} eq $makerules{"MAKE_PROG_RULES"}))
|
||||
{
|
||||
die "Custom install-lib rule not allowed in $file" if defined ${$make{"=flags"}}{"install-lib"};
|
||||
|
@ -377,6 +376,14 @@ sub assign_sources_to_makefiles(@)
|
|||
$subdirs{"$dir/ $subdir"} = 1 if $subdir;
|
||||
next unless $dir;
|
||||
|
||||
my $basedir = dirname( $dir );
|
||||
if ($basedir && !defined $makefiles{"$basedir/Makefile"})
|
||||
{
|
||||
$subdir = $basedir;
|
||||
$basedir = dirname( $basedir );
|
||||
$subdirs{"$basedir/ $subdir"} = 1;
|
||||
}
|
||||
|
||||
die "no makefile found for $file\n" unless defined $makefiles{"$dir/Makefile"};
|
||||
|
||||
my $make = $makefiles{"$dir/Makefile"};
|
||||
|
@ -447,7 +454,7 @@ sub update_makefiles(@)
|
|||
my $args = "";
|
||||
my $is_win16 = $make{"MODULE"} && ($make{"MODULE"} =~ /16$/ || $modules16{$make{"MODULE"}});
|
||||
my $flag_args = defined $make{"=flags"} ? ",[" . join(",",sort keys %{$make{"=flags"}}) ."]" : "";
|
||||
if ($rules eq $makerules{"MAKE_DLL_RULES"})
|
||||
if ($rules eq "MAKE_DLL_RULES")
|
||||
{
|
||||
(my $name = $file) =~ s/^dlls\/(.*)\/Makefile/$1/;
|
||||
if ($name =~ /\./)
|
||||
|
@ -546,7 +553,7 @@ sub update_ignores(@)
|
|||
{
|
||||
my @pattern = @{$src};
|
||||
next unless defined $makefile{$pattern[0]};
|
||||
next if $pattern[0] eq "IDL_TLB_SRCS" && $makefile{"=rules"} eq "dlls/Makedll.rules";
|
||||
next if $pattern[0] eq "IDL_TLB_SRCS" && $makefile{"=rules"} eq "MAKE_DLL_RULES";
|
||||
push @list, map { (my $ret = $_) =~ s/$pattern[1]$/$pattern[2]/; $ret; } @{$makefile{$pattern[0]}};
|
||||
}
|
||||
foreach my $f (@list)
|
||||
|
|
Loading…
Reference in New Issue