From: Peter Johnson Date: Sat, 5 Oct 2002 06:00:37 +0000 (-0000) Subject: Undo part of the tools/re2c flattening. Specifying a re2c_CFLAGS causes X-Git-Tag: v0.2.0~113 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c998053da905232d6d266d9f4b9d8aecc6763e6f;p=yasm Undo part of the tools/re2c flattening. Specifying a re2c_CFLAGS causes automake to automatically prepend re2c- to all generated object files, eliminating the main.o conflict. Also, it prevents extended compilation flags from applying to the re2c build. In Makefile.am, also allow automake to automatically include the autoconf conditionally-included files strsep and mergesort. svn path=/trunk/yasm/; revision=739 --- diff --git a/Makefile.am b/Makefile.am index 5ce900fb..a2795384 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,10 +2,9 @@ SUBDIRS = libltdl m4 po . -CFLAGS = @ANSI_CFLAGS@ AM_YFLAGS = -d -INCLUDES = \ - -I$(top_srcdir) \ +AM_CFLAGS = @ANSI_CFLAGS@ +AM_CPPFLAGS = \ -I$(top_srcdir)/src \ -I$(top_srcdir)/check \ @INCLTDL@ @@ -17,6 +16,8 @@ noinst_PROGRAMS = yasm_SOURCES = yasm_LDFLAGS = yasm_LDADD = libyasm.la @LIBLTDL@ $(INTLLIBS) @LIBADD_DL@ +#EXTRA_yasm_SOURCES = \ +# strsep.c mergesort.c lib_LTLIBRARIES = libyasm.la libyasm_la_LIBADD = @LTLIBOBJS@ @@ -36,7 +37,6 @@ include src/Makefile.inc EXTRA_DIST += \ out_test.sh \ test_hd.pl \ - strsep.c mergesort.c \ COPYING.LIB-2.0 \ splint.sh \ Mkfiles/Makefile.flat \ diff --git a/tools/re2c/Makefile.inc b/tools/re2c/Makefile.inc index e113b6bf..4ea8621a 100644 --- a/tools/re2c/Makefile.inc +++ b/tools/re2c/Makefile.inc @@ -2,6 +2,7 @@ noinst_PROGRAMS += re2c +re2c_CFLAGS = re2c_SOURCES = \ tools/re2c/basics.h \ tools/re2c/globals.h \ @@ -11,7 +12,7 @@ re2c_SOURCES = \ tools/re2c/code.c \ tools/re2c/dfa.h \ tools/re2c/dfa.c \ - tools/re2c/re2c.c \ + tools/re2c/main.c \ tools/re2c/parse.h \ tools/re2c/re2c-parser.y \ tools/re2c/actions.c \ diff --git a/tools/re2c/re2c.c b/tools/re2c/main.c similarity index 90% rename from tools/re2c/re2c.c rename to tools/re2c/main.c index 412e59e3..4537bca6 100644 --- a/tools/re2c/re2c.c +++ b/tools/re2c/main.c @@ -3,9 +3,9 @@ #include #include -#include "tools/re2c/globals.h" -#include "tools/re2c/parse.h" -#include "tools/re2c/dfa.h" +#include "globals.h" +#include "parse.h" +#include "dfa.h" const char *fileName; int sFlag = 0;