]> git.unchartedbackwaters.co.uk Git - francis/libjit.git/commitdiff
Break the circular build dependency between the include and tools
authorKlaus Treichel <ktreichel@web.de>
Wed, 4 Aug 2010 11:37:38 +0000 (13:37 +0200)
committerKlaus Treichel <ktreichel@web.de>
Wed, 4 Aug 2010 11:37:38 +0000 (13:37 +0200)
directories.
Don't include jit-arch.h in the disribution because it has to be recreated
in every case.

ChangeLog
include/jit/Makefile.am
tools/Makefile.am
tools/gen-apply.c

index dcde6f921376a621f4dffdb6186d9101dee55248..f28e113c9972ed53e2e1f735ca20809e4cc70b81 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2010-08-04  Klaus Treichel  <ktreichel@web.de>
+
+       * 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  <ktreichel@web.de>
 
        * Makefile.am: Add config to the subdirectories.
index f8f8359956f354703630c3f7e44d53e426a4ab90..b7bf8bf664e4419e0ff3658eddff009fd02d539e 100644 (file)
@@ -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
index 3c27e824f5c96453e961f850c99485c0f1b8b828..55f783470fc084e60dfdaa3dde87e0b4534d4f88 100644 (file)
@@ -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 
index 295180249357ea7f09d1578d8a764ecb0ab41d35..66f07e41fe68a065b7ee3717fb9616b12499e0b4 100644 (file)
@@ -20,7 +20,7 @@
  * <http://www.gnu.org/licenses/>.
  */
 
-#include <jit/jit-arch.h>
+#include "jit-arch.h"
 #include <jit/jit-defs.h>
 
 #if defined(__APPLE__) && defined(__MACH__)