trace-cmd: Keep build_install files around
Instead of rebuilding the build_install and build_libs_install files every
time the uninstall is created, make it depend on the prefix, as if the
prefix is the same, then the uninstall should be the same.
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
diff --git a/.gitignore b/.gitignore
index 9ce25c8..af9bf6c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,3 +25,5 @@
tracecmd_plugin_dir
libtracecmd.pc
build_prefix
+build_install
+build_libs_install
diff --git a/Makefile b/Makefile
index 396a679..662d24b 100644
--- a/Makefile
+++ b/Makefile
@@ -496,12 +496,12 @@
$(Q)$(RM) -rf $(BUILD_OUTPUT)/tmp_build
endef
-build_uninstall:
+build_uninstall: $(BUILD_PREFIX)
$(call build_uninstall_script,install,uninstall)
$(BUILD_OUTPUT)/build_uninstall: build_uninstall
-build_libs_uninstall:
+build_libs_uninstall: $(BUILD_PREFIX)
$(call build_uninstall_script,install_libs,libs_uninstall)
$(BUILD_OUTPUT)/build_libs_uninstall: build_libs_uninstall
@@ -514,11 +514,9 @@
uninstall: $(BUILD_OUTPUT)/build_uninstall
@$(foreach file,$(shell cat $(BUILD_OUTPUT)/build_uninstall),$(call uninstall_file,$(file)))
- $(Q)$(RM) $<
uninstall_libs: $(BUILD_OUTPUT)/build_libs_uninstall
@$(foreach file,$(shell cat $(BUILD_OUTPUT)/build_libs_uninstall),$(call uninstall_file,$(file)))
- $(Q)$(RM) $<
##### PYTHON STUFF #####