git » libfiu » commit 717fa76

Make sure we clean the tests when cleaning from the top level Makefile

author Alberto Bertogli
2012-09-05 18:55:35 UTC
committer Alberto Bertogli
2012-09-05 18:55:35 UTC
parent 273fc65af0a309e2860b15baab664a85e1ddfbd5

Make sure we clean the tests when cleaning from the top level Makefile

This patch makes a top-level "make clean" also clean up the tests' binaries
and temporary files.

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>

Makefile +7 -2
tests/Makefile +4 -3

diff --git a/Makefile b/Makefile
index 81405ad..6749813 100644
--- a/Makefile
+++ b/Makefile
@@ -51,11 +51,16 @@ utils_install: utils
 utils_uninstall:
 	$(MAKE) -C utils uninstall
 
+
 tests: test
 
 test: libfiu bindings preload
 	$(MAKE) -C tests
 
+test_clean:
+	$(MAKE) -C tests clean
+
+
 bindings: python2 python3
 
 bindings_install: python2_install python3_install
@@ -78,7 +83,7 @@ python_clean:
 	cd bindings/python && rm -rf build/
 
 
-clean: python_clean preload_clean libfiu_clean utils_clean
+clean: python_clean preload_clean libfiu_clean utils_clean test_clean
 
 
 .PHONY: default all clean install all_install uninstall all_uninstall \
@@ -87,6 +92,6 @@ clean: python_clean preload_clean libfiu_clean utils_clean
 	bindings bindings_install bindings_clean \
 	preload preload_clean preload_install preload_uninstall \
 	utils utils_clean utils_install utils_uninstall \
-	test
+	test tests test_clean
 
 
diff --git a/tests/Makefile b/tests/Makefile
index 2109ee8..41d63d3 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -80,12 +80,13 @@ gen-tests:
 # Cleanup
 #
 
+# Normally, $C_OBJS and $C_BINS are removed by make after building,
+# since here they're considered "intermediate files"; however we
+# also remove them when cleaning just in case.
 clean:
-	# Normally, $C_OBJS and $C_BINS are removed by make after building,
-	# since here they're considered "intermediate files"; however we
-	# also remove them when cleaning just in case.
 	rm -f $(C_OBJS) $(C_BINS)
 	rm -f *.bb *.bbg *.da *.gcov *.gcda *.gcno gmon.out build-flags
+	$(MAKE) -C generated clean
 
 FORCE: