Module: wine Branch: master Commit: d81a8f8d47731db79d3d2936cb8b15c97f6fe964 URL: http://source.winehq.org/git/wine.git/?a=commit;h=d81a8f8d47731db79d3d2936cb...
Author: Alexandre Julliard julliard@winehq.org Date: Sat Mar 20 15:02:56 2010 +0100
makefiles: Add a configure macro for tools directories.
---
aclocal.m4 | 24 +++++++++++++++++++++ configure | 55 ++++++++++++++++++++++++------------------------- configure.ac | 14 ++++++------ tools/make_makefiles | 3 +- 4 files changed, 60 insertions(+), 36 deletions(-)
diff --git a/aclocal.m4 b/aclocal.m4 index f9c0b38..ac03af2 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -268,6 +268,23 @@ $ac_dir/__clean__ $ac_dir/__crosstest__ $ac_dir: $ac_dir/Makefile $ac_dir/Makefile $ac_dir/__depend__: $ac_dir/Makefile.in config.status Maketest.rules $(MAKEDEP) @./config.status --file $ac_dir/Makefile && cd $ac_dir && $(MAKE) depend" AS_VAR_IF([enable_tests],[no],,[wine_fn_append_file ALL_TEST_DIRS $ac_dir]) +} + +wine_fn_config_tool () +{ + ac_dir=$[1] + ac_deps="Make.rules" + if test "$ac_dir" != tools + then + dnl makedep is in tools so tools makefile cannot depend on it + ac_deps="$ac_deps $(MAKEDEP)" + fi + wine_fn_append_file ALL_DIRS $ac_dir + wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ +"$ac_dir/__clean__ $ac_dir/__install__ $ac_dir/__install-dev__ $ac_dir/__install-lib__ $ac_dir/__uninstall__ $ac_dir: $ac_dir/Makefile +$ac_dir/Makefile $ac_dir/__depend__: $ac_dir/Makefile.in config.status $ac_deps + @./config.status --file $ac_dir/Makefile && cd $ac_dir && $(MAKE) depend" + AS_VAR_IF([enable_tools],[no],,[wine_fn_append_file ALL_TOOL_DIRS $ac_dir]) }])
dnl **** Define helper function to append a file to a makefile file list **** @@ -360,6 +377,13 @@ dnl AC_DEFUN([WINE_CONFIG_LIB],[AC_REQUIRE([WINE_CONFIG_HELPERS])dnl wine_fn_config_lib $1])
+dnl **** Create a tool makefile from config.status **** +dnl +dnl Usage: WINE_CONFIG_TOOL(name) +dnl +AC_DEFUN([WINE_CONFIG_TOOL],[AC_REQUIRE([WINE_CONFIG_HELPERS])dnl +wine_fn_config_tool $1]) + dnl **** Add a message to the list displayed at the end **** dnl dnl Usage: WINE_NOTICE(notice) diff --git a/configure b/configure index 8cfccff..1ee7db2 100755 --- a/configure +++ b/configure @@ -13957,6 +13957,26 @@ else wine_fn_append_file ALL_TEST_DIRS $ac_dir fi } + +wine_fn_config_tool () +{ + ac_dir=$1 + ac_deps="Make.rules" + if test "$ac_dir" != tools + then + ac_deps="$ac_deps $(MAKEDEP)" + fi + wine_fn_append_file ALL_DIRS $ac_dir + wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ +"$ac_dir/__clean__ $ac_dir/__install__ $ac_dir/__install-dev__ $ac_dir/__install-lib__ $ac_dir/__uninstall__ $ac_dir: $ac_dir/Makefile +$ac_dir/Makefile $ac_dir/__depend__: $ac_dir/Makefile.in config.status $ac_deps + @./config.status --file $ac_dir/Makefile && cd $ac_dir && $(MAKE) depend" + if test "x$enable_tools" = x""no; then : + +else + wine_fn_append_file ALL_TOOL_DIRS $ac_dir +fi +} ac_config_links="$ac_config_links dlls/wineps.drv/generic.ppd:dlls/wineps.drv/generic.ppd" test "$srcdir" = "." || wine_fn_append_file ALL_SYMLINKS "dlls/wineps.drv/generic.ppd" ac_config_links="$ac_config_links fonts/marlett.ttf:fonts/marlett.ttf" @@ -14569,27 +14589,13 @@ wine_fn_config_program xcopy enable_xcopy install wine_fn_config_makefile server "Make.rules $(MAKEDEP)" test "x$enable_server" != xno && wine_fn_append_file ALL_TOP_DIRS "server"
-wine_fn_config_makefile tools Make.rules -test "x$enable_tools" != xno && wine_fn_append_file ALL_TOOL_DIRS "tools" - -wine_fn_config_makefile tools/widl "Make.rules $(MAKEDEP)" -test "x$enable_tools" != xno && wine_fn_append_file ALL_TOOL_DIRS "tools/widl" - -wine_fn_config_makefile tools/winebuild "Make.rules $(MAKEDEP)" -test "x$enable_tools" != xno && wine_fn_append_file ALL_TOOL_DIRS "tools/winebuild" - -wine_fn_config_makefile tools/winedump "Make.rules $(MAKEDEP)" -test "x$enable_tools" != xno && wine_fn_append_file ALL_TOOL_DIRS "tools/winedump" - -wine_fn_config_makefile tools/winegcc "Make.rules $(MAKEDEP)" -test "x$enable_tools" != xno && wine_fn_append_file ALL_TOOL_DIRS "tools/winegcc" - -wine_fn_config_makefile tools/wmc "Make.rules $(MAKEDEP)" -test "x$enable_tools" != xno && wine_fn_append_file ALL_TOOL_DIRS "tools/wmc" - -wine_fn_config_makefile tools/wrc "Make.rules $(MAKEDEP)" -test "x$enable_tools" != xno && wine_fn_append_file ALL_TOOL_DIRS "tools/wrc" - +wine_fn_config_tool tools +wine_fn_config_tool tools/widl +wine_fn_config_tool tools/winebuild +wine_fn_config_tool tools/winedump +wine_fn_config_tool tools/winegcc +wine_fn_config_tool tools/wmc +wine_fn_config_tool tools/wrc
test -n "$DLLEXT" || ALL_PROGRAM_BIN_INSTALL_DIRS=""
@@ -15314,13 +15320,6 @@ do "loader/Makefile") CONFIG_FILES="$CONFIG_FILES loader/Makefile" ;; "programs/Makefile") CONFIG_FILES="$CONFIG_FILES programs/Makefile" ;; "server/Makefile") CONFIG_FILES="$CONFIG_FILES server/Makefile" ;; - "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;; - "tools/widl/Makefile") CONFIG_FILES="$CONFIG_FILES tools/widl/Makefile" ;; - "tools/winebuild/Makefile") CONFIG_FILES="$CONFIG_FILES tools/winebuild/Makefile" ;; - "tools/winedump/Makefile") CONFIG_FILES="$CONFIG_FILES tools/winedump/Makefile" ;; - "tools/winegcc/Makefile") CONFIG_FILES="$CONFIG_FILES tools/winegcc/Makefile" ;; - "tools/wmc/Makefile") CONFIG_FILES="$CONFIG_FILES tools/wmc/Makefile" ;; - "tools/wrc/Makefile") CONFIG_FILES="$CONFIG_FILES tools/wrc/Makefile" ;;
*) as_fn_error "invalid argument: `$ac_config_target'" "$LINENO" 5;; esac diff --git a/configure.ac b/configure.ac index 4ec7363..55edefc 100644 --- a/configure.ac +++ b/configure.ac @@ -2700,13 +2700,13 @@ WINE_CONFIG_PROGRAM(wordpad,install) WINE_CONFIG_PROGRAM(write,install) WINE_CONFIG_PROGRAM(xcopy,install) WINE_CONFIG_MAKEFILE([server/Makefile],[Make.rules],[ALL_TOP_DIRS]) -WINE_CONFIG_MAKEFILE([tools/Makefile],[Make.rules],[ALL_TOOL_DIRS],enable_tools) -WINE_CONFIG_MAKEFILE([tools/widl/Makefile],[Make.rules],[ALL_TOOL_DIRS],enable_tools) -WINE_CONFIG_MAKEFILE([tools/winebuild/Makefile],[Make.rules],[ALL_TOOL_DIRS],enable_tools) -WINE_CONFIG_MAKEFILE([tools/winedump/Makefile],[Make.rules],[ALL_TOOL_DIRS],enable_tools) -WINE_CONFIG_MAKEFILE([tools/winegcc/Makefile],[Make.rules],[ALL_TOOL_DIRS],enable_tools) -WINE_CONFIG_MAKEFILE([tools/wmc/Makefile],[Make.rules],[ALL_TOOL_DIRS],enable_tools) -WINE_CONFIG_MAKEFILE([tools/wrc/Makefile],[Make.rules],[ALL_TOOL_DIRS],enable_tools) +WINE_CONFIG_TOOL(tools) +WINE_CONFIG_TOOL(tools/widl) +WINE_CONFIG_TOOL(tools/winebuild) +WINE_CONFIG_TOOL(tools/winedump) +WINE_CONFIG_TOOL(tools/winegcc) +WINE_CONFIG_TOOL(tools/wmc) +WINE_CONFIG_TOOL(tools/wrc) dnl End of auto-generated output commands
dnl Don't install in bin dir for Windows build diff --git a/tools/make_makefiles b/tools/make_makefiles index ed2278e..33fcbc0 100755 --- a/tools/make_makefiles +++ b/tools/make_makefiles @@ -392,7 +392,8 @@ sub update_makefiles(@) } elsif ($file =~ /^tools.*/Makefile$/) { - push @lines, "WINE_CONFIG_MAKEFILE([$file],[$rules],[ALL_TOOL_DIRS],enable_tools)\n"; + (my $name = $file) =~ s/^(.*)/Makefile/$1/; + push @lines, "WINE_CONFIG_TOOL($name)\n"; } elsif ($file =~ /^[^/]*/Makefile$/) {