Commit 4051eaf7 authored by Alexandre Julliard's avatar Alexandre Julliard

configure: Allow multiple variables in makefile output, and generate the programs directory lists.

parent dbb535e4
......@@ -175,8 +175,8 @@ AC_DEFUN([WINE_CONFIG_MAKEFILE],
m4_ifval(ac_dir,[ALL_MAKEFILES="$ALL_MAKEFILES \\
$1"])
AS_VAR_PUSHDEF([ac_enable],m4_default([$5],[enable_]ac_dir))dnl
m4_ifval([$4],[test "x$ac_enable" != xno && $4="$[$4] \\
ac_dir"])
m4_ifval([$4],[test "x$ac_enable" != xno]m4_foreach([ac_var],[$4],[ && ac_var="$ac_var \\
ac_dir"]))
AS_VAR_POPDEF([ac_enable])dnl
ALL_MAKEFILE_DEPENDS="$ALL_MAKEFILE_DEPENDS
[$1: ]m4_ifval([$2],[$1.in $2],[$1.in])"
......
# Automatically generated by make_progs; DO NOT EDIT!!
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ..
SRCDIR = @srcdir@
VPATH = @srcdir@
SUBDIRS = \
clock \
cmd \
cmdlgtst \
control \
eject \
expand \
explorer \
hh \
icinfo \
iexplore \
msiexec \
net \
notepad \
oleview \
progman \
reg \
regedit \
regsvr32 \
rpcss \
rundll32 \
secedit \
services \
spoolsv \
start \
svchost \
taskmgr \
uninstaller \
view \
wineboot \
winebrowser \
winecfg \
wineconsole \
winedbg \
winedevice \
winefile \
winemenubuilder \
winemine \
winepath \
winetest \
winevdm \
winhlp32 \
winver \
wordpad \
write \
xcopy
# Sub-directories to run make install into
INSTALLSUBDIRS = \
clock \
cmd \
control \
eject \
expand \
explorer \
hh \
icinfo \
iexplore \
msiexec \
net \
notepad \
oleview \
progman \
reg \
regedit \
regsvr32 \
rpcss \
rundll32 \
secedit \
services \
spoolsv \
start \
svchost \
taskmgr \
uninstaller \
wineboot \
winebrowser \
winecfg \
wineconsole \
winedbg \
winedevice \
winefile \
winemenubuilder \
winemine \
winepath \
winevdm \
winhlp32 \
winver \
wordpad \
write \
xcopy
# Programs to install in bin directory
INSTALLPROGS = \
msiexec \
notepad \
progman \
regedit \
regsvr32 \
uninstaller \
wineboot \
winebrowser \
winecfg \
wineconsole \
winedbg \
winefile \
winemine \
winepath
SUBDIRS = @ALL_PROGRAM_DIRS@
INSTALLSUBDIRS = @ALL_PROGRAM_INSTALL_DIRS@
INSTALLPROGS = @ALL_PROGRAM_BIN_INSTALL_DIRS@
INSTALLDIRS = $(DESTDIR)$(bindir)
......
......@@ -273,6 +273,14 @@ sub update_makefiles(@)
if ($rules eq $makerules{"MAKE_DLL_RULES"}) { $args = ",[dlls],[ALL_DLL_DIRS]"; }
elsif ($rules eq $makerules{"MAKE_IMPLIB_RULES"}) { $args = ",[dlls],[ALL_IMPLIB_DIRS]"; }
elsif ($rules eq $makerules{"MAKE_TEST_RULES"}) { $args = ",[dlls],[ALL_TEST_DIRS]"; }
elsif ($rules eq $makerules{"MAKE_PROG_RULES"})
{
(my $name = $file) =~ s/^programs\/(.*)\/Makefile/$1/;
$args = ",[programs],[ALL_PROGRAM_DIRS";
$args .= ",ALL_PROGRAM_INSTALL_DIRS" unless $dont_install{$name};
$args .= ",ALL_PROGRAM_BIN_INSTALL_DIRS" if $bin_install{$name};
$args .= "]";
}
push @lines, "WINE_CONFIG_MAKEFILE([$file],[$rules]$args)\n";
}
......@@ -508,41 +516,6 @@ sub update_dlls(@)
################################################################
# update programs/Makefile.in
sub update_progs(@)
{
my (@subdirs, @install_subdirs, @install_progs);
my @ignores = ();
foreach my $make (@_)
{
my %makefile = %{$makefiles{$make}};
my $module = $makefile{"MODULE"};
(my $dir = $make) =~ s/^programs\/(.*)\/Makefile$/$1/;
die "Invalid module $module in $make" unless "$dir.exe" eq $module;
next if defined $makefile{"=skip"};
push @subdirs, $dir;
push @ignores, "programs/$dir/$dir";
push @install_subdirs, $dir unless $dont_install{$dir};
push @install_progs, $dir if $bin_install{$dir};
}
replace_in_file( "programs/Makefile.in", '^SUBDIRS\s*=', '^INSTALLDIRS',
"SUBDIRS = \\\n\t",
join( " \\\n\t", @subdirs ),
"\n\n# Sub-directories to run make install into\nINSTALLSUBDIRS = \\\n\t",
join( " \\\n\t", @install_subdirs ),
"\n\n# Programs to install in bin directory\nINSTALLPROGS = \\\n\t",
join( " \\\n\t", @install_progs ),
"\n\nINSTALLDIRS = \$(DESTDIR)\$(bindir)\n" );
return @ignores;
}
################################################################
# update include/Makefile.in
sub update_includes()
......@@ -592,6 +565,10 @@ sub update_gitignore(@)
{
push @ignores, map { s/\$\(EXEEXT\)//; $dir . $_; } @{$makefile{"PROGRAMS"}};
}
if ($dir =~ /^programs\/(.*)\/$/)
{
push @ignores, "$dir$1";
}
}
# prepend a slash to paths that don't have one
......@@ -628,5 +605,4 @@ update_makefiles( @makefiles );
push @ignores, update_ignores( @makefiles );
push @ignores, update_winetest( @makefiles );
push @ignores, update_dlls( sort grep /^dlls\//, @makefiles );
push @ignores, update_progs( sort grep /^programs\/.*\/Makefile$/, @makefiles );
update_gitignore( @ignores );
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment