cifs-utils: fixes for manpage pathname replacement scheme
Subsystems (3)
PATCH 1/1 cifs-utils: fixes for manpage pathname replacement scheme
Fix up some small problems with pathname replacement:
1) replace the bare 'sed' with $(SED)
2) '\@' is apparently not portable, so we need to use a different scheme in case we end up using a non-typical sed binary.
3) do the sed conversion to a new file and then move it into place. If sed falls down halfway through the conversion we could end up with a half-baked manpage.
4) use the $@ construct for brevity and maintainability
5) add a comment so that the rationale behind this is explained
Many thanks to several folks inside Red Hat who pointed out these issues.
--- Makefile.am | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)
Makefile.am +6 -2
@@ -14,11 +14,15 @@ cifs_upcall_SOURCES = cifs.upcall.c data_blob.c asn1.c spnego.c util.c cifs_upcall_LDADD = -ltalloc -lkeyutils $(KRB5_LDADD) man_MANS += cifs.upcall.8 +# +# Fix the pathnames in manpages. To prevent @label@ being replaced by m4, we +# need to obfuscate the LHS of the regex (hence the trivial one character set). +# cifs.upcall.8: cifs.upcall.8.in - sed 's,\@sbindir\@,$(sbindir),' < $(srcdir)/cifs.upcall.8.in > cifs.upcall.8 + $(SED) 's,[@]sbindir@,$(sbindir),' $(srcdir)/[email protected] > $@-t && mv $@-t $@ clean-local: - rm -f cifs.upcall.8 + rm -f cifs.upcall.8 cifs.upcall.8-t endif if CONFIG_CIFSCREDS
Signature · 1 line
1.7.3.2
A message that is not in the archive (sent off-list or not yet received): 1292346329-31009-1-git-send-email-jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org
Quoted 15 lines · On Tue, 14 Dec 2010 12:05:29 -0500 Jeff Layton…
Fix up some small problems with pathname replacement:
1) replace the bare 'sed' with $(SED)
2) '\@' is apparently not portable, so we need to use a different scheme in case we end up using a non-typical sed binary.
3) do the sed conversion to a new file and then move it into place. If sed falls down halfway through the conversion we could end up with a half-baked manpage.
4) use the $@ construct for brevity and maintainability
5) add a comment so that the rationale behind this is explained
Quoted 8 lines
Many thanks to several folks inside Red Hat who pointed out these issues.
Signed-off-by Jeff Layton <[email protected]>--- Makefile.am | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)
Patch pushed to master branch.
Signature · 1 line
Jeff Layton <[email protected]>