Commit 37c0f5c6 authored by Alexandre Julliard's avatar Alexandre Julliard

makefiles: Substitute all defined variables in the main makefile.

parent 1aa16d05
......@@ -21,74 +21,7 @@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
datarootdir = @datarootdir@
datadir = @datadir@
mandir = @mandir@
includedir = @includedir@
fontdir = ${datadir}/wine/fonts
nlsdir = ${datadir}/wine/nls
dlldir = ${libdir}/wine
srcdir = @srcdir@
host_cpu = @host_cpu@
SHELL = /bin/sh
CC = @CC@
CXX = @CXX@
CPPBIN = @CPPBIN@
CROSSCC = @CROSSCC@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
CROSSCFLAGS = @CROSSCFLAGS@
CROSSLDFLAGS = @CROSSLDFLAGS@
EXTRACFLAGS = @EXTRACFLAGS@
EXTRACROSSCFLAGS= @EXTRACROSSCFLAGS@
MSVCRTFLAGS = @MSVCRTFLAGS@
TARGETFLAGS = @TARGETFLAGS@
LDDLLFLAGS = @LDDLLFLAGS@
LDEXECFLAGS = @LDEXECFLAGS@
UNIXDLLFLAGS = @UNIXDLLFLAGS@
UNIXLDFLAGS = @UNIXLDFLAGS@
LIBS = @LIBS@
BISON = @BISON@
FLEX = @FLEX@
EXEEXT = @EXEEXT@
TOOLSEXT = @TOOLSEXT@
DLLTOOL = @DLLTOOL@
AR = @AR@
RANLIB = @RANLIB@
STRIP = @STRIP@
LN_S = @LN_S@
TOOLSDIR = @TOOLSDIR@
LD = @LD@
LDFLAGS = @LDFLAGS@
DLLFLAGS = @DLLFLAGS@
PRELINK = @PRELINK@
FONTFORGE = @FONTFORGE@
RSVG = @RSVG@
CONVERT = @CONVERT@
ICOTOOL = @ICOTOOL@
MSGFMT = @MSGFMT@
CROSSTARGET = @CROSSTARGET@
CROSSDEBUG = @CROSSDEBUG@
SUBDIRS = @SUBDIRS@
RUNTESTFLAGS = -q -P wine
MAKEDEP = $(TOOLSDIR)/tools/makedep$(TOOLSEXT)
DELAYLOADFLAG = @DELAYLOADFLAG@
PACKAGE_VERSION = @PACKAGE_VERSION@
SED_CMD = LC_ALL=C sed -e 's,@bindir\@,${bindir},g' -e 's,@dlldir\@,${dlldir},g' -e 's,@PACKAGE_STRING\@,@PACKAGE_STRING@,g' -e 's,@PACKAGE_VERSION\@,@PACKAGE_VERSION@,g'
api_manext = 3w
WINELOADER_PROGRAMS = @WINELOADER_PROGRAMS@
WINELOADER_DEPENDS = @WINELOADER_DEPENDS@
WINELOADER_LDFLAGS = @WINELOADER_LDFLAGS@
WINEPRELOADER_LDFLAGS = @WINEPRELOADER_LDFLAGS@
LIBWINE_SHAREDLIB = @LIBWINE_SHAREDLIB@
LIBWINE_LDFLAGS = @LIBWINE_LDFLAGS@
LIBWINE_DEPENDS = @LIBWINE_DEPENDS@
DISABLED_SUBDIRS = @DISABLED_SUBDIRS@
CONFIGURE_TARGETS = @CONFIGURE_TARGETS@
TOP_INSTALL_LIB = @TOP_INSTALL_LIB@
TOP_INSTALL_DEV = @TOP_INSTALL_DEV@
@ALL_VARS_RULES@
@SET_MAKE@
......
......@@ -21,10 +21,6 @@ m4_ifdef([AS_VAR_IF],,[AC_DEFUN([AS_VAR_IF],
[AS_IF([test "x$$1" = x""$2], [$3], [$4])],
[eval as_val=\$$1
AS_IF([test "x$as_val" = x""$2], [$3], [$4])])])])dnl
dnl autoconf versions before 2.64 don't have AC_PACKAGE_URL
m4_ifdef([AC_PACKAGE_URL],,
[AC_DEFINE([PACKAGE_URL], ["https://www.winehq.org"], [Define to the home page for this package.])
AC_SUBST([PACKAGE_URL], ["https://www.winehq.org"])])dnl
dnl **** Command-line arguments ****
......@@ -108,6 +104,11 @@ AC_ARG_WITH(wine64, AS_HELP_STRING([--with-wine64=DIR],[use the 64-bit Wine i
AC_CANONICAL_HOST
AC_SUBST(dlldir,[\${libdir}/wine])
AC_SUBST(fontdir,[\${datadir}/wine/fonts])
AC_SUBST(nlsdir,[\${datadir}/wine/nls])
AC_SUBST(srcdir)
dnl **** Check for some programs ****
AC_PROG_MAKE_SET
......@@ -231,6 +232,11 @@ then
--enable-win64 should be used in the 64-bit build tree, --with-wine64 in the 32-bit Wow64 build tree.])
fi
case $build_os in
cygwin*|mingw32*) AC_SUBST(toolsext,".exe") ;;
*) AC_SUBST(toolsext,"") ;;
esac
AC_CACHE_CHECK([for the directory containing the Wine tools], wine_cv_toolsdir,
[wine_cv_toolsdir="$with_wine_tools"
if test -z "$with_wine_tools"; then
......@@ -241,16 +247,17 @@ AC_CACHE_CHECK([for the directory containing the Wine tools], wine_cv_toolsdir,
fi
fi])
if test -z "$wine_cv_toolsdir"; then
wine_makedep=tools/makedep
AC_SUBST(TOOLSDIR,".")
wine_makedep=tools/makedep$toolsext
elif test -d "$wine_cv_toolsdir/tools/winebuild"; then
wine_makedep=$wine_cv_toolsdir/tools/makedep
AC_SUBST(TOOLSDIR,$wine_cv_toolsdir)
wine_makedep=$wine_cv_toolsdir/tools/makedep$toolsext
enable_tools=${enable_tools:-no}
test -f "$wine_makedep" || AC_MSG_ERROR([the Wine tools have not yet been built in $wine_cv_toolsdir])
else
AC_MSG_ERROR([could not find Wine tools in $wine_cv_toolsdir])
fi
AC_SUBST(toolsdir,[$wine_cv_toolsdir])
AC_SUBST(MAKEDEP,[$wine_makedep])
if test -n "$host_alias" -a "$host_alias" != "$build_alias"
then
TARGETFLAGS="-b $host_alias $TARGETFLAGS"
......@@ -1914,10 +1921,6 @@ fi
dnl **** Platform-specific checks ****
case $build_os in
cygwin*|mingw32*) AC_SUBST(TOOLSEXT,".exe") ;;
esac
case $host_os in
linux*)
case $host_cpu in
......@@ -2396,10 +2399,6 @@ AH_BOTTOM([#endif /* __WINE_CONFIG_H */])
AC_CONFIG_COMMANDS([include/stamp-h], [echo timestamp > include/stamp-h])
AS_ECHO_N("creating Makefile rules...") >&AS_MESSAGE_FD
AC_SUBST([ALL_VARS_RULES],
"m4_set_foreach([_AC_SUBST_VARS],[var],[m4_if(m4_bregexp(m4_defn([var]),[\(_CFLAGS\|_LIBS\)$]),-1,,[var = $var
])])")
makedep_flags=""
test "x$enable_silent_rules" = xyes && makedep_flags="$makedep_flags -S"
......@@ -3815,7 +3814,7 @@ Makefile: tools/makedep$ac_exeext])
else
WINE_APPEND_RULE(
[\$(MAKEDEP):
@echo \"You need to run make in $TOOLSDIR first\" && false])
@echo \"You need to run make in $toolsdir first\" && false])
fi
if test -n "$with_wine64"
......@@ -3862,6 +3861,17 @@ server/wineserver"
esac
fi
dnl Makefile variables
AC_SUBST(SHELL,[/bin/sh])
AC_SUBST(RUNTESTFLAGS,["-q -P wine"])
AC_SUBST(SED_CMD,["LC_ALL=C sed -e 's,@bindir@,\${bindir},g' -e 's,@dlldir@,\${dlldir},g' -e 's,@PACKAGE_STRING@,$PACKAGE_STRING,g' -e 's,@PACKAGE_VERSION@,$PACKAGE_VERSION,g'"])
AC_SUBST(api_manext,[3w])
AC_SUBST([ALL_VARS_RULES],
"m4_set_foreach([_AC_SUBST_VARS],[var],[m4_if(m4_bregexp(m4_defn([var]),[\(^SET_MAKE$\|prefix$\)]),-1,[var = $var
])])")
AS_ECHO(" done") >&AS_MESSAGE_FD
AC_OUTPUT
......
......@@ -51,4 +51,4 @@ MANPAGES = \
EXTRALIBS = $(LDEXECFLAGS) $(RT_LIBS) $(INOTIFY_LIBS)
unicode_EXTRADEFS = -DNLSDIR="\"${nlsdir}\"" -DBIN_TO_NLSDIR=\"`$(MAKEDEP) -R ${bindir} ${nlsdir}`\"
unicode_EXTRADEFS = -DNLSDIR="\"${nlsdir}\"" -DBIN_TO_NLSDIR=\"`${MAKEDEP} -R ${bindir} ${nlsdir}`\"
......@@ -4313,8 +4313,8 @@ int main( int argc, char *argv[] )
delay_load_flag = get_expanded_make_variable( top_makefile, "DELAYLOADFLAG" );
root_src_dir = get_expanded_make_variable( top_makefile, "srcdir" );
tools_dir = get_expanded_make_variable( top_makefile, "TOOLSDIR" );
tools_ext = get_expanded_make_variable( top_makefile, "TOOLSEXT" );
tools_dir = get_expanded_make_variable( top_makefile, "toolsdir" );
tools_ext = get_expanded_make_variable( top_makefile, "toolsext" );
exe_ext = get_expanded_make_variable( top_makefile, "EXEEXT" );
man_ext = get_expanded_make_variable( top_makefile, "api_manext" );
dll_ext = (exe_ext && !strcmp( exe_ext, ".exe" )) ? "" : ".so";
......
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