From mboxrd@z Thu Jan 1 00:00:00 1970 From: Goffredo Baroncelli Subject: [PATCH 4/6] Update the makefile for generating the man page. Date: Tue, 19 Jul 2011 18:12:16 +0200 Message-ID: <20110719161216.3210.76829.stgit@venice.bhome> References: <20110719161049.3210.54794.stgit@venice.bhome> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" To: linux-btrfs Return-path: In-Reply-To: <20110719161049.3210.54794.stgit@venice.bhome> List-ID: From: Goffredo Baroncelli The makefile is update in order to generate the man/btrfs.8.in by the helpextract tool on the basis of the sources comments. The old man page is renamed as btrfs.8.in.old. --- Makefile | 11 +- man/btrfs.8.in | 359 ---------------------------------------------------- man/btrfs.8.in.old | 359 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 369 insertions(+), 360 deletions(-) delete mode 100644 man/btrfs.8.in create mode 100644 man/btrfs.8.in.old diff --git a/Makefile b/Makefile index edee1a0..dc1342f 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,8 @@ LIBS = -luuid progs = btrfsctl mkfs.btrfs btrfs-debug-tree btrfs-show btrfs-vol btrfsck \ btrfs btrfs-map-logical +btrfs_man_page_source = btrfs.c btrfs_cmds.c scrub.c + # make C=1 to enable sparse ifdef C check = sparse $(CHECKFLAGS) @@ -84,13 +86,20 @@ convert: $(objects) convert.o ioctl-test: $(objects) ioctl-test.o $(CC) $(CFLAGS) -o ioctl-test $(objects) ioctl-test.o $(LDFLAGS) $(LIBS) -manpages: +helpextract: helpextract.o + $(CC) $(CFLAGS) -o $@ helpextract.o + +man/btrfs.8.in: helpextract $(btrfs_man_page_source) + ./helpextract --man-page $(btrfs_man_page_source) >$@ + +manpages: man/btrfs.8.in cd man; make install-man: cd man; make install clean : + rm -f man/btrfs.8.in rm -f $(progs) cscope.out *.o .*.d btrfs-convert btrfs-image btrfs-select-super \ btrfs-zero-log btrfstune dir-test ioctl-test quick-test version.h cd man; make clean diff --git a/man/btrfs.8.in b/man/btrfs.8.in deleted file mode 100644 index 84a60cd..0000000 --- a/man/btrfs.8.in +++ /dev/null @@ -1,359 +0,0 @@ -.TH BTRFS 8 "" "btrfs" "btrfs" -.\" -.\" Man page written by Goffredo Baroncelli (Feb 2010) -.\" -.SH NAME -btrfs \- control a btrfs filesystem -.SH SYNOPSIS -\fBbtrfs\fP \fBsubvolume snapshot\fP\fI [-r] [/]\fP -.PP -\fBbtrfs\fP \fBsubvolume delete\fP\fI \fP -.PP -\fBbtrfs\fP \fBsubvolume create\fP\fI [/]\fP -.PP -\fBbtrfs\fP \fBsubvolume list\fP\fI [-p] \fP -.PP -\fBbtrfs\fP \fBsubvolume set-default\fP\fI \fP -.PP -\fBbtrfs\fP \fBfilesystem sync\fP\fI \fP -.PP -\fBbtrfs\fP \fBfilesystem resize\fP\fI [+/\-][gkm]|max \fP -.PP -\fBbtrfs\fP \fBfilesystem label\fP\fI [newlabel]\fP -.PP -\fBbtrfs\fP \fBfilesystem defrag\fP\fI [options] | [|...]\fP -.PP -\fBbtrfs\fP \fBsubvolume find-new\fP\fI \fP -.PP -\fBbtrfs\fP \fBfilesystem balance\fP [\fB-wcv\fP] [\fB--wait\fP] [\fB--count\fP] [\fB--verbose\fP] [\fB-f\fP|\fBfilter=\fP\fI\fP] \fI\fP -.PP -\fBbtrfs\fP \fBbalance start\fP [\fB-wcv\fP] [\fB--wait\fP] [\fB--count\fP] [\fB--verbose\fP] [\fB-f\fP|\fBfilter=\fP\fI\fP] \fI\fP -.PP -\fBbtrfs\fP \fBbalance progress\fP [\fB-m\fP|\fB--monitor\fP] \fI\fP -.PP -\fBbtrfs\fP \fBbalance cancel\fP \fI\fP -.PP -\fBbtrfs\fP \fBfilesystem defragment\fP\fI | [|...]\fP -.PP -\fBbtrfs\fP \fBdevice scan\fP\fI [--all-devices| [...]]\fP -.PP -\fBbtrfs\fP \fBdevice show\fP\fI [--all-devices||