[PATCH 4/6] libtraceevent: Have make clean honor the output (O=foo) directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Steven Rostedt (VMware)" <rostedt@xxxxxxxxxxx>

If "make O=/some/dir clean" is performed, the O=/some/dir is not honored,
and the clean is performed on the current directory. If O= is specified on
the command line, then the clean should perform the cleaning to that
directory.

Signed-off-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx>
---
 Makefile         | 4 ++--
 plugins/Makefile | 5 +++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 3f96c1c7b4d6..330c8339f023 100644
--- a/Makefile
+++ b/Makefile
@@ -255,8 +255,8 @@ install: install_lib
 
 clean: clean_plugins
 	$(call QUIET_CLEAN, libtraceevent) \
-		$(RM) *.o *~ $(TARGETS) *.a *.so $(VERSION_FILES) .*.d .*.cmd; \
-		$(RM) TRACEEVENT-CFLAGS tags TAGS; \
+		$(RM) $(OUTPUT)*.o $(OUTPUT)*~ $(TARGETS) $(OUTPUT)*.a $(OUTPUT)*.so $(VERSION_FILES) $(OUTPUT).*.d $(OUTPUT).*.cmd; \
+		$(RM) TRACEEVENT-CFLAGS $(OUTPUT)tags $(OUTPUT)TAGS; \
 		$(RM) $(PKG_CONFIG_FILE)
 
 PHONY += doc
diff --git a/plugins/Makefile b/plugins/Makefile
index 8ae3882f9051..a8868d01b09b 100644
--- a/plugins/Makefile
+++ b/plugins/Makefile
@@ -210,8 +210,9 @@ install: $(PLUGINS)
 
 clean:
 	$(call QUIET_CLEAN, trace_plugins) \
-		$(RM) *.o *~ $(TARGETS) *.a *.so $(VERSION_FILES) .*.d .*.cmd; \
-		$(RM) $(OUTPUT)libtraceevent-dynamic-list \
+		$(RM) $(OUTPUT)*.o $(OUTPUT)*~ $(TARGETS) $(OUTPUT)*.a $(OUTPUT)*.so $(VERSION_FILES) .*.d .*.cmd; \
+		$(RM) $(OUTPUT)libtraceevent-dynamic-list; \
+		$(RM) $(PLUGINS); \
 		$(RM) TRACEEVENT-CFLAGS tags TAGS;
 
 PHONY += force plugins
-- 
2.29.2





[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux