Alexandre Julliard : makefiles: Add support for a variable to list extra targets.

Alexandre Julliard julliard at winehq.org
Wed Jan 1 14:24:21 CST 2014


Module: wine
Branch: master
Commit: 54300b2302c1c1f290bc5831915f97d78804a8fb
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=54300b2302c1c1f290bc5831915f97d78804a8fb

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Dec 31 19:21:17 2013 +0100

makefiles: Add support for a variable to list extra targets.

---

 configure                     |    5 +----
 configure.ac                  |    5 +----
 fonts/Makefile.in             |    5 ++---
 programs/winetest/Makefile.in |    3 +--
 tools/make_makefiles          |    3 ++-
 tools/makedep.c               |    1 +
 6 files changed, 8 insertions(+), 14 deletions(-)

diff --git a/configure b/configure
index 24a470b..6fb273b 100755
--- a/configure
+++ b/configure
@@ -17390,10 +17390,6 @@ wine_fn_ignore_file "config.status"
 wine_fn_ignore_file "configure.lineno"
 wine_fn_ignore_file "include/config.h"
 wine_fn_ignore_file "include/stamp-h"
-test "x$enable_fonts" = xno || wine_fn_ignore_file "fonts/*.fon"
-test "x$enable_winetest" = xno || wine_fn_ignore_file "programs/winetest/build.nfo"
-test "x$enable_winetest" = xno || wine_fn_ignore_file "programs/winetest/build.rc"
-test "x$enable_tools" = xno || wine_fn_ignore_file "tools/makedep$ac_exeext"
 test "$wine_binary" = wine || wine_fn_ignore_file "loader/wine"
 
 ac_config_commands="$ac_config_commands Makefile"
@@ -17447,6 +17443,7 @@ if test "x$enable_tools" != xno
 then
     ac_config_commands="$ac_config_commands tools"
 
+    wine_fn_ignore_file "tools/makedep$ac_exeext"
     wine_fn_append_rule "tools/makedep$ac_exeext: $srcdir/tools/makedep.c include/config.h
 	\$(CC) -Iinclude -I$srcdir/include -D__WINESRC__ \$(EXTRACFLAGS) \$(CPPFLAGS) \$(CFLAGS) -o \$@ $srcdir/tools/makedep.c \$(LDFLAGS)
 clean:: __clean__
diff --git a/configure.ac b/configure.ac
index 73eb820..f366657 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3440,10 +3440,6 @@ WINE_IGNORE_FILE("config.status")
 WINE_IGNORE_FILE("configure.lineno")
 WINE_IGNORE_FILE("include/config.h")
 WINE_IGNORE_FILE("include/stamp-h")
-WINE_IGNORE_FILE("fonts/*.fon",enable_fonts)
-WINE_IGNORE_FILE("programs/winetest/build.nfo",enable_winetest)
-WINE_IGNORE_FILE("programs/winetest/build.rc",enable_winetest)
-WINE_IGNORE_FILE("tools/makedep$ac_exeext",enable_tools)
 test "$wine_binary" = wine || WINE_IGNORE_FILE("loader/wine")
 
 AC_CONFIG_COMMANDS([Makefile], [wine_fn_output_makefile Makefile],
@@ -3505,6 +3501,7 @@ fi
 if test "x$enable_tools" != xno
 then
     AC_CONFIG_COMMANDS([tools],[AS_MKDIR_P(tools)])
+    WINE_IGNORE_FILE("tools/makedep$ac_exeext")
     WINE_APPEND_RULE(
 [tools/makedep$ac_exeext: $srcdir/tools/makedep.c include/config.h
 	\$(CC) -Iinclude -I$srcdir/include -D__WINESRC__ \$(EXTRACFLAGS) \$(CPPFLAGS) \$(CFLAGS) -o \$@ $srcdir/tools/makedep.c \$(LDFLAGS)
diff --git a/fonts/Makefile.in b/fonts/Makefile.in
index 6650af5..bfb8714 100644
--- a/fonts/Makefile.in
+++ b/fonts/Makefile.in
@@ -71,6 +71,8 @@ TRUETYPE_FONTS = \
 	tahomabd.ttf \
 	wingding.ttf
 
+EXTRA_TARGETS = $(BITMAP_FONTS)
+
 all: $(BITMAP_FONTS)
 
 @MAKE_RULES@
@@ -234,6 +236,3 @@ install install-lib:: $(BITMAP_FONTS)
 uninstall::
 	-cd $(DESTDIR)$(fontdir) && $(RM) $(BITMAP_FONTS) $(TRUETYPE_FONTS)
 	-rmdir $(DESTDIR)$(fontdir)
-
-clean::
-	$(RM) $(BITMAP_FONTS)
diff --git a/programs/winetest/Makefile.in b/programs/winetest/Makefile.in
index 6865e93..e317c6a 100644
--- a/programs/winetest/Makefile.in
+++ b/programs/winetest/Makefile.in
@@ -16,8 +16,7 @@ SVG_SRCS = winetest.svg
 
 EXTRA_OBJS = build.res @ALL_TEST_RESOURCES@
 
-clean::
-	$(RM) build.rc build.nfo
+EXTRA_TARGETS = build.rc build.nfo
 
 build.rc: dummy
 	build="BUILD_INFO STRINGRES build.nfo STRINGTABLE { 1 \"`GIT_DIR=$(top_srcdir)/.git git rev-parse HEAD 2>/dev/null`\" }" && (echo $$build | cmp -s - $@) || echo $$build >$@ || ($(RM) $@ && exit 1)
diff --git a/tools/make_makefiles b/tools/make_makefiles
index 22d66b5..2dc621a 100755
--- a/tools/make_makefiles
+++ b/tools/make_makefiles
@@ -276,12 +276,13 @@ sub parse_makefile($)
             ${$make{"=flags"}}{"implib"} = 1 if $var eq "IMPORTLIB";
             next;
         }
-        if (/^\s*(BISON_SRCS|LEX_SRCS|IDL_SRCS|IMPLIB_SRCS|C_SRCS|OBJC_SRCS|MC_SRCS|RC_SRCS|SVG_SRCS|FONT_SRCS|IN_SRCS|PROGRAMS|MANPAGES)\s*=\s*(.*)/)
+        if (/^\s*(BISON_SRCS|LEX_SRCS|IDL_SRCS|IMPLIB_SRCS|C_SRCS|OBJC_SRCS|MC_SRCS|RC_SRCS|SVG_SRCS|FONT_SRCS|IN_SRCS|PROGRAMS|EXTRA_TARGETS|MANPAGES)\s*=\s*(.*)/)
         {
             my $var = $1;
             my @list = split(/\s+/, $2);
             $make{$var} = \@list;
             ${$make{"=flags"}}{"clean"} = 1 if $var eq "PROGRAMS";
+            ${$make{"=flags"}}{"clean"} = 1 if $var eq "EXTRA_TARGETS";
             next;
         }
         if (/(install-lib|install-dev|clean)\s*:/)
diff --git a/tools/makedep.c b/tools/makedep.c
index 58e9646..fba15ed 100644
--- a/tools/makedep.c
+++ b/tools/makedep.c
@@ -1907,6 +1907,7 @@ static struct strarray output_sources(void)
     strarray_addall( &clean_files, crossobj_files );
     strarray_addall( &clean_files, res_files );
     strarray_addall( &clean_files, all_targets );
+    strarray_addall( &clean_files, get_expanded_make_var_array( "EXTRA_TARGETS" ));
 
     if (clean_files.count)
     {




More information about the wine-cvs mailing list