Skip to contentSkip to conversation

cpupower: Add 'help' target to all the makefiles that don't have it

PATCH In review Roman Storozhenko 2 participants 10 messages Jun 23, 2024 – Jun 28, 2024 CPU power monitoring

lore
Share & tools
lore
#0 lore raw

cover cpupower: Add 'help' target to all the makefiles that don't have it

This patch series adds the 'help' target describing all the user-available targets to the makefiles which haven't had that target yet.

---
Roman Storozhenko (4):
cpupower: Add 'help' target to the 'bench' subproject makefile
cpupower: Add 'help' target to the 'debug/kernel' subproject makefile
cpupower: Add 'help' target to the 'debug/x86_64' subproject makefile
cpupower: Add 'help' target to the 'debug/i386' subproject makefile

 tools/power/cpupower/bench/Makefile        | 12 ++++++++++++
 tools/power/cpupower/debug/i386/Makefile   | 12 ++++++++++++
 tools/power/cpupower/debug/kernel/Makefile | 12 ++++++++++++
 tools/power/cpupower/debug/x86_64/Makefile | 12 ++++++++++++
 4 files changed, 48 insertions(+)

---
base-commit: f76698bd9a8ca01d3581236082d786e9a6b72bb7
change-id: 20240623-make_help_rest-e799889f43a1

Best regards,

Signature · 1 line
Roman Storozhenko <[email protected]>
#1 lore raw

PATCH 1/4 cpupower: Add 'help' target to the 'bench' subproject makefile

Add 'help' target, describing all user-available targets, to the 'bench' subproject makefile.

---
 tools/power/cpupower/bench/Makefile | 12 ++++++++++++
 1 file changed, 12 insertions(+)
tools/power/cpupower/bench/Makefile +12 -0
index a4b902f9e1c4..81c862297782 100644
@@ -41,3 +41,15 @@ install: $(OUTPUT)cpufreq-bench
 clean:
 	rm -f $(OUTPUT)*.o
 	rm -f $(OUTPUT)cpufreq-bench
+
+help:
+	@echo  'Build targets:'
+	@echo  '  all		  - Default target. Could be omitted. Put build artifacts'
+	@echo  '                    to "O" cmdline option dir (default: current dir)'
+	@echo  '  install	  - Install previously built project files from the output'
+	@echo  '                    dir defined by "O" cmdline option (default: current dir)'
+	@echo  '                    to the install dir  defined by "DESTDIR" cmdline'
+	@echo  ''
+	@echo  'Clean targets:'
+	@echo  '  clean		  - Clean build artifacts from the dir defined by "O" cmdline'
+	@echo  '                    option (default: current dir)'
Signature · 1 line
2.34.1
maintainer
#2 lore raw

Re: [PATCH 1/4] cpupower: Add 'help' target to the 'bench' subproject makefile

Quoted 19 lines · Roman Storozhenko

Add 'help' target, describing all user-available targets, to the 'bench' subproject makefile.

---
  tools/power/cpupower/bench/Makefile | 12 ++++++++++++
  1 file changed, 12 insertions(+)
tools/power/cpupower/bench/Makefile +2 -0
index a4b902f9e1c4..81c862297782 100644
@@ -41,3 +41,15 @@ install: $(OUTPUT)cpufreq-bench
  clean:
  	rm -f $(OUTPUT)*.o
  	rm -f $(OUTPUT)cpufreq-bench
+
+help:

tools/power/cpupower/bench/Makefile install: $(OUTPUT)cpufreq-bench · line 55

Quoted 10 lines
tools/power/cpupower/bench/Makefile +10 -0
+	@echo  'Build targets:'
+	@echo  '  all		  - Default target. Could be omitted. Put build artifacts'
+	@echo  '                    to "O" cmdline option dir (default: current dir)'
+	@echo  '  install	  - Install previously built project files from the output'
+	@echo  '                    dir defined by "O" cmdline option (default: current dir)'
+	@echo  '                    to the install dir  defined by "DESTDIR" cmdline'
+	@echo  ''
+	@echo  'Clean targets:'
+	@echo  '  clean		  - Clean build artifacts from the dir defined by "O" cmdline'
+	@echo  '                    option (default: current dir)'

Is this help message necessary if bench can't be built standalone?

cpupower: Disable direct build of the 'bench' subproject
https://patchwork.kernel.org/project/linux-pm/patch/[email protected]/

thanks,
-- Shuah

#3 lore raw

PATCH 2/4 cpupower: Add 'help' target to the 'debug/kernel' subproject makefile

In reply to Roman Storozhenko

Add 'help' target, describing all user-available targets, to the 'debug/kernel' subproject makefile.

---
 tools/power/cpupower/debug/kernel/Makefile | 12 ++++++++++++
 1 file changed, 12 insertions(+)
tools/power/cpupower/debug/kernel/Makefile +12 -0
index 7b5c43684be1..9e4522a42c6b 100644
@@ -21,3 +21,15 @@ install: default
 	/sbin/depmod -a
 
 all:	default
+
+help:
+	@echo  'Build targets:'
+	@echo  '  all		  - Default target. Could be omitted. Builds "cpufreq-test_tsc"'
+	@echo  '                    kernel module against the running kernel if the "CONFIG_X86_TSC"'
+	@echo  '                    kernel config parameter is enabled. Puts the built module'
+	@echo  '                    to the current dir'
+	@echo  '  install	  - Install previously built "cpufreq-test_tsc.ko" module'
+	@echo  '                    to the running kernel "modules" dir'
+	@echo  ''
+	@echo  'Clean targets:'
+	@echo  '  clean		  - Clean "cpufreq-test_tsc" module build artifacts'
Signature · 1 line
2.34.1
maintainer
#4 lore raw

Re: [PATCH 2/4] cpupower: Add 'help' target to the 'debug/kernel' subproject makefile

Quoted 19 lines · Roman Storozhenko

Add 'help' target, describing all user-available targets, to the 'debug/kernel' subproject makefile.

---
  tools/power/cpupower/debug/kernel/Makefile | 12 ++++++++++++
  1 file changed, 12 insertions(+)
tools/power/cpupower/debug/kernel/Makefile +2 -0
index 7b5c43684be1..9e4522a42c6b 100644
@@ -21,3 +21,15 @@ install: default
  	/sbin/depmod -a
 
  all:	default
+
+help:

tools/power/cpupower/debug/kernel/Makefile install: default · line 35

Quoted 10 lines
tools/power/cpupower/debug/kernel/Makefile +10 -0
+	@echo  'Build targets:'
+	@echo  '  all		  - Default target. Could be omitted. Builds "cpufreq-test_tsc"'
+	@echo  '                    kernel module against the running kernel if the "CONFIG_X86_TSC"'
+	@echo  '                    kernel config parameter is enabled. Puts the built module'
+	@echo  '                    to the current dir'
+	@echo  '  install	  - Install previously built "cpufreq-test_tsc.ko" module'
+	@echo  '                    to the running kernel "modules" dir'
+	@echo  ''
+	@echo  'Clean targets:'
+	@echo  '  clean		  - Clean "cpufreq-test_tsc" module build artifacts'

I don't see a value in adding this - these are common targets and nothing new about them.

thanks,
-- Shuah

#5 lore raw

PATCH 3/4 cpupower: Add 'help' target to the 'debug/x86_64' subproject makefile

In reply to Roman Storozhenko

Add 'help' target, describing all user-available targets, to the 'debug/x86_64' subproject makefile.

---
 tools/power/cpupower/debug/x86_64/Makefile | 12 ++++++++++++
 1 file changed, 12 insertions(+)
tools/power/cpupower/debug/x86_64/Makefile +12 -0
index b1b6c43644e7..4b35b2474182 100644
@@ -28,4 +28,16 @@ install:
 	$(INSTALL) $(OUTPUT)centrino-decode $(DESTDIR)${bindir}
 	$(INSTALL) $(OUTPUT)powernow-k8-decode $(DESTDIR)${bindir}
 
+help:
+	@echo  'Build targets:'
+	@echo  '  all		  - Default target. Could be omitted. Put build artifacts'
+	@echo  '                    to "O" cmdline option dir (default: current dir)'
+	@echo  '  install	  - Install previously built project files from the output'
+	@echo  '                    dir defined by "O" cmdline option (default: current dir)'
+	@echo  '                    to the install dir  defined by "DESTDIR" cmdline'
+	@echo  ''
+	@echo  'Clean targets:'
+	@echo  '  clean		  - Clean build artifacts from the dir defined by "O" cmdline'
+	@echo  '                    option (default: current dir)'
+
 .PHONY: all default clean install
Signature · 1 line
2.34.1
maintainer
#6 lore raw

Re: [PATCH 3/4] cpupower: Add 'help' target to the 'debug/x86_64' subproject makefile

Quoted 20 lines · Roman Storozhenko

Add 'help' target, describing all user-available targets, to the 'debug/x86_64' subproject makefile.

---
  tools/power/cpupower/debug/x86_64/Makefile | 12 ++++++++++++
  1 file changed, 12 insertions(+)
tools/power/cpupower/debug/x86_64/Makefile +3 -0
index b1b6c43644e7..4b35b2474182 100644
@@ -28,4 +28,16 @@ install:
  	$(INSTALL) $(OUTPUT)centrino-decode $(DESTDIR)${bindir}
  	$(INSTALL) $(OUTPUT)powernow-k8-decode $(DESTDIR)${bindir}
 
+help:
+	@echo  'Build targets:'
+	@echo  '  all		  - Default target. Could be omitted. Put build artifacts'

tools/power/cpupower/debug/x86_64/Makefile install: · line 43

Quoted 10 lines
tools/power/cpupower/debug/x86_64/Makefile +9 -0
+	@echo  '                    to "O" cmdline option dir (default: current dir)'
+	@echo  '  install	  - Install previously built project files from the output'
+	@echo  '                    dir defined by "O" cmdline option (default: current dir)'
+	@echo  '                    to the install dir  defined by "DESTDIR" cmdline'
+	@echo  ''
+	@echo  'Clean targets:'
+	@echo  '  clean		  - Clean build artifacts from the dir defined by "O" cmdline'
+	@echo  '                    option (default: current dir)'
+
  .PHONY: all default clean install

I don't see a value in adding this - these are common targets and nothing new about them.

thanks,
-- Shuah

#7 lore raw

PATCH 4/4 cpupower: Add 'help' target to the 'debug/i386' subproject makefile

In reply to Roman Storozhenko

Add 'help' target, describing all user-available targets, to the 'debug/i386' subproject makefile.

---
 tools/power/cpupower/debug/i386/Makefile | 12 ++++++++++++
 1 file changed, 12 insertions(+)
tools/power/cpupower/debug/i386/Makefile +12 -0
index b3f771039b17..361265170986 100644
@@ -39,4 +39,16 @@ install:
 	$(INSTALL) $(OUTPUT)dump_psb $(DESTDIR)${bindir}
 	$(INSTALL) $(OUTPUT)intel_gsic $(DESTDIR)${bindir}
 
+help:
+	@echo  'Build targets:'
+	@echo  '  all		  - Default target. Could be omitted. Put build artifacts'
+	@echo  '                    to "O" cmdline option dir (default: current dir)'
+	@echo  '  install	  - Install previously built project files from the output'
+	@echo  '                    dir defined by "O" cmdline option (default: current dir)'
+	@echo  '                    to the install dir  defined by "DESTDIR" cmdline'
+	@echo  ''
+	@echo  'Clean targets:'
+	@echo  '  clean		  - Clean build artifacts from the dir defined by "O" cmdline'
+	@echo  '                    option (default: current dir)'
+
 .PHONY: all default clean install
Signature · 1 line
2.34.1
maintainer
#8 lore raw

Re: [PATCH 4/4] cpupower: Add 'help' target to the 'debug/i386' subproject makefile

Quoted 20 lines · Roman Storozhenko

Add 'help' target, describing all user-available targets, to the 'debug/i386' subproject makefile.

---
  tools/power/cpupower/debug/i386/Makefile | 12 ++++++++++++
  1 file changed, 12 insertions(+)
tools/power/cpupower/debug/i386/Makefile +3 -0
index b3f771039b17..361265170986 100644
@@ -39,4 +39,16 @@ install:
  	$(INSTALL) $(OUTPUT)dump_psb $(DESTDIR)${bindir}
  	$(INSTALL) $(OUTPUT)intel_gsic $(DESTDIR)${bindir}
 
+help:
+	@echo  'Build targets:'
+	@echo  '  all		  - Default target. Could be omitted. Put build artifacts'

tools/power/cpupower/debug/i386/Makefile install: · line 54

Quoted 10 lines
tools/power/cpupower/debug/i386/Makefile +9 -0
+	@echo  '                    to "O" cmdline option dir (default: current dir)'
+	@echo  '  install	  - Install previously built project files from the output'
+	@echo  '                    dir defined by "O" cmdline option (default: current dir)'
+	@echo  '                    to the install dir  defined by "DESTDIR" cmdline'
+	@echo  ''
+	@echo  'Clean targets:'
+	@echo  '  clean		  - Clean build artifacts from the dir defined by "O" cmdline'
+	@echo  '                    option (default: current dir)'
+
  .PHONY: all default clean install

I don't see a value in adding this - these are common targets and nothing new about them.

thanks,
-- Shuah

maintainer
#9 lore raw
In reply to Roman Storozhenko
Quoted 16 lines · Roman Storozhenko

This patch series adds the 'help' target describing all the user-available targets to the makefiles which haven't had that target yet.

---
Roman Storozhenko (4):
cpupower: Add 'help' target to the 'bench' subproject makefile
cpupower: Add 'help' target to the 'debug/kernel' subproject makefile
cpupower: Add 'help' target to the 'debug/x86_64' subproject makefile
cpupower: Add 'help' target to the 'debug/i386' subproject makefile

  tools/power/cpupower/bench/Makefile        | 12 ++++++++++++
  tools/power/cpupower/debug/i386/Makefile   | 12 ++++++++++++
  tools/power/cpupower/debug/kernel/Makefile | 12 ++++++++++++
  tools/power/cpupower/debug/x86_64/Makefile | 12 ++++++++++++
  4 files changed, 48 insertions(+)
Quoted 5 lines

---
base-commit: f76698bd9a8ca01d3581236082d786e9a6b72bb7
change-id: 20240623-make_help_rest-e799889f43a1

Best regards,

Sorry. I don't see value in adding help messages for common make targets

thanks,
-- Shuah