makefiles: Generate explicit build rules for bison files from makedep.

oldstable
Alexandre Julliard 2013-10-14 19:52:52 +02:00
parent efef36c05a
commit c00cc015f8
2 changed files with 12 additions and 9 deletions

View File

@ -36,7 +36,7 @@ CROSSOBJS = $(OBJS:.o=.cross.o)
# Implicit rules
.SUFFIXES: .mc .rc .res .idl .tlb .h .y .tab.c .tab.h .ok .man.in .man _c.c _i.c _p.c _s.c _r.res _t.res .cross.o .po .mo @MAINTAINER_MODE@ .sfd .ttf .svg .ico .bmp
.SUFFIXES: .mc .rc .res .idl .tlb .h .ok .man.in .man _c.c _i.c _p.c _s.c _r.res _t.res .cross.o .po .mo @MAINTAINER_MODE@ .sfd .ttf .svg .ico .bmp
.c.o:
$(CC) -c $(ALLCFLAGS) -o $@ $<
@ -47,12 +47,6 @@ CROSSOBJS = $(OBJS:.o=.cross.o)
.c.cross.o:
$(CROSSCC) -c $(INCLUDES) $(DEFS) -DWINE_CROSSTEST $(CPPFLAGS) $(CFLAGS) -o $@ $<
.y.tab.c:
$(BISON) $(BISONFLAGS) -p $*_ -o $@ $<
.y.tab.h:
$(BISON) $(BISONFLAGS) -p $*_ -o $*.tab.c -d $<
.mc.res:
$(WMC) -U -O res $(PORCFLAGS) -o $@ $<

View File

@ -941,9 +941,18 @@ static void output_sources(void)
{
/* add source file dependency for parallel makes */
char *header = strmake( "%s.tab.h", obj );
if (find_include_file( header )) output( "%s.tab.c: %s\n", obj, header );
free( header );
if (find_include_file( header ))
{
output( "%s.tab.h: %s\n", obj, source->filename );
output( "\t$(BISON) $(BISONFLAGS) -p %s_ -o %s.tab.c -d %s\n",
obj, obj, source->filename );
output( "%s.tab.c: %s %s\n", obj, source->filename, header );
}
else output( "%s.tab.c: %s\n", obj, source->filename );
output( "\t$(BISON) $(BISONFLAGS) -p %s_ -o $@ %s\n", obj, source->filename );
column += output( "%s.tab.o: %s.tab.c", obj, obj );
free( header );
}
else if (!strcmp( ext, "l" )) /* lex file */
{