Autotoolize the deps/sparse Makefile

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.
This commit is contained in:
Robert Bragg 2012-04-10 11:03:00 +01:00
parent c5b8027bf7
commit 91052df7dc
4 changed files with 103 additions and 2 deletions

View File

@ -1,4 +1,4 @@
SUBDIRS = cogl tests
SUBDIRS = deps cogl tests
if BUILD_COGL_PANGO
SUBDIRS += cogl-pango

View File

@ -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

3
deps/Makefile.am vendored Normal file
View File

@ -0,0 +1,3 @@
if BUILD_SPARSE
SUBDIRS = sparse
endif

81
deps/sparse/Makefile.am vendored Normal file
View File

@ -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