]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Fix creation of test/suites.h in out-of-source builds
authorJoel Rosdahl <joel@rosdahl.net>
Fri, 16 Jul 2010 15:38:59 +0000 (17:38 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Fri, 16 Jul 2010 15:38:59 +0000 (17:38 +0200)
Makefile.in

index d366791338f2dd4b745ec1eb02ce4a2dd4ccc317..0e97f9b6a4c7ed1c05b4d0c10595cacb30572a14 100644 (file)
@@ -25,8 +25,9 @@ base_objs = $(base_sources:.c=.o)
 ccache_sources = main.c $(base_sources) @extra_sources@
 ccache_objs = $(ccache_sources:.c=.o)
 
-test_suites = test/test_util.c
-test_sources = test/main.c test/framework.c $(test_suites)
+test_suites = util
+test_suite_files = $(test_suites:%=$(srcdir)/test/test_%.c)
+test_sources = test/main.c test/framework.c $(test_suite_files)
 test_objs = $(test_sources:.c=.o)
 
 all_sources = $(ccache_sources) $(test_sources)
@@ -70,8 +71,8 @@ test/main$(EXEEXT): $(base_objs) $(test_objs)
 
 test/main.o: test/suites.h
 
-test/suites.h: $(test_suites) Makefile
-       sed -n 's/TEST_SUITE(\(.*\))/SUITE(\1)/p' $(test_suites) >$@
+test/suites.h: $(test_suite_files) Makefile
+       sed -n 's/TEST_SUITE(\(.*\))/SUITE(\1)/p' $(test_suite_files) >$@
 
 .PHONY: check
 check: test