summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorJeff Layton <jlayton@samba.org>2017-10-23 13:46:33 -0400
committerJeff Layton <jlayton@samba.org>2017-10-23 13:46:33 -0400
commit72c68f598ccd935ba1c11c7e64d68e9d094bb1ac (patch)
tree27bbb4d22e857d9ed4efd5f8b4ca43c81c7137cc /Makefile.am
parentd999610bf985f19fcc1984be95f11da7a3e88533 (diff)
downloadcifs-utils-72c68f598ccd935ba1c11c7e64d68e9d094bb1ac.tar.gz
cifs-utils-72c68f598ccd935ba1c11c7e64d68e9d094bb1ac.tar.bz2
cifs-utils-72c68f598ccd935ba1c11c7e64d68e9d094bb1ac.zip
doc: convert pod files to rst
Aurelien did a big conversion of raw troff files into .pod docs in a recent patch. That worked out pretty well, but I have some reservations about using POD as a canonical format. While it does make it pretty simple to write manpages, it's sort of an obscure format, and is heavily associated with perl. Meanwhile, the kernel is slowly moving to using ReStructured Text as its documentation format. Given the simplicity of the cifs-utils manpages, I think we're better suited to using rst as a canonical format, rather than pod. This patch converts all of the .pod files in the code to .rst files, and fixes the Makefile and autoconf to use the correct tools to turn those into manpages. The conversion was done with the pod2rst script, with some by-hand modifications at the end to clean up the formatting and add the manual section numbers. It's not perfect and could probably use a second pass to clean up the warts in the formatting, but the content is all intact and it should be readable. Finally, convert the makefile rules to use standard SUFFIX rules instead of the non-portable GNU make % style extension rules. We don't really expect anyone to use anything other than GNU make here, but this silences an automake warning. Signed-off-by: Aurelien Aptel <aaptel@suse.com> Signed-off-by: Jeff Layton <jlayton@samba.org>
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am65
1 files changed, 27 insertions, 38 deletions
diff --git a/Makefile.am b/Makefile.am
index 559ce08..30658e3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,7 +6,7 @@ root_sbin_PROGRAMS = mount.cifs
mount_cifs_SOURCES = mount.cifs.c mtab.c resolve_host.c util.c
mount_cifs_LDADD = $(LIBCAP) $(CAPNG_LDADD) $(RT_LDADD)
include_HEADERS = cifsidmap.h
-pod_man_pages = mount.cifs.8
+rst_man_pages = mount.cifs.8
#
# Generate man pages troff source from POD format
@@ -14,25 +14,14 @@ pod_man_pages = mount.cifs.8
man_MANS=
-POD2MAN = pod2man -s $$(echo $@ | sed 's,.*\([1-9]\)$$,\1,' ) \
- -c 'System Administration Tools' -u -r '' --stderr $< $@
-
-%.1: %.pod
- $(POD2MAN)
-%.2: %.pod
- $(POD2MAN)
-%.3: %.pod
- $(POD2MAN)
-%.4: %.pod
- $(POD2MAN)
-%.5: %.pod
- $(POD2MAN)
-%.6: %.pod
- $(POD2MAN)
-%.7: %.pod
- $(POD2MAN)
-%.8: %.pod
- $(POD2MAN)
+SUFFIXES = .rst .1 .8
+
+RST2MAN = rst2man --syntax-highlight=none $< $@
+
+.rst.1:
+ $(RST2MAN)
+.rst.8:
+ $(RST2MAN)
CLEANFILES =
bin_PROGRAMS =
@@ -42,12 +31,12 @@ if CONFIG_CIFSUPCALL
sbin_PROGRAMS += cifs.upcall
cifs_upcall_SOURCES = cifs.upcall.c data_blob.c asn1.c spnego.c
cifs_upcall_LDADD = -ltalloc -lkeyutils $(KRB5_LDADD) $(CAPNG_LDADD)
-pod_man_pages += cifs.upcall.8
+rst_man_pages += 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.pod: cifs.upcall.pod.in
+cifs.upcall.rst: cifs.upcall.rst.in
$(SED) 's,[@]sbindir@,$(sbindir),' $(srcdir)/$@.in > $@-t && mv $@-t $@
endif
@@ -56,7 +45,7 @@ bin_PROGRAMS += cifscreds
cifscreds_SOURCES = cifscreds.c cifskey.c resolve_host.c util.c
cifscreds_LDADD = -lkeyutils
-pod_man_pages += cifscreds.1
+rst_man_pages += cifscreds.1
endif
@@ -64,9 +53,9 @@ if CONFIG_CIFSIDMAP
sbin_PROGRAMS += cifs.idmap
cifs_idmap_SOURCES = cifs.idmap.c idmap_plugin.c
cifs_idmap_LDADD = -lkeyutils -ldl
-pod_man_pages += cifs.idmap.8
-CLEANFILES += cifs.idmap.pod
-cifs.idmap.pod: cifs.idmap.pod.in
+rst_man_pages += cifs.idmap.8
+CLEANFILES += cifs.idmap.rst
+cifs.idmap.rst: cifs.idmap.rst.in
$(SED) -e 's,[@]sbindir@,$(sbindir),' -e 's,[@]pluginpath@,$(pluginpath),' $(srcdir)/$@.in > $@-t && mv $@-t $@
endif
@@ -75,18 +64,18 @@ bin_PROGRAMS += getcifsacl
getcifsacl_SOURCES = getcifsacl.c idmap_plugin.c
getcifsacl_LDADD = -ldl
-pod_man_pages += getcifsacl.1
-CLEANFILES += getcifsacl.pod
-getcifsacl.pod: getcifsacl.pod.in
+rst_man_pages += getcifsacl.1
+CLEANFILES += getcifsacl.rst
+getcifsacl.rst: getcifsacl.rst.in
$(SED) 's,[@]pluginpath@,$(pluginpath),' $(srcdir)/$@.in > $@-t && mv $@-t $@
bin_PROGRAMS += setcifsacl
setcifsacl_SOURCES = setcifsacl.c idmap_plugin.c
setcifsacl_LDADD = -ldl
-pod_man_pages += setcifsacl.1
-CLEANFILES += setcifsacl.pod
-setcifsacl.pod: setcifsacl.pod.in
+rst_man_pages += setcifsacl.1
+CLEANFILES += setcifsacl.rst
+setcifsacl.rst: setcifsacl.rst.in
$(SED) 's,[@]pluginpath@,$(pluginpath),' $(srcdir)/$@.in > $@-t && mv $@-t $@
endif
@@ -96,23 +85,23 @@ plugin_PROGRAMS = idmapwb.so
idmapwb.so: idmapwb.c
$(CC) $(DEFS) $(CFLAGS) $(AM_CFLAGS) $(WBCLIENT_CFLAGS) $(LDFLAGS) -shared -fpic -o $@ $+ $(WBCLIENT_LIBS)
-pod_man_pages += idmapwb.8
-CLEANFILES += idmapwb.pod
-idmapwb.pod: idmapwb.pod.in
+rst_man_pages += idmapwb.8
+CLEANFILES += idmapwb.rst
+idmapwb.rst: idmapwb.rst.in
$(SED) 's,[@]pluginpath@,$(pluginpath),' $(srcdir)/$@.in > $@-t && mv $@-t $@
endif
if CONFIG_PAM
pam_PROGRAMS = pam_cifscreds.so
-pod_man_pages += pam_cifscreds.8
+rst_man_pages += pam_cifscreds.8
pam_cifscreds.so: pam_cifscreds.c cifskey.c resolve_host.c util.c
$(CC) $(DEFS) $(CFLAGS) $(AM_CFLAGS) $(LDFLAGS) -shared -fpic -o $@ $+ -lpam -lkeyutils
endif
if CONFIG_MAN
-man_MANS += $(pod_man_pages)
-CLEANFILES += $(pod_man_pages)
+man_MANS += $(rst_man_pages)
+CLEANFILES += $(rst_man_pages)
endif
SUBDIRS = contrib