On Fri, 28 Dec 2012 09:38:17 +0100 Joerg Mayer jmayer@loplof.de wrote:
Add version and description to manpage, make extension configurable.
Hello Jörg and thanks for your effort!
Remove some trailing whitespace from manpage.
I have took these unrelated changes and merged them to my tested_stuff branch, thanks.
Note1: This requires sed during the build process. Is this acceptable?
I think no, not for building an *exported* source dump, but we do something very similar for the svn version string, please see the export target in the makefile and refine the patch accordingly.
Note2: Apply patch, then rename flashrom.8 to flashrom.man.in
I am not sure if it should be renamed at all... the export target does a similar thing to the makefile... of course renaming the makefile is a bad idea, but I am not sure if renaming the manpage is a benefit either?
Signed-off-by: Joerg Mayer jmayer@loplof.de
Index: flashrom.8
--- flashrom.8 (revision 1633) +++ flashrom.8 (working copy) @@ -1,4 +1,4 @@ -.TH FLASHROM 8 "Dec, 2012" +.TH FLASHROM @MANEXT@ "@DATE@" "@VERSION@" "A flash programmer"
TBH the whole MANEXT thing is nonsense, although of course magic numbers are not nice in general and I appreciate your thinking about this.
The manpage sections indicate the topic of the program and this is a unix "standard". 8 means system/admin utils and flashrom does not and will never fit into any other category (maybe games? well you are gambling with the system, but I think they meant that differently... :) I have removed this part and all related bits. I have also removed the additional header "A flash programmer", because I think it is clear enough already and this line does not improve the situation.
Index: Makefile
--- Makefile (revision 1633) +++ Makefile (working copy) @@ -35,6 +35,7 @@ DIFF = diff PREFIX ?= /usr/local MANDIR ?= $(PREFIX)/share/man +MANEXT ?= 8
see above.
- sed -e "s#@MANEXT@#$(MANEXT)#g" -e "s#@VERSION@#$(VERSION)#g" -e "s#@DATE@#$(DATE)#g" <$< >$@
The missing @ creates (arguably) unwanted output.
I have attached what remains. I am not sure we really want this kind of feature, but I don't see a reason why we should not include it either (after a refinement). One nice feature would be to automate the date too... because this is the only problem this patches solves, that I see in the current scheme (i.e. we forget to keep the date up to date :)