Module: wine Branch: master Commit: c00cc015f827d255b6e239b63e45acff01e19525 URL: http://source.winehq.org/git/wine.git/?a=commit;h=c00cc015f827d255b6e239b63e...
Author: Alexandre Julliard julliard@winehq.org Date: Mon Oct 14 19:52:52 2013 +0200
makefiles: Generate explicit build rules for bison files from makedep.
---
Make.rules.in | 8 +------- tools/makedep.c | 13 +++++++++++-- 2 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/Make.rules.in b/Make.rules.in index 430e91b..a7da5ef 100644 --- a/Make.rules.in +++ b/Make.rules.in @@ -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 $@ $<
diff --git a/tools/makedep.c b/tools/makedep.c index d49c90a..b7c70d2 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -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 */ {