check: Have autotools generate internal-check.h

Previously GStreamer got access to the libcheck interface by including
libs/gst/check/check.h which in turn included internal-check.h in the
same directory. internal-check.h was generated by copying
libs/gst/check/libcheck/check.h which in turn was generated from
check.h.in in the same directory. In this case generating
libs/gst/check/libcheck/check.h is unnecessary, in addition this file
was accidentally distributed in generated project tarballs.

Now libs/gst/check/internal-check.h is generated directly from
libs/gst/check/libcheck/check.h.in by configure. This means that the
libcheck source must include internal-check.h instead of the previously
generated libs/gst/check/libcheck/check.h. However the unnecessary
intermediate step is now skipped.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=741359
This commit is contained in:
Sebastian Rasmussen 2014-12-14 12:54:32 +01:00 committed by Sebastian Dröge
parent a8d6653037
commit 0b09573bbe
10 changed files with 17 additions and 22 deletions

View file

@ -781,7 +781,7 @@ libs/gst/Makefile
libs/gst/base/Makefile
libs/gst/check/Makefile
libs/gst/check/libcheck/Makefile
libs/gst/check/libcheck/check.h
libs/gst/check/internal-check.h:libs/gst/check/libcheck/check.h.in
libs/gst/controller/Makefile
libs/gst/helpers/Makefile
libs/gst/net/Makefile

View file

@ -2,11 +2,8 @@ lib_LTLIBRARIES = libgstcheck-@GST_API_VERSION@.la
SYMBOLS_FILE = exports.sym
BUILT_SOURCES = internal-check.h
libgstcheck_@GST_API_VERSION@_la_DEPENDENCIES = \
$(top_builddir)/gst/libgstreamer-@GST_API_VERSION@.la \
internal-check.h \
$(SYMBOLS_FILE)
libgstcheck_@GST_API_VERSION@_la_SOURCES = \
gstbufferstraw.c \
@ -37,10 +34,7 @@ libgstcheck_@GST_API_VERSION@include_HEADERS = \
nodist_libgstcheck_@GST_API_VERSION@include_HEADERS = \
internal-check.h
CLEANFILES = *.gcno *.gcda *.gcov internal-check.h $(SYMBOLS_FILE)
internal-check.h: $(top_builddir)/libs/gst/check/libcheck/check.h
$(AM_V_GEN)cp $(top_builddir)/libs/gst/check/libcheck/check.h internal-check.h
CLEANFILES = *.gcno *.gcda *.gcov $(SYMBOLS_FILE)
%.c.gcov: .libs/libgstcheck_@GST_API_VERSION@_la-%.gcda %.c
$(GCOV) -b -f -o $^ > $@.out
@ -128,7 +122,7 @@ print-check-symbols:
echo $$s; \
done;
$(SYMBOLS_FILE): $(libgstcheck_@GST_API_VERSION@include_HEADERS) libcheck/check.h
$(SYMBOLS_FILE): $(libgstcheck_@GST_API_VERSION@include_HEADERS) internal-check.h
$(AM_V_GEN)rm -f $(SYMBOLS_FILE) 2>/dev/null; \
for s in $(LIBGSTCHECK_EXPORTED_SYMBOLS) $(CHECK_SYMS); do \
echo $$s >> $(SYMBOLS_FILE); \

View file

@ -34,7 +34,6 @@ CFILES +=\
endif
HFILES =\
check.h \
check_error.h \
check_impl.h \
check_list.h \
@ -49,11 +48,13 @@ noinst_HEADERS = $(HFILES)
libcheckinternal_la_SOURCES = $(CFILES) $(HFILES)
libcheckinternal_la_CFLAGS = -I$(top_builddir)/libs/gst/check
libcheckinternal_la_LIBADD =
# define HAVE_PTHREAD here as well so we keep changes to the code to a minimum
if HAVE_PTHREAD
libcheckinternal_la_CFLAGS = $(PTHREAD_CFLAGS) -D_GNU_SOURCE -DHAVE_PTHREAD
libcheckinternal_la_LIBADD = $(PTHREAD_LIBS)
libcheckinternal_la_CFLAGS += $(PTHREAD_CFLAGS) -D_GNU_SOURCE -DHAVE_PTHREAD
libcheckinternal_la_LIBADD += $(PTHREAD_LIBS)
else
libcheckinternal_la_CFLAGS = -D_GNU_SOURCE
libcheckinternal_la_LIBADD =
libcheckinternal_la_CFLAGS += -D_GNU_SOURCE
endif

View file

@ -26,7 +26,7 @@
#include <stdarg.h>
#include <math.h>
#include "check.h"
#include "internal-check.h"
#include "check_error.h"
#include "check_list.h"
#include "check_impl.h"

View file

@ -22,7 +22,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <check.h>
#include <internal-check.h>
#if ENABLE_SUBUNIT
#include <subunit/child.h>
#endif

View file

@ -26,7 +26,7 @@
#include <stdio.h>
#include "check_error.h"
#include "check.h"
#include "internal-check.h"
#include "check_list.h"
#include "check_impl.h"
#include "check_msg.h"

View file

@ -24,7 +24,7 @@
#include <string.h>
#include <stdio.h>
#include "check.h"
#include "internal-check.h"
#include "check_error.h"
#include "check_list.h"
#include "check_impl.h"

View file

@ -24,7 +24,7 @@
#include <string.h>
#include <stdlib.h>
#include "check.h"
#include "internal-check.h"
#include "check_list.h"
#include "check_impl.h"
#include "check_str.h"

View file

@ -29,7 +29,7 @@
#include <signal.h>
#include <setjmp.h>
#include "check.h"
#include "internal-check.h"
#include "check_error.h"
#include "check_list.h"
#include "check_impl.h"

View file

@ -23,7 +23,7 @@
#include <stdio.h>
#include <stdarg.h>
#include "check.h"
#include "internal-check.h"
#include "check_list.h"
#include "check_error.h"
#include "check_impl.h"