mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] trace-cmd, kernel analysis tool Makefile changes
@ 2010-06-09 16:01 John Kacur
  2010-06-09 16:01 ` [PATCH 1/2] trace-cmd: Makefile - EXTRAVERSION should be set without a leading period John Kacur
  2010-06-09 16:01 ` [PATCH 2/2] trace-cmd: Makefile - use a substitution reference John Kacur
  0 siblings, 2 replies; 3+ messages in thread
From: John Kacur @ 2010-06-09 16:01 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: Darren Hart, lkml, John Kacur

Hi Steve
These patches were generated against the 1.0.1 version of trace-cmd.
The second one should apply to the devel version as well.

John Kacur (2):
  trace-cmd: Makefile - EXTRAVERSION should be set without a leading
    period
  trace-cmd: Makefile - use a substitution reference

 Documentation/Makefile |    6 +++---
 Makefile               |    4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] trace-cmd: Makefile - EXTRAVERSION should be set without a leading period
  2010-06-09 16:01 [PATCH 0/2] trace-cmd, kernel analysis tool Makefile changes John Kacur
@ 2010-06-09 16:01 ` John Kacur
  2010-06-09 16:01 ` [PATCH 2/2] trace-cmd: Makefile - use a substitution reference John Kacur
  1 sibling, 0 replies; 3+ messages in thread
From: John Kacur @ 2010-06-09 16:01 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: Darren Hart, lkml, John Kacur

EXTRAVERSION should be set without a leading period, and then add
the period where necessary in the Makefile

Signed-off-by: John Kacur <jkacur@redhat.com>
---
 Makefile |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 1f5d855..0ed5685 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 # trace-cmd version
 TC_VERSION = 1
 TC_PATCHLEVEL = 0
-TC_EXTRAVERSION = .1
+TC_EXTRAVERSION = 1
 
 # Kernel Shark version
 KS_VERSION = 0
@@ -307,7 +307,7 @@ define make_version.h
 	echo \#define VERSION_CODE $(shell						\
 	expr $(VERSION) \* 256 + $(PATCHLEVEL));					\
 	echo '#define EXTRAVERSION ' $(EXTRAVERSION);					\
-	echo '#define VERSION_STRING "'$(VERSION).$(PATCHLEVEL)$(EXTRAVERSION)'"';	\
+	echo '#define VERSION_STRING "'$(VERSION).$(PATCHLEVEL).$(EXTRAVERSION)'"';	\
 	echo '#define FILE_VERSION '$(FILE_VERSION);					\
 	) > $1
 endef
-- 
1.6.6.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2] trace-cmd: Makefile - use a substitution reference
  2010-06-09 16:01 [PATCH 0/2] trace-cmd, kernel analysis tool Makefile changes John Kacur
  2010-06-09 16:01 ` [PATCH 1/2] trace-cmd: Makefile - EXTRAVERSION should be set without a leading period John Kacur
@ 2010-06-09 16:01 ` John Kacur
  1 sibling, 0 replies; 3+ messages in thread
From: John Kacur @ 2010-06-09 16:01 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: Darren Hart, lkml, John Kacur

subst will substitution every occurence of a string with another.
What we want here is just to substitute the last occurence.
That is we want to transform files that end with .1 into .1.install
We do not want to transform every ".1" in a path name into .1.install.

Without this fix you can get errors of this nature.

 make prefix=/home/jkacur/rpmbuild/BUILDROOT/trace-cmd-1.0.1-4.fc12.x86_64/usr install_doc
 make -C /home/jkacur/rpmbuild/BUILD/trace-cmd-1.0.1/Documentation install
 make[1]: *** No rule to make target `/home/jkacur/rpmbuild/BUILD/trace-cmd-1.0.1.install/Documentation/trace-cmd.1', needed by `/home/jkacur/rpmbuild/BUILD/trace-cmd-1.0.1.install/Documentation/trace-cmd.1.install'.  Stop.
 make: *** [install_doc] Error 2

Signed-off-by: John Kacur <jkacur@redhat.com>

Use a "substitution reference" instead of a substitution.
A "subst" will change every occurence of a string
---
 Documentation/Makefile |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Documentation/Makefile b/Documentation/Makefile
index 7ed8877..d161703 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -77,8 +77,8 @@ define do_install
 	$(INSTALL) $1 $2;
 endef
 
-MAN1_INSTALL = $(subst .1,.1.install,$(MAN1))
-MAN5_INSTALL = $(subst .5,.5.install,$(MAN5))
+MAN1_INSTALL = $(MAN1:%.1=%.1.install)
+MAN5_INSTALL = $(MAN5:%.5=%.5.install)
 
 $(MAN1_INSTALL): %.1.install : %.1 force
 	$(Q)$(call do_install, $<, '$(man_dir_SQ)/man1')
@@ -92,4 +92,4 @@ clean:
 	 $(RM) *.xml *.xsl *.1 *.5)
 
 .PHONE: force
-force:
\ No newline at end of file
+force:
-- 
1.6.6.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-06-09 16:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-09 16:01 [PATCH 0/2] trace-cmd, kernel analysis tool Makefile changes John Kacur
2010-06-09 16:01 ` [PATCH 1/2] trace-cmd: Makefile - EXTRAVERSION should be set without a leading period John Kacur
2010-06-09 16:01 ` [PATCH 2/2] trace-cmd: Makefile - use a substitution reference John Kacur

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®