You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2014/11/05 18:28:42 UTC
[1/3] git commit: refs/heads/master - Remove --disable-threads
configure option
Repository: lucy
Updated Branches:
refs/heads/master a50b90e92 -> 8513ba7e5
Remove --disable-threads configure option
This option is only used by Clownfish.
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/40ab3291
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/40ab3291
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/40ab3291
Branch: refs/heads/master
Commit: 40ab3291272959a7e9dfa8c2b793536fc35d88bf
Parents: a50b90e
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Wed Nov 5 18:22:19 2014 +0100
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Wed Nov 5 18:22:19 2014 +0100
----------------------------------------------------------------------
c/INSTALL | 2 --
common/charmonizer.main | 7 +------
2 files changed, 1 insertion(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy/blob/40ab3291/c/INSTALL
----------------------------------------------------------------------
diff --git a/c/INSTALL b/c/INSTALL
index 0134d1f..01dd841 100644
--- a/c/INSTALL
+++ b/c/INSTALL
@@ -70,8 +70,6 @@ Options include
--enable-coverage
Enable code coverage. Create HTML pages with coverage data using
lcov by running "make coverage".
- --disable-threads
- Disable thread support.
--clownfish-prefix=path
Specify an alternative location for Clownfish if it isn't installed
in a system directory.
http://git-wip-us.apache.org/repos/asf/lucy/blob/40ab3291/common/charmonizer.main
----------------------------------------------------------------------
diff --git a/common/charmonizer.main b/common/charmonizer.main
index 78da384..25c3fe4 100644
--- a/common/charmonizer.main
+++ b/common/charmonizer.main
@@ -459,12 +459,7 @@ int main(int argc, const char **argv) {
int i;
for (i = 0; i < argc; i++) {
const char *arg = argv[i];
- if (strncmp(arg, "--disable-threads", 17) == 0) {
- chaz_CFlags *extra_cflags = chaz_CC_get_extra_cflags();
- chaz_CFlags_append(extra_cflags, "-DCFISH_NOTHREADS");
- break;
- }
- else if (memcmp(arg, "--clownfish-prefix=", 19) == 0) {
+ if (memcmp(arg, "--clownfish-prefix=", 19) == 0) {
lucy_args.clownfish_prefix = arg + 19;
}
}
[3/3] git commit: refs/heads/master - Regenerate charmonizer.c
Posted by nw...@apache.org.
Regenerate charmonizer.c
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/8513ba7e
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/8513ba7e
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/8513ba7e
Branch: refs/heads/master
Commit: 8513ba7e55270b6ad1e4a3c9bd64833c4b8914da
Parents: 8d0b1c5
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Wed Nov 5 18:27:39 2014 +0100
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Wed Nov 5 18:27:39 2014 +0100
----------------------------------------------------------------------
common/charmonizer.c | 53 ++++++++++++++++-------------------------------
1 file changed, 18 insertions(+), 35 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy/blob/8513ba7e/common/charmonizer.c
----------------------------------------------------------------------
diff --git a/common/charmonizer.c b/common/charmonizer.c
index 06bcf7c..5ec0079 100644
--- a/common/charmonizer.c
+++ b/common/charmonizer.c
@@ -2217,9 +2217,9 @@ S_chaz_CLI_error(chaz_CLI *self, const char *pattern, ...) {
static void
S_chaz_CLI_rebuild_help(chaz_CLI *self) {
int i;
- size_t amount = 200; // Length of section headers.
+ size_t amount = 200; /* Length of section headers. */
- // Allocate space.
+ /* Allocate space. */
if (self->usage) {
amount += strlen(self->usage);
}
@@ -2243,7 +2243,7 @@ S_chaz_CLI_rebuild_help(chaz_CLI *self) {
self->help = (char*)malloc(amount);
self->help[0] = '\0';
- // Accumulate "help" string.
+ /* Accumulate "help" string. */
if (self->usage) {
strcat(self->help, self->usage);
}
@@ -2323,6 +2323,7 @@ chaz_CLI_destroy(chaz_CLI *self) {
free(self->opts);
free(self->usage);
free(self->help);
+ free(self);
}
void
@@ -2344,14 +2345,14 @@ chaz_CLI_register(chaz_CLI *self, const char *name, const char *help,
int arg_required = !!(flags & CHAZ_CLI_ARG_REQUIRED);
int arg_optional = !!(flags & CHAZ_CLI_ARG_OPTIONAL);
- // Validate flags
+ /* Validate flags */
if (arg_required && arg_optional) {
S_chaz_CLI_error(self, "Conflicting flags: value both optional "
"and required");
return 0;
}
- // Insert new option. Keep options sorted by name.
+ /* Insert new option. Keep options sorted by name. */
for (rank = self->num_opts; rank > 0; rank--) {
int comparison = strcmp(name, self->opts[rank - 1].name);
if (comparison == 0) {
@@ -2373,7 +2374,7 @@ chaz_CLI_register(chaz_CLI *self, const char *name, const char *help,
self->opts[rank].defined = 0;
self->opts[rank].value = NULL;
- // Update `help` with new option.
+ /* Update `help` with new option. */
S_chaz_CLI_rebuild_help(self);
return 1;
@@ -2516,6 +2517,7 @@ chaz_CLI_parse(chaz_CLI *self, int argc, const char *argv[]) {
}
}
+ free(name);
return 1;
}
@@ -7710,10 +7712,6 @@ chaz_VariadicMacros_run(void) {
/* #include "Charmonizer/Core/ConfWriterPerl.h" */
/* #include "Charmonizer/Core/ConfWriterRuby.h" */
-struct lucy_CLIArgs {
- const char *clownfish_prefix;
-};
-
typedef struct SourceFileContext {
chaz_MakeVar *var;
} SourceFileContext;
@@ -7809,7 +7807,7 @@ S_cfh_file_callback(const char *dir, char *file, void *context) {
}
static void
-S_write_makefile(chaz_CLI *cli, struct lucy_CLIArgs *lucy_args) {
+S_write_makefile(chaz_CLI *cli) {
SourceFileContext sfc;
const char *base_dir = "..";
@@ -7817,7 +7815,7 @@ S_write_makefile(chaz_CLI *cli, struct lucy_CLIArgs *lucy_args) {
const char *exe_ext = chaz_OS_exe_ext();
const char *obj_ext = chaz_CC_obj_ext();
const char *math_lib = chaz_Floats_math_library();
- const char *cfish_prefix = lucy_args->clownfish_prefix;
+ const char *cfish_prefix = chaz_CLI_strval(cli, "clownfish-prefix");
char *core_dir = chaz_Util_join(dir_sep, base_dir, "core", NULL);
char *lemon_dir = chaz_Util_join(dir_sep, base_dir, "lemon", NULL);
@@ -8118,30 +8116,15 @@ int main(int argc, const char **argv) {
/* Initialize. */
chaz_CLI *cli
= chaz_CLI_new(argv[0], "charmonizer: Probe C build environment");
+ chaz_CLI_register(cli, "clownfish-prefix",
+ "prefix of Clownfish installation",
+ CHAZ_CLI_ARG_OPTIONAL);
chaz_CLI_set_usage(cli, "Usage: charmonizer [OPTIONS] [-- [CFLAGS]]");
- struct lucy_CLIArgs lucy_args = { NULL };
- {
- int result = chaz_Probe_parse_cli_args(argc, argv, cli);
- if (!result) {
- chaz_Probe_die_usage();
- }
- chaz_Probe_init(cli);
- S_add_compiler_flags(cli);
- }
- {
- int i;
- for (i = 0; i < argc; i++) {
- const char *arg = argv[i];
- if (strncmp(arg, "--disable-threads", 17) == 0) {
- chaz_CFlags *extra_cflags = chaz_CC_get_extra_cflags();
- chaz_CFlags_append(extra_cflags, "-DCFISH_NOTHREADS");
- break;
- }
- else if (memcmp(arg, "--clownfish-prefix=", 19) == 0) {
- lucy_args.clownfish_prefix = arg + 19;
- }
- }
+ if (!chaz_Probe_parse_cli_args(argc, argv, cli)) {
+ chaz_Probe_die_usage();
}
+ chaz_Probe_init(cli);
+ S_add_compiler_flags(cli);
/* Employ integer features but don't define stdint types in charmony.h. */
chaz_ConfWriter_append_conf(
@@ -8190,7 +8173,7 @@ int main(int argc, const char **argv) {
);
if (chaz_CLI_defined(cli, "enable-makefile")) {
- S_write_makefile(cli, &lucy_args);
+ S_write_makefile(cli);
}
/* Clean up. */
[2/3] git commit: refs/heads/master - Use chaz_CLI for
--clownfish-prefix option
Posted by nw...@apache.org.
Use chaz_CLI for --clownfish-prefix option
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/8d0b1c5c
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/8d0b1c5c
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/8d0b1c5c
Branch: refs/heads/master
Commit: 8d0b1c5c6f80673405542a81844af3726a718991
Parents: 40ab329
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Wed Nov 5 18:24:59 2014 +0100
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Wed Nov 5 18:24:59 2014 +0100
----------------------------------------------------------------------
common/charmonizer.main | 34 ++++++++++------------------------
1 file changed, 10 insertions(+), 24 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy/blob/8d0b1c5c/common/charmonizer.main
----------------------------------------------------------------------
diff --git a/common/charmonizer.main b/common/charmonizer.main
index 25c3fe4..2685189 100644
--- a/common/charmonizer.main
+++ b/common/charmonizer.main
@@ -37,10 +37,6 @@
#include "Charmonizer/Core/ConfWriterPerl.h"
#include "Charmonizer/Core/ConfWriterRuby.h"
-struct lucy_CLIArgs {
- const char *clownfish_prefix;
-};
-
typedef struct SourceFileContext {
chaz_MakeVar *var;
} SourceFileContext;
@@ -136,7 +132,7 @@ S_cfh_file_callback(const char *dir, char *file, void *context) {
}
static void
-S_write_makefile(chaz_CLI *cli, struct lucy_CLIArgs *lucy_args) {
+S_write_makefile(chaz_CLI *cli) {
SourceFileContext sfc;
const char *base_dir = "..";
@@ -144,7 +140,7 @@ S_write_makefile(chaz_CLI *cli, struct lucy_CLIArgs *lucy_args) {
const char *exe_ext = chaz_OS_exe_ext();
const char *obj_ext = chaz_CC_obj_ext();
const char *math_lib = chaz_Floats_math_library();
- const char *cfish_prefix = lucy_args->clownfish_prefix;
+ const char *cfish_prefix = chaz_CLI_strval(cli, "clownfish-prefix");
char *core_dir = chaz_Util_join(dir_sep, base_dir, "core", NULL);
char *lemon_dir = chaz_Util_join(dir_sep, base_dir, "lemon", NULL);
@@ -445,25 +441,15 @@ int main(int argc, const char **argv) {
/* Initialize. */
chaz_CLI *cli
= chaz_CLI_new(argv[0], "charmonizer: Probe C build environment");
+ chaz_CLI_register(cli, "clownfish-prefix",
+ "prefix of Clownfish installation",
+ CHAZ_CLI_ARG_OPTIONAL);
chaz_CLI_set_usage(cli, "Usage: charmonizer [OPTIONS] [-- [CFLAGS]]");
- struct lucy_CLIArgs lucy_args = { NULL };
- {
- int result = chaz_Probe_parse_cli_args(argc, argv, cli);
- if (!result) {
- chaz_Probe_die_usage();
- }
- chaz_Probe_init(cli);
- S_add_compiler_flags(cli);
- }
- {
- int i;
- for (i = 0; i < argc; i++) {
- const char *arg = argv[i];
- if (memcmp(arg, "--clownfish-prefix=", 19) == 0) {
- lucy_args.clownfish_prefix = arg + 19;
- }
- }
+ if (!chaz_Probe_parse_cli_args(argc, argv, cli)) {
+ chaz_Probe_die_usage();
}
+ chaz_Probe_init(cli);
+ S_add_compiler_flags(cli);
/* Employ integer features but don't define stdint types in charmony.h. */
chaz_ConfWriter_append_conf(
@@ -512,7 +498,7 @@ int main(int argc, const char **argv) {
);
if (chaz_CLI_defined(cli, "enable-makefile")) {
- S_write_makefile(cli, &lucy_args);
+ S_write_makefile(cli);
}
/* Clean up. */