diff options
author | Jeff Layton <jlayton@samba.org> | 2010-12-14 12:05:04 -0500 |
---|---|---|
committer | Jeff Layton <jlayton@samba.org> | 2010-12-14 12:05:04 -0500 |
commit | 3e15450d879a42598a2596f2f1f535e95d423057 (patch) | |
tree | 10d98697373079407b0aba0534ce8b95adb65487 | |
parent | 68691e68937ab9dc7f2d570da7e38659f25d41c1 (diff) | |
download | cifs-utils-3e15450d879a42598a2596f2f1f535e95d423057.tar.gz cifs-utils-3e15450d879a42598a2596f2f1f535e95d423057.tar.bz2 cifs-utils-3e15450d879a42598a2596f2f1f535e95d423057.zip |
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.
Signed-off-by: Jeff Layton <jlayton@samba.org>
-rw-r--r-- | Makefile.am | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am index cbfa846..67a0190 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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)/$@.in > $@-t && mv $@-t $@ clean-local: - rm -f cifs.upcall.8 + rm -f cifs.upcall.8 cifs.upcall.8-t endif if CONFIG_CIFSCREDS |