makedep: Generate a list of phony targets.

This commit is contained in:
Alexandre Julliard 2013-12-28 11:41:45 +01:00
parent e48720236a
commit 3b7cc5ec92
4 changed files with 15 additions and 6 deletions

View File

@ -85,8 +85,6 @@ $(WINETEST_RES): $(TESTMODULE_STRIPPED)
all: $(MANPAGES:.man.in=.man) all: $(MANPAGES:.man.in=.man)
.PHONY: install-man-pages
# Rules for cleaning # Rules for cleaning
clean:: clean::

3
configure vendored
View File

@ -16602,8 +16602,6 @@ EXTRA_OBJS = testlist.o
all: \$(TESTMODULE)$DLLEXT \$(WINETEST_RES) all: \$(TESTMODULE)$DLLEXT \$(WINETEST_RES)
\$(C_SRCS:.c=.ok): \$(TESTMODULE)$DLLEXT \$(TESTDLL:%=../%$DLLEXT) \$(C_SRCS:.c=.ok): \$(TESTMODULE)$DLLEXT \$(TESTDLL:%=../%$DLLEXT)
.PHONY: check test testclean crosstest
" "
if test -n "$CROSSTARGET" if test -n "$CROSSTARGET"
@ -16613,6 +16611,7 @@ MAKEDEPFLAGS = -xo -xcross.o
CROSSTESTMODULE = \$(TESTDLL:%.dll=%)_crosstest.exe CROSSTESTMODULE = \$(TESTDLL:%.dll=%)_crosstest.exe
crosstest: \$(CROSSTESTMODULE) crosstest: \$(CROSSTESTMODULE)
.PHONY: crosstest
" "
fi fi

View File

@ -2658,8 +2658,6 @@ EXTRA_OBJS = testlist.o
all: \$(TESTMODULE)$DLLEXT \$(WINETEST_RES) all: \$(TESTMODULE)$DLLEXT \$(WINETEST_RES)
\$(C_SRCS:.c=.ok): \$(TESTMODULE)$DLLEXT \$(TESTDLL:%=../%$DLLEXT) \$(C_SRCS:.c=.ok): \$(TESTMODULE)$DLLEXT \$(TESTDLL:%=../%$DLLEXT)
.PHONY: check test testclean crosstest
") ")
if test -n "$CROSSTARGET" if test -n "$CROSSTARGET"
then then
@ -2668,6 +2666,7 @@ MAKEDEPFLAGS = -xo -xcross.o
CROSSTESTMODULE = \$(TESTDLL:%.dll=%)_crosstest.exe CROSSTESTMODULE = \$(TESTDLL:%.dll=%)_crosstest.exe
crosstest: \$(CROSSTESTMODULE) crosstest: \$(CROSSTESTMODULE)
.PHONY: crosstest
") ")
fi fi

View File

@ -1350,6 +1350,7 @@ static struct strarray output_sources(void)
struct strarray dlldata_files = empty_strarray; struct strarray dlldata_files = empty_strarray;
struct strarray includes = empty_strarray; struct strarray includes = empty_strarray;
struct strarray subdirs = empty_strarray; struct strarray subdirs = empty_strarray;
struct strarray phony_targets = empty_strarray;
strarray_add( &includes, "-I." ); strarray_add( &includes, "-I." );
if (src_dir) strarray_add( &includes, strmake( "-I%s", src_dir )); if (src_dir) strarray_add( &includes, strmake( "-I%s", src_dir ));
@ -1492,6 +1493,7 @@ static struct strarray output_sources(void)
dir, dest, source->sourcename ); dir, dest, source->sourcename );
free( dest ); free( dest );
free( dir ); free( dir );
strarray_add_uniq( &phony_targets, "install-man-pages" );
} }
strarray_add( &clean_files, xstrdup(obj) ); strarray_add( &clean_files, xstrdup(obj) );
output( "%s: %s\n", obj, sourcedep ); output( "%s: %s\n", obj, sourcedep );
@ -1631,6 +1633,9 @@ static struct strarray output_sources(void)
output_filenames( &ok_files, &column ); output_filenames( &ok_files, &column );
output( "\n" ); output( "\n" );
strarray_addall( &clean_files, &ok_files ); strarray_addall( &clean_files, &ok_files );
strarray_add( &phony_targets, "check" );
strarray_add( &phony_targets, "test" );
strarray_add( &phony_targets, "testclean" );
} }
if (clean_files.count) if (clean_files.count)
@ -1648,6 +1653,14 @@ static struct strarray output_sources(void)
output( ":\n" ); output( ":\n" );
output( "\t$(MKDIR_P) -m 755 $@\n" ); output( "\t$(MKDIR_P) -m 755 $@\n" );
} }
if (phony_targets.count)
{
column = output( ".PHONY:" );
output_filenames( &phony_targets, &column );
output( "\n" );
}
return clean_files; return clean_files;
} }