From 9dd078e305b96795892b8f7251dcf7d0225e50d7 Mon Sep 17 00:00:00 2001 From: Jan Travnicek <Jan.Travnicek@fit.cvut.cz> Date: Fri, 7 Sep 2018 13:39:16 +0200 Subject: [PATCH] remove object files of deleted sources --- makefile-library | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/makefile-library b/makefile-library index 7bc241dbe8..386e0560f9 100644 --- a/makefile-library +++ b/makefile-library @@ -69,6 +69,8 @@ ifneq ($(strip $(EXTRA_OBJECTS_DEBUG)),) ifneq ($(wildcard lib-debug/$(FULL_LIBRARY)),) ifneq ($(firstword $(EXISTENT_OBJECTS_DEBUG)),) $(shell touch $(firstword $(EXISTENT_OBJECTS_DEBUG))) +$(shell rm $(EXTRA_OBJECTS_DEBUG)) +$(shell rm $(patsubst obj-debug/%.o,obj-debug/%.d, $(EXTRA_OBJECTS_DEBUG))) endif endif endif @@ -77,6 +79,8 @@ ifneq ($(strip $(EXTRA_TEST_OBJECTS_DEBUG)),) ifneq ($(wildcard test-bin-debug/$(TESTBIN)),) ifneq ($(firstword $(EXISTENT_TEST_OBJECTS_DEBUG)),) $(shell touch $(firstword $(EXISTENT_TEST_OBJECTS_DEBUG))) +$(shell rm $(EXTRA_TEST_OBJECTS_DEBUG)) +$(shell rm $(patsubst obj-debug/%.o,obj-debug/%.d, $(EXTRA_TEST_OBJECTS_DEBUG))) endif endif endif @@ -85,6 +89,8 @@ ifneq ($(strip $(EXTRA_OBJECTS_RELEASE)),) ifneq ($(wildcard lib-release/$(FULL_LIBRARY)),) ifneq ($(firstword $(EXISTENT_OBJECTS_RELEASE)),) $(shell touch $(firstword $(EXISTENT_OBJECTS_RELEASE))) +$(shell rm $(EXTRA_OBJECTS_RELEASE)) +$(shell rm $(patsubst obj-debug/%.o,obj-debug/%.d, $(EXTRA_OBJECTS_RELEASE))) endif endif endif @@ -93,6 +99,8 @@ ifneq ($(strip $(EXTRA_TEST_OBJECTS_RELEASE)),) ifneq ($(wildcard test-bin-release/$(TESTBIN)),) ifneq ($(firstword $(EXISTENT_TEST_OBJECTS_RELEASE)),) $(shell touch $(firstword $(EXISTENT_TEST_OBJECTS_RELEASE))) +$(shell rm $(EXTRA_TEST_OBJECTS_RELEASE)) +$(shell rm $(patsubst obj-debug/%.o,obj-debug/%.d, $(EXTRA_TEST_OBJECTS_RELEASE))) endif endif endif -- GitLab