diff mbox series

[1/2] kernel-shark: Have "make clean" run cmake-clean.sh

Message ID 20190617223221.815886530@goodmis.org (mailing list archive)
State Superseded
Headers show
Series kernel-shark: Make some top level "make" changes | expand

Commit Message

Steven Rostedt June 17, 2019, 10:31 p.m. UTC
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

A make clean should clean up the cmake files as well.

Update the kernel-shark/README to reflect some of the changes that
have been made, and options done by the "make" command line.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 Makefile            |  1 +
 kernel-shark/README | 17 ++++++++++++-----
 2 files changed, 13 insertions(+), 5 deletions(-)

Comments

Yordan Karadzhov June 18, 2019, 10:54 a.m. UTC | #1
On 18.06.19 г. 1:31 ч., Steven Rostedt wrote:
> From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
> 
> A make clean should clean up the cmake files as well.
> 
> Update the kernel-shark/README to reflect some of the changes that
> have been made, and options done by the "make" command line.
> 
> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
> ---
>   Makefile            |  1 +
>   kernel-shark/README | 17 ++++++++++++-----
>   2 files changed, 13 insertions(+), 5 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index 693f33b69b4e..c9679d42fdbd 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -357,6 +357,7 @@ clean:
>   	$(MAKE) -C $(src)/python clean
>   	$(MAKE) -C $(src)/tracecmd clean
>   	if [ -f $(kshark-dir)/build/Makefile ]; then $(MAKE) -C $(kshark-dir)/build clean; fi
> +	cd $(kshark-dir)/build; ./cmake_clean.sh
>   
>   
>   ##### PYTHON STUFF #####
> diff --git a/kernel-shark/README b/kernel-shark/README
> index 75a0dd08dcac..4fb13698261b 100644
> --- a/kernel-shark/README
> +++ b/kernel-shark/README
> @@ -31,6 +31,11 @@ Building:
>   the original trace-cmd end traceevent libraries.
>   
>   2. Do:
> +    make gui
> +
> +This will perform the following, in case you want to do it directly
> +yourself:
> +
>       cd kernel-shark/build
>       cmake ../
>       make
> @@ -39,7 +44,11 @@ the original trace-cmd end traceevent libraries.
>   as a CMake Command-Line option.
>   

I agree with all functional changes in those patches. However, the 
README file becomes a bit ambiguous.

I would prefer having something like this

2. Building KernelShark:
2.1 Option 1 : build KernelShark as part of trace-cmd

      make gui
      All explanations for this build option are following
      ...

2.2 Option 2 : standalone build of KernelShark (for hackers only)

      cd kernel-shark/build
      cmake ../
      make
      All explanations for this build option are following ...
      ...

Note that in Option 1

  make clean

  is equivalent to

  make clean
  ./cmake_clean.sh

in Option 2.

Thanks!
Yordan

>   2.1.2 By default, installation prefix is "/usr/local". It can be changed using
> --D_INSTALL_PREFIX= as a CMake Command-Line option.
> +-D_INSTALL_PREFIX= as a CMake Command-Line option. Which can also be
> +done by passing in "prefix=" to the make command line.
> +
> +  make prefix=/my/local/dir gui
> +
>   
>   2.1.3 In addition to the standard CMake build types (Debug, Release,
>   RelWithDebInfo, MinSizeRel) KernelShark supports a "Package" build type.
> @@ -57,10 +66,8 @@ Examples:
>   
>       cmake -DCMAKE_BUILD_TYPE=Package -DCMAKE_C_FLAGS_PACKAGE="-O3 -pedantic"  ../
>   
> -2.2.1 Use "make clean" if you want to delete all already compiled objects.
> -
> -2.2.2 Use the script "cmake_clean.sh" if you want to delete all already
> -compiled objects and all files generated by CMake.
> +2.2 Use "make clean" if you want to delete all already compiled objects
> +and all files generated by CMake.
>   
>   3. After building the code "kernel-shark/lib" will contain all libraries
>   and "kernel-shark/bin" will contain all executables.
>
Steven Rostedt June 18, 2019, 12:58 p.m. UTC | #2
On Tue, 18 Jun 2019 13:54:30 +0300
"Yordan Karadzhov (VMware)" <y.karadz@gmail.com> wrote:

> I agree with all functional changes in those patches. However, the 
> README file becomes a bit ambiguous.

Heh, I wrote that at the last minute and was a bit tired. I was hoping
for a better write up from someone ;-)

> 
> I would prefer having something like this
> 
> 2. Building KernelShark:
> 2.1 Option 1 : build KernelShark as part of trace-cmd
> 
>       make gui
>       All explanations for this build option are following
>       ...
> 
> 2.2 Option 2 : standalone build of KernelShark (for hackers only)
> 
>       cd kernel-shark/build
>       cmake ../
>       make
>       All explanations for this build option are following ...
>       ...
> 
> Note that in Option 1
> 
>   make clean
> 
>   is equivalent to
> 
>   make clean
>   ./cmake_clean.sh
> 
> in Option 2.

Makes sense.

Thanks!

-- Steve
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 693f33b69b4e..c9679d42fdbd 100644
--- a/Makefile
+++ b/Makefile
@@ -357,6 +357,7 @@  clean:
 	$(MAKE) -C $(src)/python clean
 	$(MAKE) -C $(src)/tracecmd clean
 	if [ -f $(kshark-dir)/build/Makefile ]; then $(MAKE) -C $(kshark-dir)/build clean; fi
+	cd $(kshark-dir)/build; ./cmake_clean.sh
 
 
 ##### PYTHON STUFF #####
diff --git a/kernel-shark/README b/kernel-shark/README
index 75a0dd08dcac..4fb13698261b 100644
--- a/kernel-shark/README
+++ b/kernel-shark/README
@@ -31,6 +31,11 @@  Building:
 the original trace-cmd end traceevent libraries.
 
 2. Do:
+    make gui
+
+This will perform the following, in case you want to do it directly
+yourself:
+
     cd kernel-shark/build
     cmake ../
     make
@@ -39,7 +44,11 @@  the original trace-cmd end traceevent libraries.
 as a CMake Command-Line option.
 
 2.1.2 By default, installation prefix is "/usr/local". It can be changed using
--D_INSTALL_PREFIX= as a CMake Command-Line option.
+-D_INSTALL_PREFIX= as a CMake Command-Line option. Which can also be
+done by passing in "prefix=" to the make command line.
+
+  make prefix=/my/local/dir gui
+
 
 2.1.3 In addition to the standard CMake build types (Debug, Release,
 RelWithDebInfo, MinSizeRel) KernelShark supports a "Package" build type.
@@ -57,10 +66,8 @@  Examples:
 
     cmake -DCMAKE_BUILD_TYPE=Package -DCMAKE_C_FLAGS_PACKAGE="-O3 -pedantic"  ../
 
-2.2.1 Use "make clean" if you want to delete all already compiled objects.
-
-2.2.2 Use the script "cmake_clean.sh" if you want to delete all already
-compiled objects and all files generated by CMake.
+2.2 Use "make clean" if you want to delete all already compiled objects
+and all files generated by CMake.
 
 3. After building the code "kernel-shark/lib" will contain all libraries
 and "kernel-shark/bin" will contain all executables.