check: Have autotools generate internal-check.h
authorSebastian Rasmussen <sebras@hotmail.com>
Sun, 14 Dec 2014 11:54:32 +0000 (12:54 +0100)
committerSebastian Dröge <sebastian@centricular.com>
Tue, 16 Dec 2014 15:32:39 +0000 (16:32 +0100)
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

configure.ac
libs/gst/check/Makefile.am
libs/gst/check/libcheck/Makefile.am
libs/gst/check/libcheck/check.c
libs/gst/check/libcheck/check_log.c
libs/gst/check/libcheck/check_msg.c
libs/gst/check/libcheck/check_pack.c
libs/gst/check/libcheck/check_print.c
libs/gst/check/libcheck/check_run.c
libs/gst/check/libcheck/check_str.c

index 24fac81..2c72da9 100644 (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
index 4adf53c..abc3b3a 100644 (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                        \
@@ -35,12 +32,9 @@ libgstcheck_@GST_API_VERSION@include_HEADERS =       \
        gsttestclock.h
 
 nodist_libgstcheck_@GST_API_VERSION@include_HEADERS =  \
-       internal-check.h        
-
-CLEANFILES = *.gcno *.gcda *.gcov internal-check.h $(SYMBOLS_FILE)
+       internal-check.h
 
-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); \
index 870007c..dfa2062 100644 (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
index 7b8df85..5a50d7d 100644 (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"
index 9f90b9c..ad5bb79 100644 (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
index acdd904..9213674 100644 (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"
index 9fdbc5b..5119dfc 100644 (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"
index 88bc16b..4c1a4ad 100644 (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"
index 17abf87..433b365 100644 (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"
index 62b6723..c1a18b7 100644 (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"