From 552b211dc5b1e5138caec0bbec932924fb37efd2 Mon Sep 17 00:00:00 2001 From: Klaus Treichel Date: Wed, 4 Aug 2010 13:37:38 +0200 Subject: [PATCH] Break the circular build dependency between the include and tools directories. Don't include jit-arch.h in the disribution because it has to be recreated in every case. --- ChangeLog | 12 ++++++++++++ include/jit/Makefile.am | 6 ++++-- tools/Makefile.am | 16 +++++++++++++--- tools/gen-apply.c | 2 +- 4 files changed, 30 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index dcde6f9..f28e113 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2010-08-04 Klaus Treichel + + * include/jit/Makefile.am: Don't include jit-arch.h in the + distribution. + + * tools/gen-apply.c: Include a local copy of jit-arch.h instead of + the one in the include dir because that one is not yet present in + the build process. + + * tools/Makefile.am: Create a local symbolic link jit-arch.h to + the arch specific header in the include dir. + 2010-08-03 Klaus Treichel * Makefile.am: Add config to the subdirectories. diff --git a/include/jit/Makefile.am b/include/jit/Makefile.am index f8f8359..b7bf8bf 100644 --- a/include/jit/Makefile.am +++ b/include/jit/Makefile.am @@ -3,9 +3,8 @@ ARCH_HEADER = jit-arch-@JIT_ARCH@.h BUILT_SOURCES = jit-arch.h jit-opcode.h libjitincludedir = $(includedir)/jit -libjitinclude_HEADERS = \ +dist_libjitinclude_HEADERS = \ jit.h \ - jit-arch.h \ jit-apply.h \ jit-block.h \ jit-common.h \ @@ -31,6 +30,9 @@ libjitinclude_HEADERS = \ jit-value.h \ jit-walk.h +nodist_libjitinclude_HEADERS = \ + jit-arch.h + noinst_HEADERS = jit-arch-generic.h jit-arch-x86.h jit-arch-x86-64.h DISTCLEANFILES = jit-arch.h jit-defs.h jit-opcode.h diff --git a/tools/Makefile.am b/tools/Makefile.am index 3c27e82..55f7834 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -1,9 +1,14 @@ +ARCH_HEADER = jit-arch-@JIT_ARCH@.h + +BUILT_SOURCES = jit-arch.h noinst_PROGRAMS = gen-apply gen-rules gen-ops noinst_HEADERS = gen-apply-macosx.h -gen_apply_SOURCES = gen-apply.c +dist_gen_apply_SOURCES = gen-apply.c + +nodist_gen_apply_SOURCES = jit-arch.h gen_rules_SOURCES = gen-rules-parser.y gen-rules-scanner.l @@ -11,6 +16,10 @@ gen_ops_SOURCES = gen-ops-scanner.l gen-ops-parser.y AM_YFLAGS = -d +jit-arch.h: $(top_srcdir)/include/jit/$(ARCH_HEADER) + rm -f $@ + $(LN_S) $(top_srcdir)/include/jit/$(ARCH_HEADER) $@ + gen-rules-scanner.l: gen-rules-parser.c gen-ops-scanner.l: gen-ops-parser.c @@ -23,5 +32,6 @@ $(top_builddir)/jit/jit-apply-rules.h: gen-apply$(EXEEXT) AM_CFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include \ -I$(top_srcdir)/jit -I$(top_builddir)/jit -CLEANFILES = $(top_builddir)/jit/jit-apply-rules.h \ - gen-rules-parser.c gen-rules-parser.h gen-rules-scanner.c +CLEANFILES = $(top_builddir)/jit/jit-apply-rules.h jit-arch.h \ + gen-rules-parser.c gen-rules-parser.h gen-rules-scanner.c \ + gen-ops-parser.c gen-ops-parser.h gen-ops-scanner.c diff --git a/tools/gen-apply.c b/tools/gen-apply.c index 2951802..66f07e4 100644 --- a/tools/gen-apply.c +++ b/tools/gen-apply.c @@ -20,7 +20,7 @@ * . */ -#include +#include "jit-arch.h" #include #if defined(__APPLE__) && defined(__MACH__) -- 2.47.3