trace-cmd: Update libtracecmd.pc if prefix is different

If a build is done with different DESTDIR and the prefix is changed, the
the libtracecmd.pc is not updated with the new prefix, and the one used may
not work with the installation being performed.

Add a "build_prefix" dependency, that creates a file "build_prefix" that has
the last prefix used to build the library. And if a new prefix is used, then
that file gets updated and so does libtracecmd.pc.

Link: https://lore.kernel.org/linux-trace-devel/20201216044214.856860622@goodmis.org

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
3 files changed