main - man-generator: option description indented
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=e01ce8e2aeeb08d7f08...
Commit: e01ce8e2aeeb08d7f08d99976fa01635d7c3bfa5
Parent: 441b702362ad6a756551f059d4ca8d62713de6ac
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sun Apr 11 19:53:16 2021 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Apr 12 09:54:16 2021 +0200
man-generator: option description indented
Left indention is needed only for options, but is actually
unwanted for decription itself.
---
tools/command.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/command.c b/tools/command.c
index 0f31c5138..a81105b96 100644
--- a/tools/command.c
+++ b/tools/command.c
@@ -3188,10 +3188,10 @@ static void _print_man_all_options_desc(struct command_name *cname)
if (opt_names[opt_enum].desc) {
printf("\n");
printf(".br\n");
+ printf(".ad b\n");
_print_man_option_desc(cname, opt_enum);
- }
-
- printf(".ad b\n");
+ } else
+ printf(".ad b\n");
}
}
3 years
main - man-generator: remove ',' between some options
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=441b702362ad6a75655...
Commit: 441b702362ad6a756551f059d4ca8d62713de6ac
Parent: d86b5836442a357e6c01ee897b5d530e14494f73
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sun Apr 11 14:28:51 2021 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Apr 12 09:54:16 2021 +0200
man-generator: remove ',' between some options
It would be complicated to handle ',' alignment after hyphenation
changes ATM, but these commas seems to be there rather unneeded
so remove them and make the man output more clear.
---
tools/command.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/tools/command.c b/tools/command.c
index 7e0c2584d..0f31c5138 100644
--- a/tools/command.c
+++ b/tools/command.c
@@ -2559,10 +2559,7 @@ static void _print_man_usage(char *lvmname, struct command *cmd)
continue;
if (sep) {
- printf(",\n");
- printf(".ad b\n");
- printf(".br\n");
- printf(".ad l\n");
+ printf("\n.br\n");
printf(" ");
}
@@ -2591,10 +2588,7 @@ static void _print_man_usage(char *lvmname, struct command *cmd)
continue;
if (sep) {
- printf(",\n");
- printf(".ad b\n");
- printf(".br\n");
- printf(".ad l\n");
+ printf("\n.br\n");
printf(" ");
} else
printf(".ad l\n");
3 years
main - man-generator: improve hyphenation for longer option list
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=d86b5836442a357e6c0...
Commit: d86b5836442a357e6c01ee897b5d530e14494f73
Parent: b76283c4b377b3fffd5c20974e4a99e6407d71cb
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sun Apr 11 00:47:00 2021 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Apr 12 09:54:16 2021 +0200
man-generator: improve hyphenation for longer option list
Disable hyphenation around longer option lists (>42 chars)
and use \: to markup places for line splits.
The code ATM is somewhat mixtured so it's not easy to encapsulate
section .nh ... .hy.
ATM global _was_hyphen is used to properly finish sections after
disabled hyphenation.
---
tools/command.c | 47 ++++++++++++++++++++++++++++++++++-------------
1 file changed, 34 insertions(+), 13 deletions(-)
diff --git a/tools/command.c b/tools/command.c
index 38b11b8eb..7e0c2584d 100644
--- a/tools/command.c
+++ b/tools/command.c
@@ -301,6 +301,14 @@ static struct oo_line _oo_lines[MAX_OO_LINES];
static void __add_optional_opt_line(struct cmd_context *cmdtool, struct command *cmd, int argc, char *argv[]);
+static unsigned _was_hyphen = 0;
+static void printf_hyphen(char c)
+{
+ /* When .hy 1 was printed, we do not want to emit empty space */
+ printf("%c%c\n", _was_hyphen ? '\n' : ' ', c);
+ _was_hyphen = 0;
+}
+
/*
* modifies buf, replacing the sep characters with \0
* argv pointers point to positions in buf
@@ -1901,7 +1909,7 @@ void print_usage(struct command *cmd, int longhelp, int desc_first)
}
}
- printf(" )\n");
+ printf_hyphen(')');
}
if (!any_req && cmd->ro_count) {
@@ -2252,6 +2260,8 @@ static void _print_val_man(struct command_name *cname, int opt_enum, int val_enu
char *line_argv[MAX_LINE_ARGC];
int line_argc;
int i;
+
+ _was_hyphen = 0;
int is_relative_opt = (opt_enum == size_ARG) ||
(opt_enum == extents_ARG) ||
(opt_enum == poolmetadatasize_ARG) ||
@@ -2357,15 +2367,20 @@ static void _print_val_man(struct command_name *cname, int opt_enum, int val_enu
if (strchr(str, '|')) {
if (!(line = strdup(str)))
return;
+ if ((_was_hyphen = (strlen(line) > 42)))
+ /* TODO: prevent line to end with already printed space */
+ printf("\n.nh\n");
_split_line(line, &line_argc, line_argv, '|');
for (i = 0; i < line_argc; i++) {
if (i)
- printf("|");
+ printf("|%s", _was_hyphen ? "\\:" : "");
if (strstr(line_argv[i], "Number"))
printf("\\fI%s\\fP", line_argv[i]);
else
printf("\\fB%s\\fP", line_argv[i]);
}
+ if (_was_hyphen)
+ printf("\n.hy");
free(line);
return;
}
@@ -2391,9 +2406,13 @@ static void _print_def_man(struct command_name *cname, int opt_enum, struct arg_
else {
if (sep) printf("|");
- if (!usage || !val_names[val_enum].usage)
+ if (!usage || !val_names[val_enum].usage) {
+ if (_was_hyphen) {
+ printf("\n");
+ _was_hyphen = 0;
+ }
printf("\\fI%s\\fP", val_names[val_enum].name);
- else
+ } else
_print_val_man(cname, opt_enum, val_enum);
sep = 1;
@@ -2470,6 +2489,7 @@ static void _print_man_usage(char *lvmname, struct command *cmd)
int need_ro_indent_end = 0;
int include_extents = 0;
+ _was_hyphen = 0;
if (!(cname = _find_command_name(cmd->name)))
return;
@@ -2590,7 +2610,7 @@ static void _print_man_usage(char *lvmname, struct command *cmd)
sep++;
}
- printf(" )\n");
+ printf_hyphen(')');
printf(".RE\n");
}
@@ -2689,7 +2709,8 @@ static void _print_man_usage(char *lvmname, struct command *cmd)
printf(".ad l\n");
printf("[ \\fB-l\\fP|\\fB--extents\\fP ");
_print_val_man(cname, extents_ARG, opt_names[extents_ARG].val_enum);
- printf(" ]\n");
+
+ printf_hyphen(']');
printf(".ad b\n");
sep = 1;
}
@@ -2720,7 +2741,7 @@ static void _print_man_usage(char *lvmname, struct command *cmd)
printf(" ");
_print_def_man(cname, opt_enum, &cmd->optional_opt_args[oo].def, 1);
}
- printf(" ]\n");
+ printf_hyphen(']');
printf(".ad b\n");
sep = 1;
}
@@ -2752,7 +2773,7 @@ static void _print_man_usage(char *lvmname, struct command *cmd)
printf(" ");
_print_def_man(cname, opt_enum, &cmd->optional_opt_args[oo].def, 1);
}
- printf(" ]\n");
+ printf_hyphen(']');
printf(".ad b\n");
sep = 1;
}
@@ -2783,7 +2804,7 @@ static void _print_man_usage(char *lvmname, struct command *cmd)
}
}
- printf(" ]\n");
+ printf_hyphen(']');
printf(".RE\n");
}
@@ -2845,7 +2866,7 @@ static void _print_man_usage_common_lvm(struct command *cmd)
printf(" ");
_print_def_man(cname, opt_enum, &cmd->optional_opt_args[oo].def, 1);
}
- printf(" ]\n");
+ printf_hyphen(']');
printf(".ad b\n");
sep = 1;
break;
@@ -2880,7 +2901,7 @@ static void _print_man_usage_common_lvm(struct command *cmd)
printf(" ");
_print_def_man(cname, opt_enum, &cmd->optional_opt_args[oo].def, 1);
}
- printf(" ]\n");
+ printf_hyphen(']');
printf(".ad b\n");
sep = 1;
break;
@@ -2942,7 +2963,7 @@ static void _print_man_usage_common_cmd(struct command *cmd)
printf(" ");
_print_def_man(cname, opt_enum, &cmd->optional_opt_args[oo].def, 1);
}
- printf(" ]\n");
+ printf_hyphen(']');
printf(".ad b\n");
sep = 1;
break;
@@ -2984,7 +3005,7 @@ static void _print_man_usage_common_cmd(struct command *cmd)
printf(" ");
_print_def_man(cname, opt_enum, &cmd->optional_opt_args[oo].def, 1);
}
- printf(" ]\n");
+ printf_hyphen(']');
printf(".ad b\n");
sep = 1;
break;
3 years
main - man: use commas in SEE ALSO
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=b76283c4b377b3fffd5...
Commit: b76283c4b377b3fffd5c20974e4a99e6407d71cb
Parent: f5efe1beb53dde57bd83c4b50e001b3feceaa983
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sun Apr 11 21:11:02 2021 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Apr 12 09:54:16 2021 +0200
man: use commas in SEE ALSO
Add ',' between each ref.
Use left alignment and no hyphenation.
---
man/lvm.8_main | 117 +++++++++++++++++++++++++------------------------
man/lvmreport.7_main | 6 +--
man/see_also.end | 121 ++++++++++++++++++++++++++-------------------------
3 files changed, 123 insertions(+), 121 deletions(-)
diff --git a/man/lvm.8_main b/man/lvm.8_main
index 1e03b8cb9..b221761e3 100644
--- a/man/lvm.8_main
+++ b/man/lvm.8_main
@@ -497,70 +497,71 @@ Prepends source file name and code line number with libdm debugging.
.SH SEE ALSO
.
.nh
-.BR lvm (8)
-.BR lvm.conf (5)
-.BR lvmconfig (8)
+.ad l
+.BR lvm (8),
+.BR lvm.conf (5),
+.BR lvmconfig (8),
-.BR pvchange (8)
-.BR pvck (8)
-.BR pvcreate (8)
-.BR pvdisplay (8)
-.BR pvmove (8)
-.BR pvremove (8)
-.BR pvresize (8)
-.BR pvs (8)
-.BR pvscan (8)
+.BR pvchange (8),
+.BR pvck (8),
+.BR pvcreate (8),
+.BR pvdisplay (8),
+.BR pvmove (8),
+.BR pvremove (8),
+.BR pvresize (8),
+.BR pvs (8),
+.BR pvscan (8),
-.BR vgcfgbackup (8)
-.BR vgcfgrestore (8)
-.BR vgchange (8)
-.BR vgck (8)
-.BR vgcreate (8)
-.BR vgconvert (8)
-.BR vgdisplay (8)
-.BR vgexport (8)
-.BR vgextend (8)
-.BR vgimport (8)
-.BR vgimportclone (8)
-.BR vgmerge (8)
-.BR vgmknodes (8)
-.BR vgreduce (8)
-.BR vgremove (8)
-.BR vgrename (8)
-.BR vgs (8)
-.BR vgscan (8)
-.BR vgsplit (8)
+.BR vgcfgbackup (8),
+.BR vgcfgrestore (8),
+.BR vgchange (8),
+.BR vgck (8),
+.BR vgcreate (8),
+.BR vgconvert (8),
+.BR vgdisplay (8),
+.BR vgexport (8),
+.BR vgextend (8),
+.BR vgimport (8),
+.BR vgimportclone (8),
+.BR vgmerge (8),
+.BR vgmknodes (8),
+.BR vgreduce (8),
+.BR vgremove (8),
+.BR vgrename (8),
+.BR vgs (8),
+.BR vgscan (8),
+.BR vgsplit (8),
-.BR lvcreate (8)
-.BR lvchange (8)
-.BR lvconvert (8)
-.BR lvdisplay (8)
-.BR lvextend (8)
-.BR lvreduce (8)
-.BR lvremove (8)
-.BR lvrename (8)
-.BR lvresize (8)
-.BR lvs (8)
-.BR lvscan (8)
+.BR lvcreate (8),
+.BR lvchange (8),
+.BR lvconvert (8),
+.BR lvdisplay (8),
+.BR lvextend (8),
+.BR lvreduce (8),
+.BR lvremove (8),
+.BR lvrename (8),
+.BR lvresize (8),
+.BR lvs (8),
+.BR lvscan (8),
-.BR lvm-fullreport (8)
-.BR lvm-lvpoll (8)
-.BR lvm2-activation-generator (8)
-.BR blkdeactivate (8)
-.BR lvmdump (8)
+.BR lvm-fullreport (8),
+.BR lvm-lvpoll (8),
+.BR lvm2-activation-generator (8),
+.BR blkdeactivate (8),
+.BR lvmdump (8),
-.BR dmeventd (8)
-.BR lvmpolld (8)
-.BR lvmlockd (8)
-.BR lvmlockctl (8)
-.BR cmirrord (8)
-.BR lvmdbusd (8)
+.BR dmeventd (8),
+.BR lvmpolld (8),
+.BR lvmlockd (8),
+.BR lvmlockctl (8),
+.BR cmirrord (8),
+.BR lvmdbusd (8),
-.BR lvmsystemid (7)
-.BR lvmreport (7)
-.BR lvmraid (7)
-.BR lvmthin (7)
-.BR lvmcache (7)
+.BR lvmsystemid (7),
+.BR lvmreport (7),
+.BR lvmraid (7),
+.BR lvmthin (7),
+.BR lvmcache (7),
.BR dmsetup (8),
.BR dmstats (8),
diff --git a/man/lvmreport.7_main b/man/lvmreport.7_main
index aca1b4940..d6943b9df 100644
--- a/man/lvmreport.7_main
+++ b/man/lvmreport.7_main
@@ -1805,6 +1805,6 @@ lvm> abc
.fi
.SH SEE ALSO
-\fBlvm\fP (8),
-\fBlvmconfig\fP (8),
-\fBlvm fullreport\fP (8)
+.BR lvm (8),
+.BR lvmconfig (8),
+.BR "lvm fullreport" (8)
diff --git a/man/see_also.end b/man/see_also.end
index 4dc9b0ec0..dbe4bc1c1 100644
--- a/man/see_also.end
+++ b/man/see_also.end
@@ -1,68 +1,69 @@
.SH SEE ALSO
+.nh
+.ad l
+.BR lvm (8),
+.BR lvm.conf (5),
+.BR lvmconfig (8),
+.BR lvmdevices (8),
-.BR lvm (8)
-.BR lvm.conf (5)
-.BR lvmconfig (8)
-.BR lvmdevices (8)
+.BR pvchange (8),
+.BR pvck (8),
+.BR pvcreate (8),
+.BR pvdisplay (8),
+.BR pvmove (8),
+.BR pvremove (8),
+.BR pvresize (8),
+.BR pvs (8),
+.BR pvscan (8),
-.BR pvchange (8)
-.BR pvck (8)
-.BR pvcreate (8)
-.BR pvdisplay (8)
-.BR pvmove (8)
-.BR pvremove (8)
-.BR pvresize (8)
-.BR pvs (8)
-.BR pvscan (8)
+.BR vgcfgbackup (8),
+.BR vgcfgrestore (8),
+.BR vgchange (8),
+.BR vgck (8),
+.BR vgcreate (8),
+.BR vgconvert (8),
+.BR vgdisplay (8),
+.BR vgexport (8),
+.BR vgextend (8),
+.BR vgimport (8),
+.BR vgimportclone (8),
+.BR vgimportdevices (8),
+.BR vgmerge (8),
+.BR vgmknodes (8),
+.BR vgreduce (8),
+.BR vgremove (8),
+.BR vgrename (8),
+.BR vgs (8),
+.BR vgscan (8),
+.BR vgsplit (8),
-.BR vgcfgbackup (8)
-.BR vgcfgrestore (8)
-.BR vgchange (8)
-.BR vgck (8)
-.BR vgcreate (8)
-.BR vgconvert (8)
-.BR vgdisplay (8)
-.BR vgexport (8)
-.BR vgextend (8)
-.BR vgimport (8)
-.BR vgimportclone (8)
-.BR vgimportdevices (8)
-.BR vgmerge (8)
-.BR vgmknodes (8)
-.BR vgreduce (8)
-.BR vgremove (8)
-.BR vgrename (8)
-.BR vgs (8)
-.BR vgscan (8)
-.BR vgsplit (8)
+.BR lvcreate (8),
+.BR lvchange (8),
+.BR lvconvert (8),
+.BR lvdisplay (8),
+.BR lvextend (8),
+.BR lvreduce (8),
+.BR lvremove (8),
+.BR lvrename (8),
+.BR lvresize (8),
+.BR lvs (8),
+.BR lvscan (8),
-.BR lvcreate (8)
-.BR lvchange (8)
-.BR lvconvert (8)
-.BR lvdisplay (8)
-.BR lvextend (8)
-.BR lvreduce (8)
-.BR lvremove (8)
-.BR lvrename (8)
-.BR lvresize (8)
-.BR lvs (8)
-.BR lvscan (8)
+.BR lvm-fullreport (8),
+.BR lvm-lvpoll (8),
+.BR lvm2-activation-generator (8),
+.BR blkdeactivate (8),
+.BR lvmdump (8),
-.BR lvm-fullreport (8)
-.BR lvm-lvpoll (8)
-.BR lvm2-activation-generator (8)
-.BR blkdeactivate (8)
-.BR lvmdump (8)
+.BR dmeventd (8),
+.BR lvmpolld (8),
+.BR lvmlockd (8),
+.BR lvmlockctl (8),
+.BR cmirrord (8),
+.BR lvmdbusd (8),
-.BR dmeventd (8)
-.BR lvmpolld (8)
-.BR lvmlockd (8)
-.BR lvmlockctl (8)
-.BR cmirrord (8)
-.BR lvmdbusd (8)
-
-.BR lvmsystemid (7)
-.BR lvmreport (7)
-.BR lvmraid (7)
-.BR lvmthin (7)
+.BR lvmsystemid (7),
+.BR lvmreport (7),
+.BR lvmraid (7),
+.BR lvmthin (7),
.BR lvmcache (7)
3 years
main - makefiles: no need for double Q
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=f5efe1beb53dde57bd8...
Commit: f5efe1beb53dde57bd83c4b50e001b3feceaa983
Parent: 2e84dd47d44a3a65a984e3af724684d4982785a3
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sun Apr 11 22:29:04 2021 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Apr 12 09:54:16 2021 +0200
makefiles: no need for double Q
We already use $(Q) while calling macros
---
man/Makefile.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/man/Makefile.in b/man/Makefile.in
index 786671e3a..01097c886 100644
--- a/man/Makefile.in
+++ b/man/Makefile.in
@@ -133,7 +133,7 @@ SEE_ALSO=$(srcdir)/see_also.end
) > $@
define SUBSTVARS
-$(Q)$(SED) -e "s+#VERSION#+$(LVM_VERSION)+" \
+$(SED) -e "s+#VERSION#+$(LVM_VERSION)+" \
-e "s+#DEFAULT_SYS_DIR#+$(DEFAULT_SYS_DIR)+" \
-e "s+#DEFAULT_ARCHIVE_DIR#+$(DEFAULT_ARCHIVE_DIR)+" \
-e "s+#DEFAULT_BACKUP_DIR#+$(DEFAULT_BACKUP_DIR)+" \
@@ -157,7 +157,7 @@ endef
# - in "$vg-$lv"
# - in single one in '\\f.-'
define ESCAPEHYPHENS
-$(Q)$(SED) -i -e "s+\([ [:alpha:]]\)-\{7\}+\1\\\-\\\-\\\-\\\-\\\-\\\-\\\-+g" \
+$(SED) -i -e "s+\([ [:alpha:]]\)-\{7\}+\1\\\-\\\-\\\-\\\-\\\-\\\-\\\-+g" \
-e "s+\([ [:alpha:]]\)-\{6\}+\1\\\-\\\-\\\-\\\-\\\-\\\-+g" \
-e "s+\([ [:alpha:]]\)-\{5\}+\1\\\-\\\-\\\-\\\-\\\-+g" \
-e "s+\([ [:alpha:]]\)-\{4\}+\1\\\-\\\-\\\-\\\-+g" \
3 years
main - makefiles: reuse CSCOPE_DIRS for ctags
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=2e84dd47d44a3a65a98...
Commit: 2e84dd47d44a3a65a984e3af724684d4982785a3
Parent: ebf33323b93870f811c5a701826cfab1f4d41489
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Apr 9 15:27:12 2021 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Apr 12 09:54:16 2021 +0200
makefiles: reuse CSCOPE_DIRS for ctags
Create ctags only from real source files.
---
Makefile.in | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index 4dceaba1d..3b7e0ecaa 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -76,8 +76,8 @@ daemons.cflow: tools.cflow
cflow: include.cflow
endif
+CSCOPE_DIRS = base daemons device_mapper include lib libdaemon scripts tools libdm test
ifneq ("@CSCOPE_CMD@", "")
-CSCOPE_DIRS = base daemons device_mapper include lib libdaemon scripts tools
cscope.out:
@CSCOPE_CMD@ -b -R $(patsubst %,-s%,$(addprefix $(srcdir)/,$(CSCOPE_DIRS)))
all: cscope.out
@@ -204,8 +204,8 @@ endif
ifneq ($(shell which ctags 2>/dev/null),)
.PHONY: tags
tags:
- test -z "$(shell find $(top_srcdir) -type f -name '*.[ch]' -newer tags 2>/dev/null | head -1)" || $(RM) tags
- test -f tags || find $(top_srcdir) -maxdepth 5 -type f -name '*.[ch]' -exec ctags -a '{}' +
+ test -z "$(shell find $(addprefix $(top_srcdir)/,$(CSCOPE_DIRS)) -type f -name '*.[ch]' -newer tags 2>/dev/null | head -1)" || $(RM) tags
+ test -f tags || find $(addprefix $(top_srcdir)/,$(CSCOPE_DIRS)) -maxdepth 5 -type f -name '*.[ch]' -exec ctags -a '{}' +
CLEAN_TARGETS += tags
endif
3 years
main - makefiles: deps also for cxx
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=ebf33323b93870f811c...
Commit: ebf33323b93870f811c5a701826cfab1f4d41489
Parent: 75424dd6927ac38c97ca4acc78b7f4933cd7b139
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sat Apr 10 01:21:33 2021 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Apr 12 09:54:16 2021 +0200
makefiles: deps also for cxx
Generate deps also for .cxx.
Remove include dir deps - there is nothing to build.
---
Makefile.in | 5 -----
libdm/make.tmpl.in | 2 +-
make.tmpl.in | 2 +-
3 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index 5dd642f63..4dceaba1d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -47,8 +47,6 @@ include $(top_srcdir)/base/Makefile
include $(top_srcdir)/device_mapper/Makefile
include $(top_srcdir)/test/unit/Makefile
-libdm: include
-libdaemon: include
lib: libdaemon $(BASE_TARGET) $(DEVICE_MAPPER_TARGET)
daemons: lib libdaemon tools
scripts: lib
@@ -59,11 +57,8 @@ all_man: tools
test: tools daemons
unit-test run-unit-test: test
-lib.device-mapper: include.device-mapper
-libdm.device-mapper: include.device-mapper
daemons.device-mapper: libdm.device-mapper
tools.device-mapper: libdm.device-mapper
-scripts.device-mapper: include.device-mapper
device-mapper: tools.device-mapper daemons.device-mapper man.device-mapper
device_mapper: device-mapper
diff --git a/libdm/make.tmpl.in b/libdm/make.tmpl.in
index f7a5a7a73..a306101d5 100644
--- a/libdm/make.tmpl.in
+++ b/libdm/make.tmpl.in
@@ -403,7 +403,7 @@ DEFS+=-D_FILE_OFFSET_BITS=64
%.o: %.cpp $(DEPS)
@echo " [CXX] $(<F)"
@mkdir -p $(@D)
- $(Q) $(CXX) -c $(INCLUDES) $(VALGRIND_CFLAGS) $(DEFS) $(DEFS_$@) $(WFLAGS) $(CXXFLAGS) $(CXXFLAGS_$@) $< -o $@
+ $(Q) $(CXX) $(DEPFLAGS) -c $(INCLUDES) $(VALGRIND_CFLAGS) $(DEFS) $(DEFS_$@) $(WFLAGS) $(CXXFLAGS) $(CXXFLAGS_$@) $< -o $@
%.pot: %.c $(DEPS)
@echo " [CC] $@"
diff --git a/make.tmpl.in b/make.tmpl.in
index 73bf298c7..6145b0bd5 100644
--- a/make.tmpl.in
+++ b/make.tmpl.in
@@ -454,7 +454,7 @@ DEFS+=-D_FILE_OFFSET_BITS=64
%.o: %.cpp $(DEPS)
@echo " [CXX] $(<F)"
@mkdir -p $(@D)
- $(Q) $(CXX) -c $(INCLUDES) $(VALGRIND_CFLAGS) $(DEFS) $(DEFS_$@) $(WFLAGS) $(CXXFLAGS) $(CXXFLAGS_$@) $< -o $@
+ $(Q) $(CXX) $(DEPFLAGS) -c $(INCLUDES) $(VALGRIND_CFLAGS) $(DEFS) $(DEFS_$@) $(WFLAGS) $(CXXFLAGS) $(CXXFLAGS_$@) $< -o $@
%.pot: %.c $(DEPS)
@echo " [CC] $(<F)"
3 years
main - libdm: replace deprecated security_context_t
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=75424dd6927ac38c97c...
Commit: 75424dd6927ac38c97ca4acc78b7f4933cd7b139
Parent: 57b5bc9c87ba090e198c9e5ec679ad81db88a093
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sat Apr 10 21:55:19 2021 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Apr 12 09:54:16 2021 +0200
libdm: replace deprecated security_context_t
Use 'char *' instead of deprecated security_context_t.
In more details i.e.:
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1776
---
device_mapper/libdm-common.c | 6 +++---
libdm/libdm-common.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/device_mapper/libdm-common.c b/device_mapper/libdm-common.c
index c0dde2071..6a2573ec4 100644
--- a/device_mapper/libdm-common.c
+++ b/device_mapper/libdm-common.c
@@ -931,7 +931,7 @@ int dm_task_add_target(struct dm_task *dmt, uint64_t start, uint64_t size,
#ifdef HAVE_SELINUX
static int _selabel_lookup(const char *path, mode_t mode,
- security_context_t *scontext)
+ char **scontext)
{
#ifdef HAVE_SELINUX_LABEL_H
if (!_selabel_handle &&
@@ -974,7 +974,7 @@ static int _is_selinux_enabled(void)
int dm_prepare_selinux_context(const char *path, mode_t mode)
{
#ifdef HAVE_SELINUX
- security_context_t scontext = NULL;
+ char *scontext = NULL;
if (_is_selinux_enabled() <= 0)
return 1;
@@ -1002,7 +1002,7 @@ int dm_prepare_selinux_context(const char *path, mode_t mode)
int dm_set_selinux_context(const char *path, mode_t mode)
{
#ifdef HAVE_SELINUX
- security_context_t scontext = NULL;
+ char *scontext = NULL;
if (_is_selinux_enabled() <= 0)
return 1;
diff --git a/libdm/libdm-common.c b/libdm/libdm-common.c
index 1f3fe1642..708414676 100644
--- a/libdm/libdm-common.c
+++ b/libdm/libdm-common.c
@@ -929,7 +929,7 @@ int dm_task_add_target(struct dm_task *dmt, uint64_t start, uint64_t size,
#ifdef HAVE_SELINUX
static int _selabel_lookup(const char *path, mode_t mode,
- security_context_t *scontext)
+ char **scontext)
{
#ifdef HAVE_SELINUX_LABEL_H
if (!_selabel_handle &&
@@ -972,7 +972,7 @@ static int _is_selinux_enabled(void)
int dm_prepare_selinux_context(const char *path, mode_t mode)
{
#ifdef HAVE_SELINUX
- security_context_t scontext = NULL;
+ char *scontext = NULL;
if (_is_selinux_enabled() <= 0)
return 1;
@@ -1000,7 +1000,7 @@ int dm_prepare_selinux_context(const char *path, mode_t mode)
int dm_set_selinux_context(const char *path, mode_t mode)
{
#ifdef HAVE_SELINUX
- security_context_t scontext = NULL;
+ char *scontext = NULL;
if (_is_selinux_enabled() <= 0)
return 1;
3 years
main - configure: make aio optional
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=57b5bc9c87ba090e198...
Commit: 57b5bc9c87ba090e198c9e5ec679ad81db88a093
Parent: 744afec6c06d83049ed9fa3c700db2ccffeb146e
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sat Apr 10 22:09:32 2021 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Apr 12 09:54:15 2021 +0200
configure: make aio optional
Add support for external AIO_CFLAGS and AIO_LIBS so user
can point to his own build - this might be useful when
user wants to use own libaio library.
---
configure | 34 ++++++++++++++++++++++++++++++++--
configure.ac | 15 ++++++++++++---
make.tmpl.in | 2 ++
3 files changed, 46 insertions(+), 5 deletions(-)
diff --git a/configure b/configure
index 154862bcc..95c1d2758 100755
--- a/configure
+++ b/configure
@@ -795,6 +795,8 @@ PKGCONFIGINIT_CFLAGS
PKG_CONFIG_LIBDIR
PKG_CONFIG_PATH
PKG_CONFIG
+AIO_LIBS
+AIO_CFLAGS
VDO_FORMAT_CMD
CACHE_RESTORE_CMD
CACHE_REPAIR_CMD
@@ -998,6 +1000,8 @@ CXX
CXXFLAGS
CCC
CPP
+AIO_CFLAGS
+AIO_LIBS
PKG_CONFIG
PKG_CONFIG_PATH
PKG_CONFIG_LIBDIR
@@ -1797,6 +1801,8 @@ Some influential environment variables:
CXX C++ compiler command
CXXFLAGS C++ compiler flags
CPP C preprocessor
+ AIO_CFLAGS C compiler flags for AIO
+ AIO_LIBS linker flags for AIO
PKG_CONFIG path to pkg-config utility
PKG_CONFIG_PATH
directories to add to pkg-config's search path
@@ -6088,7 +6094,7 @@ fi
for ac_header in assert.h ctype.h dirent.h errno.h fcntl.h float.h \
- getopt.h inttypes.h langinfo.h libaio.h libgen.h limits.h locale.h paths.h \
+ getopt.h inttypes.h langinfo.h libgen.h limits.h locale.h paths.h \
signal.h stdarg.h stddef.h stdio.h stdlib.h string.h sys/file.h \
sys/ioctl.h syslog.h sys/mman.h sys/param.h sys/resource.h sys/stat.h \
sys/time.h sys/types.h sys/utsname.h sys/wait.h time.h \
@@ -6121,6 +6127,19 @@ fi
done
+for ac_header in libaio.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "libaio.h" "ac_cv_header_libaio_h" "$ac_includes_default"
+if test "x$ac_cv_header_libaio_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBAIO_H 1
+_ACEOF
+ LVM_NEEDS_LIBAIO_WARN=
+else
+ LVM_NEEDS_LIBAIO_WARN=y
+fi
+
+done
case "$host_os" in
linux*)
@@ -9813,6 +9832,14 @@ $as_echo "#define INTEGRITY_INTERNAL 1" >>confdefs.h
*) as_fn_error $? "--with-integrity parameter invalid" "$LINENO" 5 ;;
esac
+################################################################################
+# Allow users to override default location for libaio
+# there seems to be no pkg-config support available
+AIO_CFLAGS=
+AIO_LIBS=${AIO_LIBS:--laio}
+
+
+
################################################################################
# Check whether --enable-readline was given.
if test "${enable_readline+set}" = set; then :
@@ -10759,7 +10786,6 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
-
################################################################################
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable valgrind awareness of pools" >&5
$as_echo_n "checking whether to enable valgrind awareness of pools... " >&6; }
@@ -15524,6 +15550,10 @@ if test -n "$VDO_CONFIGURE_WARN"; then :
$as_echo "$as_me: WARNING: Unrecognized 'vdoformat' tool is REQUIRED for VDO logical volume creation!" >&2;}
fi
+if test -n "$LVM_NEEDS_LIBAIO_WARN"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Only libdm part can be build without libaio: make [install_]device-mapper" >&5
+$as_echo "$as_me: WARNING: Only libdm part can be build without libaio: make [install_]device-mapper" >&2;}
+fi
if test "$ODIRECT" != yes; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: O_DIRECT disabled: low-memory pvmove may lock up" >&5
diff --git a/configure.ac b/configure.ac
index 60b9c1043..33a691e01 100644
--- a/configure.ac
+++ b/configure.ac
@@ -101,14 +101,14 @@ AC_HEADER_SYS_WAIT
AC_HEADER_TIME
AC_CHECK_HEADERS([assert.h ctype.h dirent.h errno.h fcntl.h float.h \
- getopt.h inttypes.h langinfo.h libaio.h libgen.h limits.h locale.h paths.h \
+ getopt.h inttypes.h langinfo.h libgen.h limits.h locale.h paths.h \
signal.h stdarg.h stddef.h stdio.h stdlib.h string.h sys/file.h \
sys/ioctl.h syslog.h sys/mman.h sys/param.h sys/resource.h sys/stat.h \
sys/time.h sys/types.h sys/utsname.h sys/wait.h time.h \
unistd.h], , [AC_MSG_ERROR(bailing out)])
AC_CHECK_HEADERS(termios.h sys/statvfs.h sys/timerfd.h sys/vfs.h linux/magic.h linux/fiemap.h)
-
+AC_CHECK_HEADERS(libaio.h,LVM_NEEDS_LIBAIO_WARN=,LVM_NEEDS_LIBAIO_WARN=y)
case "$host_os" in
linux*)
AC_CHECK_HEADERS(asm/byteorder.h linux/fs.h malloc.h,,AC_MSG_ERROR(bailing out)) ;;
@@ -684,6 +684,14 @@ case "$INTEGRITY" in
*) AC_MSG_ERROR([--with-integrity parameter invalid]) ;;
esac
+################################################################################
+# Allow users to override default location for libaio
+# there seems to be no pkg-config support available
+AIO_CFLAGS=
+AIO_LIBS=${AIO_LIBS:--laio}
+AC_ARG_VAR([AIO_CFLAGS], [C compiler flags for AIO])
+AC_ARG_VAR([AIO_LIBS], [linker flags for AIO])
+
################################################################################
dnl -- Disable readline
AC_ARG_ENABLE([readline],
@@ -881,7 +889,6 @@ TESTSUITE_DATA='${datarootdir}/lvm2-testsuite'
# double eval needed ${datarootdir} -> ${prefix}/share -> real path
AC_DEFINE_UNQUOTED(TESTSUITE_DATA, ["$(eval echo $(eval echo $TESTSUITE_DATA))"], [Path to testsuite data])
-
################################################################################
dnl -- Enable valgrind awareness of memory pools
AC_MSG_CHECKING(whether to enable valgrind awareness of pools)
@@ -1977,6 +1984,8 @@ AS_IF([test -n "$CACHE_CHECK_VERSION_WARN"],
AS_IF([test -n "$VDO_CONFIGURE_WARN"],
[AC_MSG_WARN([Unrecognized 'vdoformat' tool is REQUIRED for VDO logical volume creation!])])
+AS_IF([test -n "$LVM_NEEDS_LIBAIO_WARN"],
+ [AC_MSG_WARN([Only libdm part can be build without libaio: make [[install_]]device-mapper])])
AS_IF([test "$ODIRECT" != yes],
[AC_MSG_WARN([O_DIRECT disabled: low-memory pvmove may lock up])])
diff --git a/make.tmpl.in b/make.tmpl.in
index 14557c4c4..73bf298c7 100644
--- a/make.tmpl.in
+++ b/make.tmpl.in
@@ -76,6 +76,8 @@ LIB_SUFFIX = @LIB_SUFFIX@
DL_LIBS = @DL_LIBS@
RT_LIBS = @RT_LIBS@
M_LIBS = @M_LIBS@
+AIO_LIBS = @AIO_LIBS@
+AIO_CFLAGS = @AIO_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
READLINE_LIBS = @READLINE_LIBS@
EDITLINE_LIBS = @EDITLINE_LIBS@
3 years
main - configure: better support for use of --without
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=744afec6c06d83049ed...
Commit: 744afec6c06d83049ed9fa3c700db2ccffeb146e
Parent: aee0cd6530c6340f6f0a8256b887c8561f29dde6
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Apr 8 21:29:44 2021 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Apr 12 09:54:15 2021 +0200
configure: better support for use of --without
When --with-... option is used as --without-... it gets
assigned value 'no' - so support it better where we can.
Also remove 'shared' from help as it's not supported.
---
configure | 33 +++++++++++++++++----------------
configure.ac | 38 ++++++++++++++++++++------------------
2 files changed, 37 insertions(+), 34 deletions(-)
diff --git a/configure b/configure
index 9fe0c8ddf..154862bcc 100755
--- a/configure
+++ b/configure
@@ -1713,22 +1713,21 @@ Optional Packages:
create nodes on resume or create [ON=resume]
--with-default-name-mangling=MANGLING
default name mangling: auto/none/hex [auto]
- --with-snapshots=TYPE snapshot support: internal/shared/none [internal]
- --with-mirrors=TYPE mirror support: internal/shared/none [internal]
+ --with-snapshots=TYPE snapshot support: internal/none [internal]
+ --with-mirrors=TYPE mirror support: internal/none [internal]
--with-default-mirror-segtype=TYPE
default mirror segtype: raid1/mirror [raid1]
--with-default-raid10-segtype=TYPE
default mirror segtype: raid10/mirror [raid10]
--with-default-sparse-segtype=TYPE
default sparse segtype: thin/snapshot [thin]
- --with-thin=TYPE thin provisioning support: internal/shared/none
- [internal]
+ --with-thin=TYPE thin provisioning support: internal/none [internal]
--with-thin-check=PATH thin_check tool: [autodetect]
--with-thin-dump=PATH thin_dump tool: [autodetect]
--with-thin-repair=PATH thin_repair tool: [autodetect]
--with-thin-restore=PATH
thin_restore tool: [autodetect]
- --with-cache=TYPE cache support: internal/shared/none [internal]
+ --with-cache=TYPE cache support: internal/none [internal]
--with-cache-check=PATH cache_check tool: [autodetect]
--with-cache-dump=PATH cache_dump tool: [autodetect]
--with-cache-repair=PATH
@@ -8385,7 +8384,7 @@ fi
case "$MANGLING" in
auto) mangling=DM_STRING_MANGLING_AUTO;;
- none|disabled) mangling=DM_STRING_MANGLING_NONE;;
+ no|none|disabled) mangling=DM_STRING_MANGLING_NONE;;
hex) mangling=DM_STRING_MANGLING_HEX;;
*) as_fn_error $? "--with-default-name-mangling parameter invalid" "$LINENO" 5;;
esac
@@ -8412,7 +8411,7 @@ fi
$as_echo "$SNAPSHOTS" >&6; }
case "$SNAPSHOTS" in
- none|shared) ;;
+ no|none|shared) ;;
internal)
$as_echo "#define SNAPSHOT_INTERNAL 1" >>confdefs.h
;;
@@ -8434,7 +8433,7 @@ fi
$as_echo "$MIRRORS" >&6; }
case "$MIRRORS" in
- none|shared) ;;
+ no|none|shared) ;;
internal)
$as_echo "#define MIRRORED_INTERNAL 1" >>confdefs.h
;;
@@ -8479,7 +8478,10 @@ _ACEOF
# Check whether --with-default-sparse-segtype was given.
if test "${with_default_sparse_segtype+set}" = set; then :
- withval=$with_default_sparse_segtype; DEFAULT_SPARSE_SEGTYPE=$withval
+ withval=$with_default_sparse_segtype; case "$withval" in
+ thin|snapshot) DEFAULT_SPARSE_SEGTYPE=$withval ;;
+ *) as_fn_error $? "--with-default-sparse-segtype parameter invalid" "$LINENO" 5 ;;
+ esac
else
DEFAULT_SPARSE_SEGTYPE="thin"
fi
@@ -8533,7 +8535,7 @@ fi
$as_echo "$THIN" >&6; }
case "$THIN" in
- none) test "$DEFAULT_SPARSE_SEGTYPE" = "thin" && DEFAULT_SPARSE_SEGTYPE="snapshot" ;;
+ no|none) test "$DEFAULT_SPARSE_SEGTYPE" = "thin" && DEFAULT_SPARSE_SEGTYPE="snapshot" ;;
shared) ;;
internal)
$as_echo "#define THIN_INTERNAL 1" >>confdefs.h
@@ -9014,7 +9016,6 @@ $as_echo "$THIN_CHECK_NEEDS_CHECK" >&6; }
$as_echo "#define THIN_CHECK_NEEDS_CHECK 1" >>confdefs.h
fi
-
;;
esac
@@ -9089,7 +9090,7 @@ fi
$as_echo "$CACHE" >&6; }
case "$CACHE" in
- none|shared) ;;
+ no|none|shared) ;;
internal)
$as_echo "#define CACHE_INTERNAL 1" >>confdefs.h
;;
@@ -9626,7 +9627,7 @@ else
fi
case "$VDO" in
- none) ;;
+ no|none) ;;
internal)
$as_echo "#define VDO_INTERNAL 1" >>confdefs.h
@@ -9778,7 +9779,7 @@ fi
$as_echo "$WRITECACHE" >&6; }
case "$WRITECACHE" in
- none) ;;
+ no|none) ;;
internal)
$as_echo "#define WRITECACHE_INTERNAL 1" >>confdefs.h
@@ -9803,7 +9804,7 @@ fi
$as_echo "$INTEGRITY" >&6; }
case "$INTEGRITY" in
- none) ;;
+ no|none) ;;
internal)
$as_echo "#define INTEGRITY_INTERNAL 1" >>confdefs.h
@@ -10401,7 +10402,7 @@ $as_echo_n "checking whether to use symbol versioning... " >&6; }
if test "${with_symvers+set}" = set; then :
withval=$with_symvers; case "$withval" in
gnu|no) symvers=$withval ;;
- *) as_fn_error $? "Unknown argument to with-symvers" "$LINENO" 5 ;;
+ *) as_fn_error $? "--with-symvers parameter invalid" "$LINENO" 5 ;;
esac
else
symvers=gnu
diff --git a/configure.ac b/configure.ac
index 21a1d311e..60b9c1043 100644
--- a/configure.ac
+++ b/configure.ac
@@ -289,7 +289,7 @@ AC_ARG_WITH(default-name-mangling,
MANGLING=$withval, MANGLING=auto)
case "$MANGLING" in
auto) mangling=DM_STRING_MANGLING_AUTO;;
- none|disabled) mangling=DM_STRING_MANGLING_NONE;;
+ no|none|disabled) mangling=DM_STRING_MANGLING_NONE;;
hex) mangling=DM_STRING_MANGLING_HEX;;
*) AC_MSG_ERROR([--with-default-name-mangling parameter invalid]);;
esac
@@ -301,12 +301,12 @@ dnl -- snapshots inclusion type
AC_MSG_CHECKING(whether to include snapshots)
AC_ARG_WITH(snapshots,
AC_HELP_STRING([--with-snapshots=TYPE],
- [snapshot support: internal/shared/none [internal]]),
+ [snapshot support: internal/none [internal]]),
SNAPSHOTS=$withval, SNAPSHOTS=internal)
AC_MSG_RESULT($SNAPSHOTS)
case "$SNAPSHOTS" in
- none|shared) ;;
+ no|none|shared) ;;
internal) AC_DEFINE([SNAPSHOT_INTERNAL], 1,
[Define to 1 to include built-in support for snapshots.]) ;;
*) AC_MSG_ERROR([--with-snapshots parameter invalid]) ;;
@@ -317,12 +317,12 @@ dnl -- mirrors inclusion type
AC_MSG_CHECKING(whether to include mirrors)
AC_ARG_WITH(mirrors,
AC_HELP_STRING([--with-mirrors=TYPE],
- [mirror support: internal/shared/none [internal]]),
+ [mirror support: internal/none [internal]]),
MIRRORS=$withval, MIRRORS=internal)
AC_MSG_RESULT($MIRRORS)
case "$MIRRORS" in
- none|shared) ;;
+ no|none|shared) ;;
internal) AC_DEFINE([MIRRORED_INTERNAL], 1,
[Define to 1 to include built-in support for mirrors.]) ;;
*) AC_MSG_ERROR([--with-mirrors parameter invalid]) ;;
@@ -352,14 +352,17 @@ AC_DEFINE_UNQUOTED([DEFAULT_RAID10_SEGTYPE], ["$DEFAULT_RAID10_SEGTYPE"],
AC_ARG_WITH(default-sparse-segtype,
AC_HELP_STRING([--with-default-sparse-segtype=TYPE],
[default sparse segtype: thin/snapshot [thin]]),
- DEFAULT_SPARSE_SEGTYPE=$withval, DEFAULT_SPARSE_SEGTYPE="thin")
+ [ case "$withval" in
+ thin|snapshot) DEFAULT_SPARSE_SEGTYPE=$withval ;;
+ *) AC_MSG_ERROR(--with-default-sparse-segtype parameter invalid) ;;
+ esac], DEFAULT_SPARSE_SEGTYPE="thin")
################################################################################
dnl -- thin provisioning
AC_MSG_CHECKING(whether to include thin provisioning)
AC_ARG_WITH(thin,
AC_HELP_STRING([--with-thin=TYPE],
- [thin provisioning support: internal/shared/none [internal]]),
+ [thin provisioning support: internal/none [internal]]),
THIN=$withval, THIN=internal)
AC_ARG_WITH(thin-check,
AC_HELP_STRING([--with-thin-check=PATH],
@@ -381,7 +384,7 @@ AC_ARG_WITH(thin-restore,
AC_MSG_RESULT($THIN)
case "$THIN" in
- none) test "$DEFAULT_SPARSE_SEGTYPE" = "thin" && DEFAULT_SPARSE_SEGTYPE="snapshot" ;;
+ no|none) test "$DEFAULT_SPARSE_SEGTYPE" = "thin" && DEFAULT_SPARSE_SEGTYPE="snapshot" ;;
shared) ;;
internal) AC_DEFINE([THIN_INTERNAL], 1,
[Define to 1 to include built-in support for thin provisioning.]) ;;
@@ -458,7 +461,6 @@ case "$THIN" in
if test "$THIN_CHECK_NEEDS_CHECK" = yes; then
AC_DEFINE([THIN_CHECK_NEEDS_CHECK], 1, [Define to 1 if the external 'thin_check' tool requires the --clear-needs-check-flag option])
fi
-
;;
esac
@@ -479,7 +481,7 @@ dnl -- cache inclusion type
AC_MSG_CHECKING(whether to include cache)
AC_ARG_WITH(cache,
AC_HELP_STRING([--with-cache=TYPE],
- [cache support: internal/shared/none [internal]]),
+ [cache support: internal/none [internal]]),
CACHE=$withval, CACHE="internal")
AC_ARG_WITH(cache-check,
AC_HELP_STRING([--with-cache-check=PATH],
@@ -500,7 +502,7 @@ AC_ARG_WITH(cache-restore,
AC_MSG_RESULT($CACHE)
case "$CACHE" in
- none|shared) ;;
+ no|none|shared) ;;
internal) AC_DEFINE([CACHE_INTERNAL], 1, [Define to 1 to include built-in support for cache.]) ;;
*) AC_MSG_ERROR([--with-cache parameter invalid]) ;;
esac
@@ -613,8 +615,8 @@ AC_ARG_WITH(vdo-format,
[vdoformat tool: [autodetect]]),
VDO_FORMAT_CMD=$withval, VDO_FORMAT_CMD="autodetect")
case "$VDO" in
- none) ;;
- internal)
+ no|none) ;;
+ internal)
AC_DEFINE([VDO_INTERNAL], 1, [Define to 1 to include built-in support for vdo.])
if test "$VDO_FORMAT_CMD" = "autodetect"; then
AC_PATH_TOOL(VDO_FORMAT_CMD, vdoformat, [], [$PATH])
@@ -643,7 +645,7 @@ AC_DEFINE_UNQUOTED([VDO_FORMAT_CMD], ["$VDO_FORMAT_CMD"],
#AC_ARG_WITH(vdo-lib,
# AC_HELP_STRING([--with-vdo-lib=PATH],
# [vdo support: Path to utils lib: [/usr/lib]]),
-# VDO_LIB=$withval, VDO_LIB="/usr/lib")
+# VDO_LIB=$withval, VDO_LIB="/usr/lib")
#AC_MSG_RESULT($VDO_LIB)
################################################################################
@@ -657,8 +659,8 @@ AC_ARG_WITH(writecache,
AC_MSG_RESULT($WRITECACHE)
case "$WRITECACHE" in
- none) ;;
- internal)
+ no|none) ;;
+ internal)
AC_DEFINE([WRITECACHE_INTERNAL], 1, [Define to 1 to include built-in support for writecache.])
;;
*) AC_MSG_ERROR([--with-writecache parameter invalid]) ;;
@@ -675,7 +677,7 @@ AC_ARG_WITH(integrity,
AC_MSG_RESULT($INTEGRITY)
case "$INTEGRITY" in
- none) ;;
+ no|none) ;;
internal)
AC_DEFINE([INTEGRITY_INTERNAL], 1, [Define to 1 to include built-in support for integrity.])
;;
@@ -830,7 +832,7 @@ AC_ARG_WITH(symvers,
[use symbol versioning of the shared library [default=gnu]]),
[ case "$withval" in
gnu|no) symvers=$withval ;;
- *) AC_MSG_ERROR(Unknown argument to with-symvers) ;;
+ *) AC_MSG_ERROR(--with-symvers parameter invalid) ;;
esac], symvers=gnu)
AC_MSG_RESULT($symvers)
3 years