* [PATCH 1/2] perf tools: Do not include PERF-VERSION-FILE to Makefile
@ 2013-01-16 11:59 Namhyung Kim
2013-01-16 11:59 ` [PATCH 2/2] perf tools: Get rid of unused include of config.mak Namhyung Kim
2013-01-25 11:56 ` [tip:perf/core] perf tools: Do not include PERF-VERSION-FILE to Makefile tip-bot for Namhyung Kim
0 siblings, 2 replies; 4+ messages in thread
From: Namhyung Kim @ 2013-01-16 11:59 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Peter Zijlstra, Paul Mackerras, Ingo Molnar, LKML, Namhyung Kim
From: Namhyung Kim <namhyung.kim@lge.com>
When make runs it tries to update the Makefile rules by reading all of
included Makefiles. During the perf build it checks PERF-VERSION-FILE
to get the current version number. But it triggers Makefile update so
that make runs again with the update Makefile and, in turn, users will
see duplicate CHK message on the second path.
Running make with -d option for debugging tells me this:
GNU Make 3.82
Built for x86_64-redhat-linux-gnu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Reading makefiles...
Reading makefile `Makefile'...
Reading makefile `../scripts/Makefile.include' (search path) (no ~ expansion)...
Reading makefile `config/utilities.mak' (search path) (no ~ expansion)...
Reading makefile `PERF-VERSION-FILE' (search path) (don't care) (no ~ expansion)...
Reading makefile `config/feature-tests.mak' (search path) (don't care) (no ~ expansion)...
CHK -fstack-protector-all
CHK -Wstack-protector
CHK -Wvolatile-register-var
...
Updating makefiles....
Considering target file `PERF-VERSION-FILE'.
Must remake target `PERF-VERSION-FILE'.
Invoking recipe from Makefile:52 to update target `PERF-VERSION-FILE'.
Putting child 0x14037a0 (PERF-VERSION-FILE) PID 31925 on the chain.
Live child 0x14037a0 (PERF-VERSION-FILE) PID 31925
PERF_VERSION = 3.8.rc3.gf751db6
Reaping winning child 0x14037a0 PID 31925
Removing child 0x14037a0 PID 31925 from chain.
Successfully remade target file `PERF-VERSION-FILE'.
...
Re-executing[1]: make -d <------------ here
GNU Make 3.82
Built for x86_64-redhat-linux-gnu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Reading makefiles...
Reading makefile `Makefile'...
Reading makefile `../scripts/Makefile.include' (search path) (no ~ expansion)...
Reading makefile `config/utilities.mak' (search path) (no ~ expansion)...
Reading makefile `PERF-VERSION-FILE' (search path) (don't care) (no ~ expansion)...
Reading makefile `config/feature-tests.mak' (search path) (don't care) (no ~ expansion)...
CHK -fstack-protector-all
CHK -Wstack-protector
CHK -Wvolatile-register-var
...
Actually PERF-VERSION-FILE is used only for perf.c to #define
PERF_VERSION macro. So make it like a C header file and include it
during compiling the perf.c file will remove the need of being
included into Makefile. Hench no need to update the Makefile and no
CHK lines anymore.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
tools/perf/Makefile | 3 +--
tools/perf/util/PERF-VERSION-GEN | 4 ++--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 103ed956ca80..bdbd54edf8cc 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -50,7 +50,6 @@ include config/utilities.mak
$(OUTPUT)PERF-VERSION-FILE: .FORCE-PERF-VERSION-FILE
@$(SHELL_PATH) util/PERF-VERSION-GEN $(OUTPUT)
--include $(OUTPUT)PERF-VERSION-FILE
uname_M := $(shell uname -m 2>/dev/null || echo not)
@@ -890,7 +889,7 @@ strip: $(PROGRAMS) $(OUTPUT)perf
$(STRIP) $(STRIP_OPTS) $(PROGRAMS) $(OUTPUT)perf
$(OUTPUT)perf.o: perf.c $(OUTPUT)common-cmds.h $(OUTPUT)PERF-CFLAGS
- $(QUIET_CC)$(CC) -DPERF_VERSION='"$(PERF_VERSION)"' \
+ $(QUIET_CC)$(CC) -include $(OUTPUT)PERF-VERSION-FILE \
'-DPERF_HTML_PATH="$(htmldir_SQ)"' \
$(ALL_CFLAGS) -c $(filter %.c,$^) -o $@
diff --git a/tools/perf/util/PERF-VERSION-GEN b/tools/perf/util/PERF-VERSION-GEN
index 6aa34e5afdcf..055fef34b6f6 100755
--- a/tools/perf/util/PERF-VERSION-GEN
+++ b/tools/perf/util/PERF-VERSION-GEN
@@ -26,13 +26,13 @@ VN=$(expr "$VN" : v*'\(.*\)')
if test -r $GVF
then
- VC=$(sed -e 's/^PERF_VERSION = //' <$GVF)
+ VC=$(sed -e 's/^#define PERF_VERSION "\(.*\)"/\1/' <$GVF)
else
VC=unset
fi
test "$VN" = "$VC" || {
echo >&2 "PERF_VERSION = $VN"
- echo "PERF_VERSION = $VN" >$GVF
+ echo "#define PERF_VERSION \"$VN\"" >$GVF
}
--
1.7.11.7
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 2/2] perf tools: Get rid of unused include of config.mak
2013-01-16 11:59 [PATCH 1/2] perf tools: Do not include PERF-VERSION-FILE to Makefile Namhyung Kim
@ 2013-01-16 11:59 ` Namhyung Kim
2013-01-25 11:55 ` [tip:perf/core] " tip-bot for Namhyung Kim
2013-01-25 11:56 ` [tip:perf/core] perf tools: Do not include PERF-VERSION-FILE to Makefile tip-bot for Namhyung Kim
1 sibling, 1 reply; 4+ messages in thread
From: Namhyung Kim @ 2013-01-16 11:59 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Peter Zijlstra, Paul Mackerras, Ingo Molnar, LKML, Namhyung Kim
From: Namhyung Kim <namhyung.kim@lge.com>
These lines are came from GIT Makefile and never used for perf.
I found it from make -d output during working on previous patch.
Updating makefiles....
Considering target file `arch/x86/Makefile'.
No need to remake target `arch/x86/Makefile'.
Considering target file `config.mak'.
File `config.mak' does not exist.
Must remake target `config.mak'.
Failed to remake target file `config.mak'.
Considering target file `config.mak.autogen'.
File `config.mak.autogen' does not exist.
Must remake target `config.mak.autogen'.
Failed to remake target file `config.mak.autogen'.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
tools/perf/Makefile | 3 ---
1 file changed, 3 deletions(-)
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index bdbd54edf8cc..e6f314540cf5 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -533,9 +533,6 @@ ifneq ($(MAKECMDGOALS),tags)
# because maintaining the nesting to match is a pain. If
# we had "elif" things would have been much nicer...
--include config.mak.autogen
--include config.mak
-
ifdef NO_LIBELF
NO_DWARF := 1
NO_DEMANGLE := 1
--
1.7.11.7
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [tip:perf/core] perf tools: Get rid of unused include of config.mak
2013-01-16 11:59 ` [PATCH 2/2] perf tools: Get rid of unused include of config.mak Namhyung Kim
@ 2013-01-25 11:55 ` tip-bot for Namhyung Kim
0 siblings, 0 replies; 4+ messages in thread
From: tip-bot for Namhyung Kim @ 2013-01-25 11:55 UTC (permalink / raw)
To: linux-tip-commits
Cc: acme, linux-kernel, paulus, hpa, mingo, a.p.zijlstra,
namhyung.kim, namhyung, tglx
Commit-ID: 1aa3d1780f518080e6a51a5288cd05fb4b34d82c
Gitweb: http://git.kernel.org/tip/1aa3d1780f518080e6a51a5288cd05fb4b34d82c
Author: Namhyung Kim <namhyung.kim@lge.com>
AuthorDate: Wed, 16 Jan 2013 20:59:54 +0900
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 24 Jan 2013 16:40:44 -0300
perf tools: Get rid of unused include of config.mak
These lines are came from GIT Makefile and never used for perf.
I found it from make -d output during working on previous patch.
Updating makefiles....
Considering target file `arch/x86/Makefile'.
No need to remake target `arch/x86/Makefile'.
Considering target file `config.mak'.
File `config.mak' does not exist.
Must remake target `config.mak'.
Failed to remake target file `config.mak'.
Considering target file `config.mak.autogen'.
File `config.mak.autogen' does not exist.
Must remake target `config.mak.autogen'.
Failed to remake target file `config.mak.autogen'.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1358337594-10916-2-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/Makefile | 3 ---
1 file changed, 3 deletions(-)
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index e18163b..6aef6d0 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -534,9 +534,6 @@ ifneq ($(MAKECMDGOALS),tags)
# because maintaining the nesting to match is a pain. If
# we had "elif" things would have been much nicer...
--include config.mak.autogen
--include config.mak
-
ifdef NO_LIBELF
NO_DWARF := 1
NO_DEMANGLE := 1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [tip:perf/core] perf tools: Do not include PERF-VERSION-FILE to Makefile
2013-01-16 11:59 [PATCH 1/2] perf tools: Do not include PERF-VERSION-FILE to Makefile Namhyung Kim
2013-01-16 11:59 ` [PATCH 2/2] perf tools: Get rid of unused include of config.mak Namhyung Kim
@ 2013-01-25 11:56 ` tip-bot for Namhyung Kim
1 sibling, 0 replies; 4+ messages in thread
From: tip-bot for Namhyung Kim @ 2013-01-25 11:56 UTC (permalink / raw)
To: linux-tip-commits
Cc: acme, linux-kernel, paulus, hpa, mingo, a.p.zijlstra,
namhyung.kim, namhyung, tglx
Commit-ID: 3cecaa2002273887a9364c454684fa8491bb2b10
Gitweb: http://git.kernel.org/tip/3cecaa2002273887a9364c454684fa8491bb2b10
Author: Namhyung Kim <namhyung.kim@lge.com>
AuthorDate: Wed, 16 Jan 2013 20:59:53 +0900
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 24 Jan 2013 16:40:45 -0300
perf tools: Do not include PERF-VERSION-FILE to Makefile
When make runs it tries to update the Makefile rules by reading all of
included Makefiles. During the perf build it checks PERF-VERSION-FILE
to get the current version number. But it triggers Makefile update so
that make runs again with the update Makefile and, in turn, users will
see duplicate CHK message on the second path.
Running make with -d option for debugging tells me this:
GNU Make 3.82
Built for x86_64-redhat-linux-gnu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Reading makefiles...
Reading makefile `Makefile'...
Reading makefile `../scripts/Makefile.include' (search path) (no ~ expansion)...
Reading makefile `config/utilities.mak' (search path) (no ~ expansion)...
Reading makefile `PERF-VERSION-FILE' (search path) (don't care) (no ~ expansion)...
Reading makefile `config/feature-tests.mak' (search path) (don't care) (no ~ expansion)...
CHK -fstack-protector-all
CHK -Wstack-protector
CHK -Wvolatile-register-var
...
Updating makefiles....
Considering target file `PERF-VERSION-FILE'.
Must remake target `PERF-VERSION-FILE'.
Invoking recipe from Makefile:52 to update target `PERF-VERSION-FILE'.
Putting child 0x14037a0 (PERF-VERSION-FILE) PID 31925 on the chain.
Live child 0x14037a0 (PERF-VERSION-FILE) PID 31925
PERF_VERSION = 3.8.rc3.gf751db6
Reaping winning child 0x14037a0 PID 31925
Removing child 0x14037a0 PID 31925 from chain.
Successfully remade target file `PERF-VERSION-FILE'.
...
Re-executing[1]: make -d <------------ here
GNU Make 3.82
Built for x86_64-redhat-linux-gnu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Reading makefiles...
Reading makefile `Makefile'...
Reading makefile `../scripts/Makefile.include' (search path) (no ~ expansion)...
Reading makefile `config/utilities.mak' (search path) (no ~ expansion)...
Reading makefile `PERF-VERSION-FILE' (search path) (don't care) (no ~ expansion)...
Reading makefile `config/feature-tests.mak' (search path) (don't care) (no ~ expansion)...
CHK -fstack-protector-all
CHK -Wstack-protector
CHK -Wvolatile-register-var
...
Actually PERF-VERSION-FILE is used only for perf.c to #define
PERF_VERSION macro. So make it like a C header file and include it
during compiling the perf.c file will remove the need of being
included into Makefile. Hench no need to update the Makefile and no
CHK lines anymore.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1358337594-10916-1-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/Makefile | 3 +--
tools/perf/util/PERF-VERSION-GEN | 4 ++--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 6aef6d0..a84021a 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -50,7 +50,6 @@ include config/utilities.mak
$(OUTPUT)PERF-VERSION-FILE: .FORCE-PERF-VERSION-FILE
@$(SHELL_PATH) util/PERF-VERSION-GEN $(OUTPUT)
--include $(OUTPUT)PERF-VERSION-FILE
uname_M := $(shell uname -m 2>/dev/null || echo not)
@@ -887,7 +886,7 @@ strip: $(PROGRAMS) $(OUTPUT)perf
$(STRIP) $(STRIP_OPTS) $(PROGRAMS) $(OUTPUT)perf
$(OUTPUT)perf.o: perf.c $(OUTPUT)common-cmds.h $(OUTPUT)PERF-CFLAGS
- $(QUIET_CC)$(CC) -DPERF_VERSION='"$(PERF_VERSION)"' \
+ $(QUIET_CC)$(CC) -include $(OUTPUT)PERF-VERSION-FILE \
'-DPERF_HTML_PATH="$(htmldir_SQ)"' \
$(ALL_CFLAGS) -c $(filter %.c,$^) -o $@
diff --git a/tools/perf/util/PERF-VERSION-GEN b/tools/perf/util/PERF-VERSION-GEN
index 6aa34e5..055fef3 100755
--- a/tools/perf/util/PERF-VERSION-GEN
+++ b/tools/perf/util/PERF-VERSION-GEN
@@ -26,13 +26,13 @@ VN=$(expr "$VN" : v*'\(.*\)')
if test -r $GVF
then
- VC=$(sed -e 's/^PERF_VERSION = //' <$GVF)
+ VC=$(sed -e 's/^#define PERF_VERSION "\(.*\)"/\1/' <$GVF)
else
VC=unset
fi
test "$VN" = "$VC" || {
echo >&2 "PERF_VERSION = $VN"
- echo "PERF_VERSION = $VN" >$GVF
+ echo "#define PERF_VERSION \"$VN\"" >$GVF
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-01-25 11:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-16 11:59 [PATCH 1/2] perf tools: Do not include PERF-VERSION-FILE to Makefile Namhyung Kim
2013-01-16 11:59 ` [PATCH 2/2] perf tools: Get rid of unused include of config.mak Namhyung Kim
2013-01-25 11:55 ` [tip:perf/core] " tip-bot for Namhyung Kim
2013-01-25 11:56 ` [tip:perf/core] perf tools: Do not include PERF-VERSION-FILE to Makefile tip-bot for Namhyung Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox