makefiles: Install PE files in an architecture-specific directory.
Based on a patch by Jacek Caban. Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f14632f345
commit
c59126d403
|
@ -32,6 +32,7 @@ nlsdir = ${datadir}/wine/nls
|
||||||
dlldir = ${libdir}/wine
|
dlldir = ${libdir}/wine
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
SHELL = /bin/sh
|
SHELL = /bin/sh
|
||||||
|
ARCH = @ARCH@
|
||||||
CC = @CC@
|
CC = @CC@
|
||||||
CXX = @CXX@
|
CXX = @CXX@
|
||||||
CPPBIN = @CPPBIN@
|
CPPBIN = @CPPBIN@
|
||||||
|
|
|
@ -775,6 +775,7 @@ AR
|
||||||
BISON
|
BISON
|
||||||
FLEX
|
FLEX
|
||||||
TOOLSDIR
|
TOOLSDIR
|
||||||
|
ARCH
|
||||||
TARGETFLAGS
|
TARGETFLAGS
|
||||||
LD
|
LD
|
||||||
CPPBIN
|
CPPBIN
|
||||||
|
@ -5870,6 +5871,19 @@ then
|
||||||
test "x$libdir" != "x\${exec_prefix}/lib" || libdir="\${exec_prefix}/lib64"
|
test "x$libdir" != "x\${exec_prefix}/lib" || libdir="\${exec_prefix}/lib64"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
case $host_cpu in
|
||||||
|
*i[3456789]86*) ARCH="i386"
|
||||||
|
;;
|
||||||
|
*x86_64*) ARCH="x86_64"
|
||||||
|
;;
|
||||||
|
*aarch64*) ARCH="aarch64"
|
||||||
|
;;
|
||||||
|
*arm*) ARCH="arm"
|
||||||
|
;;
|
||||||
|
*) ARCH=""
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the directory containing the Wine tools" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the directory containing the Wine tools" >&5
|
||||||
$as_echo_n "checking for the directory containing the Wine tools... " >&6; }
|
$as_echo_n "checking for the directory containing the Wine tools... " >&6; }
|
||||||
if ${wine_cv_toolsdir+:} false; then :
|
if ${wine_cv_toolsdir+:} false; then :
|
||||||
|
|
|
@ -238,6 +238,15 @@ then
|
||||||
test "x$libdir" != "x\${exec_prefix}/lib" || libdir="\${exec_prefix}/lib64"
|
test "x$libdir" != "x\${exec_prefix}/lib" || libdir="\${exec_prefix}/lib64"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
dnl Normalize CPU architecture
|
||||||
|
case $host_cpu in
|
||||||
|
*i[[3456789]]86*) AC_SUBST(ARCH,"i386") ;;
|
||||||
|
*x86_64*) AC_SUBST(ARCH,"x86_64") ;;
|
||||||
|
*aarch64*) AC_SUBST(ARCH,"aarch64") ;;
|
||||||
|
*arm*) AC_SUBST(ARCH,"arm") ;;
|
||||||
|
*) AC_SUBST(ARCH,"") ;;
|
||||||
|
esac
|
||||||
|
|
||||||
AC_CACHE_CHECK([for the directory containing the Wine tools], wine_cv_toolsdir,
|
AC_CACHE_CHECK([for the directory containing the Wine tools], wine_cv_toolsdir,
|
||||||
[wine_cv_toolsdir="$with_wine_tools"
|
[wine_cv_toolsdir="$with_wine_tools"
|
||||||
if test -z "$with_wine_tools"; then
|
if test -z "$with_wine_tools"; then
|
||||||
|
|
|
@ -158,6 +158,8 @@ static const char *tools_ext;
|
||||||
static const char *exe_ext;
|
static const char *exe_ext;
|
||||||
static const char *dll_ext;
|
static const char *dll_ext;
|
||||||
static const char *man_ext;
|
static const char *man_ext;
|
||||||
|
static const char *arch;
|
||||||
|
static const char *pe_dir;
|
||||||
static const char *crosstarget;
|
static const char *crosstarget;
|
||||||
static const char *crossdebug;
|
static const char *crossdebug;
|
||||||
static const char *fontforge;
|
static const char *fontforge;
|
||||||
|
@ -3321,7 +3323,7 @@ static void output_module( struct makefile *make )
|
||||||
}
|
}
|
||||||
strarray_add( &make->all_targets, strmake( "%s", make->module ));
|
strarray_add( &make->all_targets, strmake( "%s", make->module ));
|
||||||
add_install_rule( make, make->module, strmake( "%s", make->module ),
|
add_install_rule( make, make->module, strmake( "%s", make->module ),
|
||||||
strmake( "c$(dlldir)/%s", make->module ));
|
strmake( "c%s/%s", pe_dir, make->module ));
|
||||||
debug_file = get_debug_file( make, make->module );
|
debug_file = get_debug_file( make, make->module );
|
||||||
output( "%s:", module_path );
|
output( "%s:", module_path );
|
||||||
}
|
}
|
||||||
|
@ -4434,6 +4436,7 @@ int main( int argc, char *argv[] )
|
||||||
exe_ext = get_expanded_make_variable( top_makefile, "EXEEXT" );
|
exe_ext = get_expanded_make_variable( top_makefile, "EXEEXT" );
|
||||||
man_ext = get_expanded_make_variable( top_makefile, "api_manext" );
|
man_ext = get_expanded_make_variable( top_makefile, "api_manext" );
|
||||||
dll_ext = (exe_ext && !strcmp( exe_ext, ".exe" )) ? "" : ".so";
|
dll_ext = (exe_ext && !strcmp( exe_ext, ".exe" )) ? "" : ".so";
|
||||||
|
arch = get_expanded_make_variable( top_makefile, "ARCH" );
|
||||||
crosstarget = get_expanded_make_variable( top_makefile, "CROSSTARGET" );
|
crosstarget = get_expanded_make_variable( top_makefile, "CROSSTARGET" );
|
||||||
crossdebug = get_expanded_make_variable( top_makefile, "CROSSDEBUG" );
|
crossdebug = get_expanded_make_variable( top_makefile, "CROSSDEBUG" );
|
||||||
fontforge = get_expanded_make_variable( top_makefile, "FONTFORGE" );
|
fontforge = get_expanded_make_variable( top_makefile, "FONTFORGE" );
|
||||||
|
@ -4454,6 +4457,10 @@ int main( int argc, char *argv[] )
|
||||||
if (!exe_ext) exe_ext = "";
|
if (!exe_ext) exe_ext = "";
|
||||||
if (!tools_ext) tools_ext = "";
|
if (!tools_ext) tools_ext = "";
|
||||||
if (!man_ext) man_ext = "3w";
|
if (!man_ext) man_ext = "3w";
|
||||||
|
if (arch)
|
||||||
|
pe_dir = strmake( "$(dlldir)/%s-windows", arch );
|
||||||
|
else
|
||||||
|
pe_dir = "$(dlldir)";
|
||||||
|
|
||||||
top_makefile->src_dir = root_src_dir;
|
top_makefile->src_dir = root_src_dir;
|
||||||
subdirs = get_expanded_make_var_array( top_makefile, "SUBDIRS" );
|
subdirs = get_expanded_make_var_array( top_makefile, "SUBDIRS" );
|
||||||
|
|
Loading…
Reference in New Issue