ref: 858468ee4219ac29d4443b81387bb609fd6247c6
parent: d099f132fc916d16c1097e7521a069a7bf6838c1
author: Ralph Giles <[email protected]>
date: Sat Sep 3 12:34:51 EDT 2011
Fix the 'distclean' target. With subdir-objects, both the top-level makefile, and libcelt/Makefile, which runs celt-specific unit tests, were sharing libcelt/.deps for generated dependencies. Each thought it owned the directory, and so would remove the files it created in that directory, followed by the directory itself. The second makefile would then fail to because the files it created weren't there to remove, blocking a successful 'make distcheck' with in runs 'make distclean' as part of its verification tests. We can work around the problem by generating the makefile for the tests in the actual test directory, so it doesn't share autotools scratch space with the top level makefile.
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,7 +2,7 @@
lib_LTLIBRARIES = libopus.la
-SUBDIRS = . libcelt
+SUBDIRS = . libcelt/tests
INCLUDES = -I$(top_srcdir)/libcelt -I$(top_srcdir)/silk -I$(top_srcdir)/silk/float -I$(top_srcdir)/silk/fixed
--- a/configure.ac
+++ b/configure.ac
@@ -208,7 +208,7 @@
AM_CONDITIONAL([FIXED_POINT], [test x$ac_enable_fixed = xyes])
AM_CONDITIONAL([CUSTOM_MODES], [test x$ac_enable_custom_modes = xyes])
-AC_OUTPUT([Makefile libcelt/Makefile
+AC_OUTPUT([Makefile libcelt/tests/Makefile
opus.pc opus-uninstalled.pc])
AC_MSG_RESULT([
--- a/libcelt/Makefile.am
+++ /dev/null
@@ -1,15 +1,0 @@
-INCLUDES = -I$(top_srcdir)/libcelt
-METASOURCES = AUTO
-
-TESTS = type-test ectest cwrs32-test dft-test laplace-test mdct-test mathops-test rotation-test
-
-noinst_PROGRAMS = type-test ectest cwrs32-test dft-test laplace-test mdct-test mathops-test rotation-test
-
-type_test_SOURCES = tests/type-test.c
-ectest_SOURCES = tests/ectest.c
-cwrs32_test_SOURCES = tests/cwrs32-test.c
-dft_test_SOURCES = tests/dft-test.c
-laplace_test_SOURCES = tests/laplace-test.c
-mdct_test_SOURCES = tests/mdct-test.c
-mathops_test_SOURCES = tests/mathops-test.c
-rotation_test_SOURCES = tests/rotation-test.c
--- /dev/null
+++ b/libcelt/tests/Makefile.am
@@ -1,0 +1,15 @@
+INCLUDES = -I$(top_srcdir)/libcelt
+METASOURCES = AUTO
+
+TESTS = type-test ectest cwrs32-test dft-test laplace-test mdct-test mathops-test rotation-test
+
+noinst_PROGRAMS = type-test ectest cwrs32-test dft-test laplace-test mdct-test mathops-test rotation-test
+
+type_test_SOURCES = type-test.c
+ectest_SOURCES = ectest.c
+cwrs32_test_SOURCES = cwrs32-test.c
+dft_test_SOURCES = dft-test.c
+laplace_test_SOURCES = laplace-test.c
+mdct_test_SOURCES = mdct-test.c
+mathops_test_SOURCES = mathops-test.c
+rotation_test_SOURCES = rotation-test.c