diff options
author | Robert Bragg <robert@linux.intel.com> | 2012-04-10 11:03:00 +0100 |
---|---|---|
committer | Robert Bragg <robert@linux.intel.com> | 2012-04-10 18:45:04 +0100 |
commit | 91052df7dc84177274abc134cbaf97cd0de862c3 (patch) | |
tree | c443278db770d45edc62724fa724492533c9c0b4 | |
parent | c5b8027bf7444f2f56634259c78bd339076b3de5 (diff) | |
download | cogl-wip/sparse.tar.gz |
Autotoolize the deps/sparse Makefilewip/sparse
Since we have imported an internal snapshot of sparse under deps/sparse
this patch hooks it into the Cogl build scripts by converting the gnu
makefile to use automake instead.
We currently just build the c2xml and dump-gtk-doc tools.
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | configure.ac | 19 | ||||
-rw-r--r-- | deps/Makefile.am | 3 | ||||
-rw-r--r-- | deps/sparse/Makefile.am | 81 |
4 files changed, 103 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am index 845f3320..bae1f878 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = cogl tests +SUBDIRS = deps cogl tests if BUILD_COGL_PANGO SUBDIRS += cogl-pango diff --git a/configure.ac b/configure.ac index c7bf9a9a..fcaf2028 100644 --- a/configure.ac +++ b/configure.ac @@ -925,6 +925,7 @@ AM_CONDITIONAL(X11_TESTS, [test "x$SUPPORT_X11" = "xyes"]) AM_CONDITIONAL(SUPPORT_X11, [test "x$SUPPORT_X11" = "xyes"]) AM_CONDITIONAL(SUPPORT_XLIB, [test "x$SUPPORT_XLIB" = "xyes"]) +NEED_SPARSE=no dnl ============================================================ dnl Check for v8 JavaScript bindings support dnl ============================================================ @@ -940,11 +941,25 @@ AS_IF([test "x$enable_v8_bindings" == "xyes"], [ AX_LIB_V8(3.3.10) AS_IF([test "$V8_CPPFLAGS" != ""], - [SUPPORT_V8_BINDINGS=yes]) + [ + SUPPORT_V8_BINDINGS=yes + NEED_SPARSE=yes + ]) ]) AM_CONDITIONAL(SUPPORT_V8_BINDINGS, [test "x$SUPPORT_V8_BINDINGS" == "xyes"]) +dnl ============================================================ +dnl Check if internal deps/sparse project should be built +dnl ============================================================ +AS_IF([test "x$NEED_SPARSE" == "xyes"], + [ + PKG_CHECK_MODULES(LIBXML, [libxml-2.0], [], + [AC_MSG_ERROR([Can not find libxml-2.0 required at build time for deps/sparse/c2xml for bindings and documentation])]) + ]) +AM_CONDITIONAL(BUILD_SPARSE, [test "x$NEED_SPARSE" == "xyes"]) + + dnl ================================================================ dnl Compiler stuff. dnl ================================================================ @@ -1135,6 +1150,8 @@ build/Makefile build/win32/Makefile build/win32/vs9/Makefile build/win32/vs10/Makefile +deps/Makefile +deps/sparse/Makefile cogl/Makefile cogl/cogl-1.0.pc cogl/cogl-2.0-experimental.pc diff --git a/deps/Makefile.am b/deps/Makefile.am new file mode 100644 index 00000000..64235453 --- /dev/null +++ b/deps/Makefile.am @@ -0,0 +1,3 @@ +if BUILD_SPARSE +SUBDIRS = sparse +endif diff --git a/deps/sparse/Makefile.am b/deps/sparse/Makefile.am new file mode 100644 index 00000000..31534849 --- /dev/null +++ b/deps/sparse/Makefile.am @@ -0,0 +1,81 @@ +include $(top_srcdir)/build/autotools/Makefile.am.silent + +# preamble + +NULL = + +GCC_BASE = $(shell $(CC) --print-file-name=) +AM_CFLAGS = -DGCC_BASE=\"$(GCC_BASE)\" + +noinst_LIBRARIES = libsparse.a + +libsparse_a_SOURCES = \ + token.h \ + parse.h \ + lib.h \ + symbol.h \ + scope.h \ + expression.h \ + target.h \ + linearize.h \ + bitmap.h \ + ident-list.h \ + compat.h \ + flow.h \ + allocate.h \ + storage.h \ + ptrlist.h \ + dissect.h \ + target.c \ + parse.c \ + tokenize.c \ + pre-process.c \ + symbol.c \ + lib.c \ + scope.c \ + expression.c \ + show-parse.c \ + evaluate.c \ + expand.c \ + inline.c \ + linearize.c \ + sort.c \ + allocate.c \ + compat-linux.c \ + ptrlist.c \ + flow.c \ + cse.c \ + simplify.c \ + memops.c \ + liveness.c \ + storage.c \ + unssa.c \ + dissect.c \ + $(NULL) + +noinst_PROGRAMS = dump-gtk-doc c2xml + +dump_gtk_doc_SOURCES=dump-gtk-doc.c +dump_gtk_doc_LDADD=libsparse.la + +c2xml_SOURCES=c2xml.c +c2xml_LDADD=libsparse.la +c2xml_CFLAGS=$(LIBXML_CFLAGS) +c2xml_LDFLAGS=$(LIBXML_LIBS) + +#compile_EXTRA_DEPS = compile-i386.o +# +#compat-linux.o: compat/strtold.c compat/mmap-blob.c $(LIB_H) +# +#clean: clean-check +# rm -f *.[oa] .*.d *.so $(PROGRAMS) $(SLIB_FILE) pre-process.h sparse.pc +# +#dist: +# @if test "`git describe`" != "v$(VERSION)" ; then \ +# echo 'Update VERSION in the Makefile before running "make dist".' ; \ +# exit 1 ; \ +# fi +# git archive --format=tar --prefix=sparse-$(VERSION)/ HEAD^{tree} | gzip -9 > sparse-$(VERSION).tar.gz +# +#check: all +# $(Q)cd validation && ./test-suite |