From: nuffer Date: Sat, 22 May 2004 03:30:41 +0000 (+0000) Subject: Added patch from siebenschlaefer to allow building in a separate dir. X-Git-Tag: 0.13.6~700 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4e7338ee344d84cfecb4794d60448e6337e62aa1;p=re2c Added patch from siebenschlaefer to allow building in a separate dir. --- diff --git a/Makefile.am b/Makefile.am index 712e7ff9..6fb66385 100755 --- a/Makefile.am +++ b/Makefile.am @@ -17,7 +17,7 @@ RE2CFLAGS = -s CLEANFILES = parser.cc y.tab.c y.tab.h parser.cc re2c.1 .version -DISTCLEANFILES = makerpm re2c.spec README scanner.cc re2c +DISTCLEANFILES = makerpm re2c.spec README scanner.cc re2c$(EXEEXT) EXTRA_DIST = $(man_MANS) README parser.y scanner.re makerpm.in re2c.spec.in \ README.in y.tab.h \ @@ -29,17 +29,18 @@ EXTRA_DIST = $(man_MANS) README parser.y scanner.re makerpm.in re2c.spec.in \ rpm-files: $(bin_PROGRAMS) $(EXTRA_DIST) -parser.cc: parser.y - $(YACC) $(YFLAGS) parser.y - mv -f y.tab.c parser.cc +parser.cc: $(top_srcdir)/parser.y + $(YACC) $(YFLAGS) $(top_srcdir)/parser.y + mv -f y.tab.c $(top_srcdir)/parser.cc + mv -f y.tab.h $(top_srcdir)/y.tab.h -scanner.cc: scanner.re - @if test -x ./re2c; then \ +scanner.cc: $(top_srcdir)/scanner.re + @if test -x ./re2c$(EXEEXT); then \ echo "re2c $(RE2CFLAGS) -o $@ $<"; \ - ./re2c $(RE2CFLAGS) -o $@ $< && cp $@ bootstrap/; \ + ./re2c $(RE2CFLAGS) -o $(top_srcdir)/$@ $(top_srcdir)/$< && cp $(top_srcdir)/$@ $(top_srcdir)/bootstrap/; \ else \ - echo "cp -f bootstrap/$@ $@"; \ - cp -f bootstrap/$@ $@; \ + echo "cp -f $(top_srcdir)/bootstrap/$@ $@"; \ + cp -f $(top_srcdir)/bootstrap/$@ $(top_srcdir)/$@; \ fi .version: