makefiles: Generate rules from makedep for .in files.

This commit is contained in:
Alexandre Julliard 2013-12-12 20:04:53 +01:00
parent cc978c90d4
commit c2efb3b382
8 changed files with 23 additions and 23 deletions

View file

@ -78,7 +78,7 @@ $(IMPORTLIB:%=lib%.cross.a): $(MAINSPEC) $(IMPLIB_SRCS:.c=.cross.o)
DEPEND_SRCS = $(C_SRCS) $(OBJC_SRCS) $(RC_SRCS) $(MC_SRCS) \
$(IDL_H_SRCS) $(IDL_C_SRCS) $(IDL_I_SRCS) $(IDL_P_SRCS) $(IDL_S_SRCS) $(IDL_R_SRCS) $(IDL_TLB_SRCS) \
$(BISON_SRCS) $(LEX_SRCS) $(XTEMPLATE_SRCS) $(EXTRA_OBJS) $(MANPAGES)
$(BISON_SRCS) $(LEX_SRCS) $(XTEMPLATE_SRCS) $(IN_SRCS) $(EXTRA_OBJS) $(MANPAGES)
depend: dummy
$(MAKEDEP) $(MAKEDEPFLAGS) -C$(srcdir) -S$(top_srcdir) -T$(top_builddir) $(PARENTSRC:%=-P%) $(EXTRAINCL) $(DEPEND_SRCS)

View file

@ -70,7 +70,7 @@ LIBWINE = -L$(top_builddir)/libs/wine -lwine
LIBWINE_STATIC = $(top_builddir)/libs/wine/libwine_static.a
WINEGCC = $(TOOLSDIR)/tools/winegcc/winegcc $(TARGETFLAGS) -B$(TOOLSDIR)/tools/winebuild --sysroot=$(top_builddir) @UNWINDFLAGS@
CROSSWINEGCC = $(TOOLSDIR)/tools/winegcc/winegcc $(CROSSTARGET:%=-b %) -B$(TOOLSDIR)/tools/winebuild --sysroot=$(top_builddir) --lib-suffix=.cross.a
SED_CMD = LC_ALL=C sed -e 's,@bindir\@,$(bindir),g' -e 's,@dlldir\@,$(dlldir),g' -e 's,@PACKAGE_STRING\@,@PACKAGE_STRING@,g'
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'
LDRPATH_INSTALL = @LDRPATH_INSTALL@
LDRPATH_LOCAL = @LDRPATH_LOCAL@
INSTALL = @INSTALL@ $(INSTALL_FLAGS)

6
configure vendored
View file

@ -7493,9 +7493,6 @@ $wine_binary: main.o wine_info.plist
wine-installed: main.o wine_info.plist
\$(CC) -o \$@ $LDEXECFLAGS main.o \$(LIBWINE) \$(LIBPORT) \$(EXTRALIBS) \$(LDFLAGS) \$(LDRPATH_INSTALL)
wine_info.plist: wine_info.plist.in \$(top_builddir)/include/config.h
LC_ALL=C sed -e 's,@PACKAGE_VERSION@,$PACKAGE_VERSION,g' \$(srcdir)/wine_info.plist.in >\$@ || (\$(RM) \$@ && false)
"
;;
@ -17566,9 +17563,6 @@ else
as_fn_append LOADER_RULES "
all: wine.inf
wine.inf: wine.inf.in \$(top_builddir)/include/config.h
LC_ALL=C sed -e 's,@PACKAGE_STRING@,$PACKAGE_STRING,g' \$(srcdir)/wine.inf.in >\$@ || (\$(RM) \$@ && false)
install install-lib:: wine.inf \$(DESTDIR)\$(datadir)/wine install-man-pages
\$(INSTALL_DATA) wine.inf \$(DESTDIR)\$(datadir)/wine/wine.inf
\$(INSTALL_DATA) \$(srcdir)/l_intl.nls \$(DESTDIR)\$(datadir)/wine/l_intl.nls

View file

@ -878,9 +878,6 @@ $wine_binary: main.o wine_info.plist
wine-installed: main.o wine_info.plist
\$(CC) -o \$@ $LDEXECFLAGS main.o \$(LIBWINE) \$(LIBPORT) \$(EXTRALIBS) \$(LDFLAGS) \$(LDRPATH_INSTALL)
wine_info.plist: wine_info.plist.in \$(top_builddir)/include/config.h
LC_ALL=C sed -e 's,@PACKAGE_VERSION@,$PACKAGE_VERSION,g' \$(srcdir)/wine_info.plist.in >\$@ || (\$(RM) \$@ && false)
"])
;;
@ -3538,9 +3535,6 @@ else
AS_VAR_APPEND([LOADER_RULES],["
all: wine.inf
wine.inf: wine.inf.in \$(top_builddir)/include/config.h
LC_ALL=C sed -e 's,@PACKAGE_STRING@,$PACKAGE_STRING,g' \$(srcdir)/wine.inf.in >\$@ || (\$(RM) \$@ && false)
install install-lib:: wine.inf \$(DESTDIR)\$(datadir)/wine install-man-pages
\$(INSTALL_DATA) wine.inf \$(DESTDIR)\$(datadir)/wine/wine.inf
\$(INSTALL_DATA) \$(srcdir)/l_intl.nls \$(DESTDIR)\$(datadir)/wine/l_intl.nls

View file

@ -20,6 +20,10 @@ MANPAGES = \
wine.man.in \
wine.pl.UTF-8.man.in
IN_SRCS = \
wine.inf.in \
wine_info.plist.in
INSTALLDIRS = \
$(DESTDIR)$(bindir) \
$(DESTDIR)$(datadir)/wine

View file

@ -20,6 +20,9 @@ C_SRCS = \
makedep.c \
sfnt2fnt.c
IN_SRCS = \
wineapploader.in
INSTALLDIRS = \
$(DESTDIR)$(bindir) \
$(DESTDIR)$(datadir)/applications
@ -42,9 +45,6 @@ fnt2fon$(EXEEXT): fnt2fon.o
sfnt2fnt$(EXEEXT): sfnt2fnt.o
$(CC) $(CFLAGS) -o $@ sfnt2fnt.o $(LIBWINE_STATIC) $(LIBPORT) $(LDFLAGS) $(FREETYPELIBS)
wineapploader: wineapploader.in
sed -e 's,@bindir\@,$(bindir),g' $(srcdir)/wineapploader.in >$@ || ($(RM) $@ && false)
install install-lib:: $(DESTDIR)$(datadir)/applications
$(INSTALL_DATA) $(srcdir)/wine.desktop $(DESTDIR)$(datadir)/applications/wine.desktop
-$(UPDATE_DESKTOP_DATABASE)

View file

@ -328,7 +328,7 @@ sub parse_makefile($)
${$make{"=flags"}}{"implib"} = 1 if $var eq "IMPORTLIB";
next;
}
if (/^\s*(BISON_SRCS|LEX_SRCS|IDL_[CHIPRS]_SRCS|IDL_TLB_SRCS|IMPLIB_SRCS|C_SRCS|OBJC_SRCS|MC_SRCS|RC_SRCS|PO_SRCS|SVG_SRCS|PROGRAMS|MANPAGES)\s*=\s*(.*)/)
if (/^\s*(BISON_SRCS|LEX_SRCS|IDL_[CHIPRS]_SRCS|IDL_TLB_SRCS|IMPLIB_SRCS|C_SRCS|OBJC_SRCS|MC_SRCS|RC_SRCS|PO_SRCS|SVG_SRCS|IN_SRCS|PROGRAMS|MANPAGES)\s*=\s*(.*)/)
{
my $var = $1;
my @list = split(/\s+/, $2);
@ -422,6 +422,7 @@ sub assign_sources_to_makefiles(@)
foreach my $file (@_)
{
next if defined $ignored_source_files{$file};
next if $file =~ /Makefile\.in$/;
my $dir = dirname( $file );
my $subdir = $dir;
@ -501,6 +502,10 @@ sub assign_sources_to_makefiles(@)
push @{${$make}{"=MANPAGES"}}, $name;
${${$make}{"=flags"}}{"manpage"} = 1;
}
elsif ($name =~ /\.in$/)
{
push @{${$make}{"=IN_SRCS"}}, $name;
}
}
}
@ -625,6 +630,7 @@ sub update_makefiles(@)
replace_makefile_variable( $file, "IDL_S_SRCS" );
replace_makefile_variable( $file, "IDL_TLB_SRCS" );
replace_makefile_variable( $file, "XTEMPLATE_SRCS" );
replace_makefile_variable( $file, "IN_SRCS" );
replace_makefile_variable( $file, "IMPLIB_SRCS" );
replace_makefile_variable( $file, "SRCDIR_INCLUDES" );
replace_makefile_variable( $file, "MANPAGES" );

View file

@ -914,15 +914,17 @@ static void parse_rc_file( struct incl_file *pFile, FILE *file )
/*******************************************************************
* parse_man_page
* parse_in_file
*/
static void parse_man_page( struct incl_file *source, FILE *file )
static void parse_in_file( struct incl_file *source, FILE *file )
{
char *p, *buffer;
/* make sure it gets rebuilt when the version changes */
add_include( source, "config.h", 1 );
if (!strendswith( source->filename, ".man.in" )) return; /* not a man page */
input_line = 0;
while ((buffer = get_line( file )))
{
@ -1012,8 +1014,8 @@ static void parse_file( struct incl_file *source, int src )
parse_c_file( source, file );
else if (strendswith( source->filename, ".rc" ))
parse_rc_file( source, file );
else if (strendswith( source->filename, ".man.in" ))
parse_man_page( source, file );
else if (strendswith( source->filename, ".in" ))
parse_in_file( source, file );
fclose(file);
input_file_name = NULL;
}
@ -1269,7 +1271,7 @@ static void output_sources(void)
}
column += output( " %s", source->filename );
}
else if (!strcmp( ext, "in" )) /* man page */
else if (!strcmp( ext, "in" )) /* .in file or man page */
{
if (strendswith( obj, ".man" ) && source->sourcename)
{