From e93b09f73b0914d8e0b8c2c78b6a1a8ebefa151c Mon Sep 17 00:00:00 2001 From: Goffredo Baroncelli Date: Sat, 16 Jul 2011 11:03:14 +0200 Subject: [PATCH 11/35] Update the makefile for generating the man page. 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 | 322 ---------------------------------------------------- man/btrfs.8.in.old | 322 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 332 insertions(+), 323 deletions(-) delete mode 100644 man/btrfs.8.in create mode 100644 man/btrfs.8.in.old diff --git a/Makefile b/Makefile index 5f25d66..b673100 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,8 @@ RESTORE_LIBS=-lz progs = btrfsctl mkfs.btrfs btrfs-debug-tree btrfs-show btrfs-vol btrfsck \ btrfs btrfs-map-logical restore find-root calc-size btrfs-corrupt-block +btrfs_man_page_source = btrfs.c btrfs_cmds.c scrub.c + # make C=1 to enable sparse ifdef C check = sparse $(CHECKFLAGS) @@ -97,13 +99,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 be478e0..0000000 --- a/man/btrfs.8.in +++ /dev/null @@ -1,322 +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 \fBsubvolume get-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\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||