2014-04-02 08:29:12 +00:00
|
|
|
# Guard against environment variables
|
|
|
|
MAN8_TXT =
|
|
|
|
|
|
|
|
# Top level commands
|
2015-04-14 15:37:23 +00:00
|
|
|
MAN8_TXT += btrfs.asciidoc
|
|
|
|
MAN8_TXT += btrfs-convert.asciidoc
|
|
|
|
MAN8_TXT += btrfs-find-root.asciidoc
|
|
|
|
MAN8_TXT += btrfs-image.asciidoc
|
|
|
|
MAN8_TXT += btrfs-map-logical.asciidoc
|
2015-09-02 03:00:46 +00:00
|
|
|
MAN8_TXT += btrfs-select-super.asciidoc
|
2015-04-14 15:37:23 +00:00
|
|
|
MAN8_TXT += btrfstune.asciidoc
|
|
|
|
MAN8_TXT += fsck.btrfs.asciidoc
|
|
|
|
MAN8_TXT += mkfs.btrfs.asciidoc
|
2014-04-02 08:29:12 +00:00
|
|
|
|
|
|
|
# Sub commands for btrfs
|
2015-04-14 15:37:23 +00:00
|
|
|
MAN8_TXT += btrfs-subvolume.asciidoc
|
|
|
|
MAN8_TXT += btrfs-filesystem.asciidoc
|
|
|
|
MAN8_TXT += btrfs-balance.asciidoc
|
|
|
|
MAN8_TXT += btrfs-device.asciidoc
|
|
|
|
MAN8_TXT += btrfs-scrub.asciidoc
|
|
|
|
MAN8_TXT += btrfs-check.asciidoc
|
|
|
|
MAN8_TXT += btrfs-rescue.asciidoc
|
|
|
|
MAN8_TXT += btrfs-inspect-internal.asciidoc
|
|
|
|
MAN8_TXT += btrfs-send.asciidoc
|
|
|
|
MAN8_TXT += btrfs-receive.asciidoc
|
|
|
|
MAN8_TXT += btrfs-quota.asciidoc
|
|
|
|
MAN8_TXT += btrfs-qgroup.asciidoc
|
|
|
|
MAN8_TXT += btrfs-replace.asciidoc
|
|
|
|
MAN8_TXT += btrfs-restore.asciidoc
|
|
|
|
MAN8_TXT += btrfs-property.asciidoc
|
2014-04-02 08:29:12 +00:00
|
|
|
|
2016-01-11 14:32:38 +00:00
|
|
|
# Category 5 manual page
|
|
|
|
MAN5_TXT += btrfs-man5.asciidoc
|
2014-06-11 22:14:55 +00:00
|
|
|
|
|
|
|
MAN_TXT = $(MAN8_TXT) $(MAN5_TXT)
|
2015-04-14 15:37:23 +00:00
|
|
|
MAN_XML = $(patsubst %.asciidoc,%.xml,$(MAN_TXT))
|
2015-10-07 12:36:34 +00:00
|
|
|
MAN_HTML = $(patsubst %.asciidoc,%.html,$(MAN_TXT))
|
2014-06-11 22:14:55 +00:00
|
|
|
|
2015-04-14 15:37:23 +00:00
|
|
|
DOC_MAN5 = $(patsubst %.asciidoc,%.5,$(MAN5_TXT))
|
|
|
|
GZ_MAN5 = $(patsubst %.asciidoc,%.5.gz,$(MAN5_TXT))
|
2014-06-11 22:14:55 +00:00
|
|
|
|
2015-04-14 15:37:23 +00:00
|
|
|
DOC_MAN8 = $(patsubst %.asciidoc,%.8,$(MAN8_TXT))
|
|
|
|
GZ_MAN8 = $(patsubst %.asciidoc,%.8.gz,$(MAN8_TXT))
|
2014-04-02 08:29:12 +00:00
|
|
|
|
|
|
|
mandir ?= $(prefix)/share/man
|
|
|
|
man8dir = $(mandir)/man8
|
2014-06-11 22:14:55 +00:00
|
|
|
man5dir = $(mandir)/man5
|
2014-04-02 08:29:12 +00:00
|
|
|
|
2015-02-03 14:38:17 +00:00
|
|
|
ASCIIDOC = @ASCIIDOC@
|
2014-04-02 08:29:12 +00:00
|
|
|
ASCIIDOC_EXTRA =
|
|
|
|
MANPAGE_XSL = manpage-normal.xsl
|
2015-02-03 14:38:17 +00:00
|
|
|
XMLTO = @XMLTO@
|
2014-04-02 08:29:12 +00:00
|
|
|
XMLTO_EXTRA =
|
|
|
|
XMLTO_EXTRA = -m manpage-bold-literal.xsl
|
2015-02-03 14:38:17 +00:00
|
|
|
GZIPCMD = @GZIP@
|
2015-02-03 13:56:06 +00:00
|
|
|
INSTALL = @INSTALL@
|
|
|
|
RM = @RM@
|
|
|
|
RMDIR = @RMDIR@
|
|
|
|
LN_S = @LN_S@
|
2015-02-03 14:38:17 +00:00
|
|
|
MV = @MV@
|
|
|
|
SED = @SED@
|
|
|
|
BTRFS_VERSION = $(shell $(SED) -n 's/.*PACKAGE_VERSION "\(.*\)"/\1/p'\
|
2015-02-03 14:04:28 +00:00
|
|
|
../config.h)
|
2014-04-02 08:29:12 +00:00
|
|
|
|
|
|
|
ifneq ($(findstring $(MAKEFLAGS),s),s)
|
|
|
|
ifndef V
|
2014-05-30 16:27:14 +00:00
|
|
|
QUIET_RM = @
|
|
|
|
QUIET_ASCIIDOC = @echo " [ASCII] $@";
|
|
|
|
QUIET_XMLTO = @echo " [XMLTO] $@";
|
|
|
|
QUIET_GZIP = @echo " [GZ] $@";
|
2014-04-02 08:29:12 +00:00
|
|
|
QUIET_STDERR = 2> /dev/null
|
|
|
|
QUIET_SUBDIR0 = +@subdir=
|
|
|
|
QUIET_SUBDIR1 = ;$(NO_SUBDIR) echo ' ' SUBDIR $$subdir; \
|
|
|
|
$(MAKE) $(PRINT_DIR) -C $$subdir
|
|
|
|
export V
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
all: man
|
2014-06-11 22:14:55 +00:00
|
|
|
man: man5 man8
|
|
|
|
man5: $(GZ_MAN5)
|
2014-04-02 08:29:12 +00:00
|
|
|
man8: $(GZ_MAN8)
|
2015-10-07 12:36:34 +00:00
|
|
|
html: $(MAN_HTML)
|
2014-04-02 08:29:12 +00:00
|
|
|
|
|
|
|
install: install-man
|
|
|
|
|
|
|
|
install-man: man
|
2014-06-11 22:14:55 +00:00
|
|
|
$(INSTALL) -d -m 755 $(DESTDIR)$(man5dir)
|
2014-04-02 08:29:12 +00:00
|
|
|
$(INSTALL) -d -m 755 $(DESTDIR)$(man8dir)
|
2014-06-11 22:14:55 +00:00
|
|
|
$(INSTALL) -m 644 $(GZ_MAN5) $(DESTDIR)$(man5dir)
|
2014-06-18 15:17:38 +00:00
|
|
|
# the source file name of btrfs.5 clashes with section 8 page, but we
|
|
|
|
# want to keep the code generic
|
2016-01-11 14:32:38 +00:00
|
|
|
$(MV) $(DESTDIR)$(man5dir)/btrfs-man5.5.gz $(DESTDIR)$(man5dir)/btrfs.5.gz
|
2014-04-02 08:29:12 +00:00
|
|
|
$(INSTALL) -m 644 $(GZ_MAN8) $(DESTDIR)$(man8dir)
|
2015-02-03 13:40:33 +00:00
|
|
|
$(LN_S) -f btrfs-check.8.gz $(DESTDIR)$(man8dir)/btrfsck.8.gz
|
2013-11-13 17:55:12 +00:00
|
|
|
$(LN_S) -f btrfs-rescue.8.gz $(DESTDIR)$(man8dir)/btrfs-zero-log.8.gz
|
2016-03-10 15:51:53 +00:00
|
|
|
$(LN_S) -f btrfs-inspect-internal.8.gz $(DESTDIR)$(man8dir)/btrfs-debug-tree.8.gz
|
2016-03-10 15:51:53 +00:00
|
|
|
$(LN_S) -f btrfs-inspect-internal.8.gz $(DESTDIR)$(man8dir)/btrfs-show-super.8.gz
|
2014-04-02 08:29:12 +00:00
|
|
|
|
2014-07-25 13:41:57 +00:00
|
|
|
uninstall:
|
|
|
|
cd $(DESTDIR)$(man8dir); rm -f btrfs-check.8.gz $(GZ_MAN8)
|
2015-02-03 13:56:06 +00:00
|
|
|
$(RMDIR) -p --ignore-fail-on-non-empty $(DESTDIR)$(man8dir)
|
2014-07-25 13:41:57 +00:00
|
|
|
|
2014-04-02 08:29:12 +00:00
|
|
|
clean:
|
2015-10-07 12:36:34 +00:00
|
|
|
$(QUIET_RM)$(RM) -f *.xml *.xml+ *.5 *.5.gz *.8 *.8.gz *.html
|
2014-06-11 22:14:55 +00:00
|
|
|
|
|
|
|
%.5.gz : %.5
|
|
|
|
$(QUIET_GZIP)$(GZIPCMD) -n -c $< > $@
|
2014-04-02 08:29:12 +00:00
|
|
|
|
|
|
|
%.8.gz : %.8
|
2014-06-03 06:09:25 +00:00
|
|
|
$(QUIET_GZIP)$(GZIPCMD) -n -c $< > $@
|
2014-04-02 08:29:12 +00:00
|
|
|
|
2014-06-11 22:14:55 +00:00
|
|
|
%.5 : %.xml
|
2015-02-03 13:40:33 +00:00
|
|
|
$(QUIET_XMLTO)$(RM) -f $@ && \
|
2014-06-11 22:14:55 +00:00
|
|
|
$(XMLTO) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $<
|
|
|
|
|
2014-06-03 06:09:25 +00:00
|
|
|
%.8 : %.xml
|
2015-02-03 13:40:33 +00:00
|
|
|
$(QUIET_XMLTO)$(RM) -f $@ && \
|
2014-04-02 08:29:12 +00:00
|
|
|
$(XMLTO) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $<
|
2014-06-11 22:14:55 +00:00
|
|
|
|
2015-04-14 15:37:23 +00:00
|
|
|
%.xml : %.asciidoc asciidoc.conf
|
2015-02-03 13:40:33 +00:00
|
|
|
$(QUIET_ASCIIDOC)$(RM) -f $@+ $@ && \
|
2014-04-02 08:29:12 +00:00
|
|
|
$(ASCIIDOC) -b docbook -d manpage -f asciidoc.conf \
|
|
|
|
$(ASCIIDOC_EXTRA) -abtrfs_version=$(BTRFS_VERSION) \
|
btrfs-progs: Documentation: fix broken conversion
Fixes various formatting issues:
Fixes quoting issues in various manpages. Before/After excerpts for
mkfs.btrfs(8), btrfs-qgroup(8):
mkfs.btrfs [-A|--alloc-start '<alloc-start>']
mkfs.btrfs [-A|--alloc-start <alloc-start>]
id 0/<subvolume id>''
id 0/<subvolume id>
If multiple '<attr>'s is given, use comma to separate.
If multiple <attr>s is given, use comma to separate.
The one that is most apparent is the removal of text in
btrfs-subvolume(8) and others. Before/After:
list [options] [-G <value>] [-C <value>] [--sort=rootid,gen,ogen,path] <path>
list [options] [-G [+|-]<value>] [-C [+|-]<value>] [--sort=rootid,gen,ogen,path] <path>
create [-i <qgroupid>] <name>
create [-i <qgroupid>] [<dest>]<name>
This happens because `<foo>` was replaced by `'<foo>'` in the sed
expression, which is then treated as a constrained quote. As a result,
the `[...]` before the string gets interpreted as "quoted text
attributes".
In this patch, the sed expression is dropped and asciidoc is configured
to recognize `<...>` as a unconstrained quoted string (such that
`<attr>s` is correctly emphasized) and to avoid adding quotes in
contexts where it is not needed.
A remaining problem is that some texts (the one between brackets) do not
add the emphasis for `<...>`. While this could be solved by replacing
`[` and `]` with `[` and `]` using sed, it introduces formatting
problems in btrfs-zero-log(8) because the context is ignored.
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
Signed-off-by: David Sterba <dsterba@suse.cz>
2015-01-05 14:10:09 +00:00
|
|
|
-o $@+ $< && \
|
2015-02-03 14:38:17 +00:00
|
|
|
$(MV) $@+ $@
|
2015-10-07 12:36:34 +00:00
|
|
|
|
|
|
|
%.html : %.asciidoc asciidoc.conf
|
|
|
|
$(QUIET_ASCIIDOC)$(RM) -f $@+ $@ && \
|
|
|
|
$(ASCIIDOC) -b html -d article -f asciidoc.conf \
|
|
|
|
$(ASCIIDOC_EXTRA) -abtrfs_version=$(BTRFS_VERSION) \
|
|
|
|
-o $@+ $< && \
|
|
|
|
$(MV) $@+ $@
|