public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Renninger <trenn@suse.com>
To: linux-pm@vger.kernel.org, Ivan Babrou <ivan@cloudflare.com>
Cc: linux-kernel@vger.kernel.org, kernel-team@cloudflare.com,
	Ivan Babrou <ivan@cloudflare.com>, Shuah Khan <shuah@kernel.org>
Subject: Re: [PATCH] cpupower: add Makefile dependencies for install targets
Date: Thu, 07 Jan 2021 11:07:25 +0100	[thread overview]
Message-ID: <2100533.HVZEckHxcR@c100> (raw)
In-Reply-To: <20210104235719.13525-1-ivan@cloudflare.com>

Am Dienstag, 5. Januar 2021, 00:57:18 CET schrieb Ivan Babrou:
> This allows building cpupower in parallel rather than serially.

cpupower is built serially:

[ make clean ]

time make
real    0m3,742s
user    0m3,330s
sys     0m1,105s

[ make clean ]

time make -j10
real    0m1,045s
user    0m3,153s
sys     0m1,037s

Only advantage I see is that you can call
make install-xy
targets without calling the corresponding build target
make xy
similar to the general install target:
install: all install-lib ...

Not sure anyone needs this and whether all targets
successfully work this way.
If you'd show a useful usecase example...

       Thomas

> 
> Signed-off-by: Ivan Babrou <ivan@cloudflare.com>
> ---
>  tools/power/cpupower/Makefile       | 8 ++++----
>  tools/power/cpupower/bench/Makefile | 2 +-
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/tools/power/cpupower/Makefile b/tools/power/cpupower/Makefile
> index c7bcddbd486d..3b1594447f29 100644
> --- a/tools/power/cpupower/Makefile
> +++ b/tools/power/cpupower/Makefile
> @@ -270,14 +270,14 @@ clean:
>  	$(MAKE) -C bench O=$(OUTPUT) clean
> 
> 
> -install-lib:
> +install-lib: libcpupower
>  	$(INSTALL) -d $(DESTDIR)${libdir}
>  	$(CP) $(OUTPUT)libcpupower.so* $(DESTDIR)${libdir}/
>  	$(INSTALL) -d $(DESTDIR)${includedir}
>  	$(INSTALL_DATA) lib/cpufreq.h $(DESTDIR)${includedir}/cpufreq.h
>  	$(INSTALL_DATA) lib/cpuidle.h $(DESTDIR)${includedir}/cpuidle.h
> 
> -install-tools:
> +install-tools: $(OUTPUT)cpupower
>  	$(INSTALL) -d $(DESTDIR)${bindir}
>  	$(INSTALL_PROGRAM) $(OUTPUT)cpupower $(DESTDIR)${bindir}
>  	$(INSTALL) -d $(DESTDIR)${bash_completion_dir}
> @@ -293,14 +293,14 @@ install-man:
>  	$(INSTALL_DATA) -D man/cpupower-info.1
> $(DESTDIR)${mandir}/man1/cpupower-info.1 $(INSTALL_DATA) -D
> man/cpupower-monitor.1 $(DESTDIR)${mandir}/man1/cpupower-monitor.1
> 
> -install-gmo:
> +install-gmo: create-gmo
>  	$(INSTALL) -d $(DESTDIR)${localedir}
>  	for HLANG in $(LANGUAGES); do \
>  		echo '$(INSTALL_DATA) -D $(OUTPUT)po/$$HLANG.gmo
> $(DESTDIR)${localedir}/$$HLANG/LC_MESSAGES/cpupower.mo'; \ $(INSTALL_DATA)
> -D $(OUTPUT)po/$$HLANG.gmo
> $(DESTDIR)${localedir}/$$HLANG/LC_MESSAGES/cpupower.mo; \ done;
> 
> -install-bench:
> +install-bench: compile-bench
>  	@#DESTDIR must be set from outside to survive
>  	@sbindir=$(sbindir) bindir=$(bindir) docdir=$(docdir) confdir=$
(confdir)
> $(MAKE) -C bench O=$(OUTPUT) install
> 
> diff --git a/tools/power/cpupower/bench/Makefile
> b/tools/power/cpupower/bench/Makefile index f68b4bc55273..d9d9923af85c
> 100644
> --- a/tools/power/cpupower/bench/Makefile
> +++ b/tools/power/cpupower/bench/Makefile
> @@ -27,7 +27,7 @@ $(OUTPUT)cpufreq-bench: $(OBJS)
> 
>  all: $(OUTPUT)cpufreq-bench
> 
> -install:
> +install: $(OUTPUT)cpufreq-bench
>  	mkdir -p $(DESTDIR)/$(sbindir)
>  	mkdir -p $(DESTDIR)/$(bindir)
>  	mkdir -p $(DESTDIR)/$(docdir)





  reply	other threads:[~2021-01-07 10:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-04 23:57 [PATCH] cpupower: add Makefile dependencies for install targets Ivan Babrou
2021-01-07 10:07 ` Thomas Renninger [this message]
2021-01-07 17:42   ` Ivan Babrou
2021-01-07 20:59     ` Thomas Renninger
2021-01-07 21:15       ` Ivan Babrou
2021-01-07 21:29         ` Thomas Renninger
2021-01-22 18:02           ` Shuah Khan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2100533.HVZEckHxcR@c100 \
    --to=trenn@suse.com \
    --cc=ivan@cloudflare.com \
    --cc=kernel-team@cloudflare.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox