Only code for the option itself, the option is not being used yet.
conf->compression = false;
conf->compression_level = 6;
conf->cpp_extension = x_strdup("");
+ conf->depend_mode = false;
conf->direct_mode = true;
conf->disable = false;
conf->extra_files_to_hash = x_strdup("");
reformat(&s, "cpp_extension = %s", conf->cpp_extension);
printer(s, conf->item_origins[find_conf("cpp_extension")->number], context);
+ reformat(&s, "depend_mode = %s", bool_to_string(conf->depend_mode));
+ printer(s, conf->item_origins[find_conf("depend_mode")->number], context);
+
reformat(&s, "direct_mode = %s", bool_to_string(conf->direct_mode));
printer(s, conf->item_origins[find_conf("direct_mode")->number], context);
bool compression;
unsigned compression_level;
char *cpp_extension;
+ bool depend_mode;
bool direct_mode;
bool disable;
char *extra_files_to_hash;
compression, 5, ITEM(compression, bool)
compression_level, 6, ITEM(compression_level, unsigned)
cpp_extension, 7, ITEM(cpp_extension, string)
-direct_mode, 8, ITEM(direct_mode, bool)
-disable, 9, ITEM(disable, bool)
-extra_files_to_hash, 10, ITEM(extra_files_to_hash, env_string)
-hard_link, 11, ITEM(hard_link, bool)
-hash_dir, 12, ITEM(hash_dir, bool)
-ignore_headers_in_manifest, 13, ITEM(ignore_headers_in_manifest, env_string)
-keep_comments_cpp, 14, ITEM(keep_comments_cpp, bool)
-limit_multiple, 15, ITEM(limit_multiple, float)
-log_file, 16, ITEM(log_file, env_string)
-max_files, 17, ITEM(max_files, unsigned)
-max_size, 18, ITEM(max_size, size)
-path, 19, ITEM(path, env_string)
-pch_external_checksum, 20, ITEM(pch_external_checksum, bool)
-prefix_command, 21, ITEM(prefix_command, env_string)
-prefix_command_cpp, 22, ITEM(prefix_command_cpp, env_string)
-read_only, 23, ITEM(read_only, bool)
-read_only_direct, 24, ITEM(read_only_direct, bool)
-recache, 25, ITEM(recache, bool)
-run_second_cpp, 26, ITEM(run_second_cpp, bool)
-sloppiness, 27, ITEM(sloppiness, sloppiness)
-stats, 28, ITEM(stats, bool)
-temporary_dir, 29, ITEM(temporary_dir, env_string)
-umask, 30, ITEM(umask, umask)
-unify, 31, ITEM(unify, bool)
+depend_mode, 8, ITEM(depend_mode, bool)
+direct_mode, 9, ITEM(direct_mode, bool)
+disable, 10, ITEM(disable, bool)
+extra_files_to_hash, 11, ITEM(extra_files_to_hash, env_string)
+hard_link, 12, ITEM(hard_link, bool)
+hash_dir, 13, ITEM(hash_dir, bool)
+ignore_headers_in_manifest, 14, ITEM(ignore_headers_in_manifest, env_string)
+keep_comments_cpp, 15, ITEM(keep_comments_cpp, bool)
+limit_multiple, 16, ITEM(limit_multiple, float)
+log_file, 17, ITEM(log_file, env_string)
+max_files, 18, ITEM(max_files, unsigned)
+max_size, 19, ITEM(max_size, size)
+path, 20, ITEM(path, env_string)
+pch_external_checksum, 21, ITEM(pch_external_checksum, bool)
+prefix_command, 22, ITEM(prefix_command, env_string)
+prefix_command_cpp, 23, ITEM(prefix_command_cpp, env_string)
+read_only, 24, ITEM(read_only, bool)
+read_only_direct, 25, ITEM(read_only_direct, bool)
+recache, 26, ITEM(recache, bool)
+run_second_cpp, 27, ITEM(run_second_cpp, bool)
+sloppiness, 28, ITEM(sloppiness, sloppiness)
+stats, 29, ITEM(stats, bool)
+temporary_dir, 30, ITEM(temporary_dir, env_string)
+umask, 31, ITEM(umask, umask)
+unify, 32, ITEM(unify, bool)
{
enum
{
- TOTAL_KEYWORDS = 32,
+ TOTAL_KEYWORDS = 33,
MIN_WORD_LENGTH = 4,
MAX_WORD_LENGTH = 26,
MIN_HASH_VALUE = 4,
{
{"",0,NULL,0,NULL}, {"",0,NULL,0,NULL},
{"",0,NULL,0,NULL}, {"",0,NULL,0,NULL},
-#line 29 "src/confitems.gperf"
- {"path", 19, ITEM(path, env_string)},
+#line 30 "src/confitems.gperf"
+ {"path", 20, ITEM(path, env_string)},
{"",0,NULL,0,NULL}, {"",0,NULL,0,NULL},
{"",0,NULL,0,NULL},
#line 13 "src/confitems.gperf"
{"cpp_extension", 7, ITEM(cpp_extension, string)},
#line 14 "src/confitems.gperf"
{"compiler_check", 4, ITEM(compiler_check, string)},
-#line 38 "src/confitems.gperf"
- {"stats", 28, ITEM(stats, bool)},
+#line 39 "src/confitems.gperf"
+ {"stats", 29, ITEM(stats, bool)},
#line 12 "src/confitems.gperf"
{"cache_dir_levels", 2, ITEM_V(cache_dir_levels, unsigned, dir_levels)},
#line 16 "src/confitems.gperf"
{"compression_level", 6, ITEM(compression_level, unsigned)},
-#line 26 "src/confitems.gperf"
- {"log_file", 16, ITEM(log_file, env_string)},
-#line 31 "src/confitems.gperf"
- {"prefix_command", 21, ITEM(prefix_command, env_string)},
-#line 37 "src/confitems.gperf"
- {"sloppiness", 27, ITEM(sloppiness, sloppiness)},
-#line 30 "src/confitems.gperf"
- {"pch_external_checksum", 20, ITEM(pch_external_checksum, bool)},
-#line 35 "src/confitems.gperf"
- {"recache", 25, ITEM(recache, bool)},
+#line 27 "src/confitems.gperf"
+ {"log_file", 17, ITEM(log_file, env_string)},
#line 32 "src/confitems.gperf"
- {"prefix_command_cpp", 22, ITEM(prefix_command_cpp, env_string)},
+ {"prefix_command", 22, ITEM(prefix_command, env_string)},
+#line 38 "src/confitems.gperf"
+ {"sloppiness", 28, ITEM(sloppiness, sloppiness)},
+#line 31 "src/confitems.gperf"
+ {"pch_external_checksum", 21, ITEM(pch_external_checksum, bool)},
+#line 36 "src/confitems.gperf"
+ {"recache", 26, ITEM(recache, bool)},
#line 33 "src/confitems.gperf"
- {"read_only", 23, ITEM(read_only, bool)},
-#line 41 "src/confitems.gperf"
- {"unify", 31, ITEM(unify, bool)},
- {"",0,NULL,0,NULL},
-#line 24 "src/confitems.gperf"
- {"keep_comments_cpp", 14, ITEM(keep_comments_cpp, bool)},
+ {"prefix_command_cpp", 23, ITEM(prefix_command_cpp, env_string)},
+#line 34 "src/confitems.gperf"
+ {"read_only", 24, ITEM(read_only, bool)},
+#line 42 "src/confitems.gperf"
+ {"unify", 32, ITEM(unify, bool)},
+#line 18 "src/confitems.gperf"
+ {"depend_mode", 8, ITEM(depend_mode, bool)},
+#line 25 "src/confitems.gperf"
+ {"keep_comments_cpp", 15, ITEM(keep_comments_cpp, bool)},
+#line 29 "src/confitems.gperf"
+ {"max_size", 19, ITEM(max_size, size)},
#line 28 "src/confitems.gperf"
- {"max_size", 18, ITEM(max_size, size)},
-#line 27 "src/confitems.gperf"
- {"max_files", 17, ITEM(max_files, unsigned)},
+ {"max_files", 18, ITEM(max_files, unsigned)},
{"",0,NULL,0,NULL},
-#line 34 "src/confitems.gperf"
- {"read_only_direct", 24, ITEM(read_only_direct, bool)},
-#line 19 "src/confitems.gperf"
- {"disable", 9, ITEM(disable, bool)},
-#line 39 "src/confitems.gperf"
- {"temporary_dir", 29, ITEM(temporary_dir, env_string)},
-#line 36 "src/confitems.gperf"
- {"run_second_cpp", 26, ITEM(run_second_cpp, bool)},
+#line 35 "src/confitems.gperf"
+ {"read_only_direct", 25, ITEM(read_only_direct, bool)},
+#line 20 "src/confitems.gperf"
+ {"disable", 10, ITEM(disable, bool)},
+#line 40 "src/confitems.gperf"
+ {"temporary_dir", 30, ITEM(temporary_dir, env_string)},
+#line 37 "src/confitems.gperf"
+ {"run_second_cpp", 27, ITEM(run_second_cpp, bool)},
{"",0,NULL,0,NULL},
-#line 18 "src/confitems.gperf"
- {"direct_mode", 8, ITEM(direct_mode, bool)},
+#line 19 "src/confitems.gperf"
+ {"direct_mode", 9, ITEM(direct_mode, bool)},
{"",0,NULL,0,NULL},
+#line 23 "src/confitems.gperf"
+ {"hash_dir", 13, ITEM(hash_dir, bool)},
#line 22 "src/confitems.gperf"
- {"hash_dir", 12, ITEM(hash_dir, bool)},
-#line 21 "src/confitems.gperf"
- {"hard_link", 11, ITEM(hard_link, bool)},
-#line 40 "src/confitems.gperf"
- {"umask", 30, ITEM(umask, umask)},
+ {"hard_link", 12, ITEM(hard_link, bool)},
+#line 41 "src/confitems.gperf"
+ {"umask", 31, ITEM(umask, umask)},
{"",0,NULL,0,NULL}, {"",0,NULL,0,NULL},
#line 10 "src/confitems.gperf"
{"base_dir", 0, ITEM_V(base_dir, env_string, absolute_path)},
-#line 25 "src/confitems.gperf"
- {"limit_multiple", 15, ITEM(limit_multiple, float)},
+#line 26 "src/confitems.gperf"
+ {"limit_multiple", 16, ITEM(limit_multiple, float)},
{"",0,NULL,0,NULL},
-#line 23 "src/confitems.gperf"
- {"ignore_headers_in_manifest", 13, ITEM(ignore_headers_in_manifest, env_string)},
+#line 24 "src/confitems.gperf"
+ {"ignore_headers_in_manifest", 14, ITEM(ignore_headers_in_manifest, env_string)},
{"",0,NULL,0,NULL}, {"",0,NULL,0,NULL},
-#line 20 "src/confitems.gperf"
- {"extra_files_to_hash", 10, ITEM(extra_files_to_hash, env_string)}
+#line 21 "src/confitems.gperf"
+ {"extra_files_to_hash", 11, ITEM(extra_files_to_hash, env_string)}
};
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
}
return 0;
}
-static const size_t CONFITEMS_TOTAL_KEYWORDS = 32;
+static const size_t CONFITEMS_TOTAL_KEYWORDS = 33;
COMPRESSLEVEL, "compression_level"
CPP2, "run_second_cpp"
COMMENTS, "keep_comments_cpp"
+DEPEND, "depend_mode"
DIR, "cache_dir"
DIRECT, "direct_mode"
DISABLE, "disable"
54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
0, 54, 54, 54, 54, 54, 54, 54, 54, 54,
- 54, 54, 54, 54, 54, 25, 10, 0, 0, 15,
- 10, 54, 5, 0, 54, 10, 35, 15, 0, 25,
- 0, 54, 15, 20, 0, 54, 15, 54, 54, 0,
- 54, 54, 54, 54, 54, 5, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 25, 10, 0, 0, 5,
+ 10, 54, 15, 0, 54, 10, 35, 25, 10, 25,
+ 0, 54, 15, 20, 0, 54, 25, 54, 54, 15,
+ 54, 54, 54, 54, 54, 0, 54, 54, 54, 54,
54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
{
enum
{
- TOTAL_KEYWORDS = 33,
+ TOTAL_KEYWORDS = 34,
MIN_WORD_LENGTH = 2,
MAX_WORD_LENGTH = 15,
MIN_HASH_VALUE = 2,
{"",""}, {"",""},
#line 12 "src/envtoconfitems.gperf"
{"CC", "compiler"},
-#line 19 "src/envtoconfitems.gperf"
+#line 20 "src/envtoconfitems.gperf"
{"DIR", "cache_dir"},
#line 17 "src/envtoconfitems.gperf"
{"CPP2", "run_second_cpp"},
{"",""}, {"",""},
-#line 41 "src/envtoconfitems.gperf"
+#line 42 "src/envtoconfitems.gperf"
{"TEMPDIR", "temporary_dir"},
#line 13 "src/envtoconfitems.gperf"
{"COMPILER", "compiler"},
-#line 32 "src/envtoconfitems.gperf"
- {"PATH", "path"},
-#line 39 "src/envtoconfitems.gperf"
- {"SLOPPINESS", "sloppiness"},
{"",""},
-#line 25 "src/envtoconfitems.gperf"
- {"HASHDIR", "hash_dir"},
+#line 40 "src/envtoconfitems.gperf"
+ {"SLOPPINESS", "sloppiness"},
+#line 21 "src/envtoconfitems.gperf"
+ {"DIRECT", "direct_mode"},
+#line 11 "src/envtoconfitems.gperf"
+ {"BASEDIR", "base_dir"},
#line 14 "src/envtoconfitems.gperf"
{"COMPILERCHECK", "compiler_check"},
-#line 27 "src/envtoconfitems.gperf"
+#line 28 "src/envtoconfitems.gperf"
{"LIMIT_MULTIPLE", "limit_multiple"},
-#line 43 "src/envtoconfitems.gperf"
- {"UNIFY", "unify"},
#line 34 "src/envtoconfitems.gperf"
+ {"PCH_EXTSUM", "pch_external_checksum"},
+#line 35 "src/envtoconfitems.gperf"
{"PREFIX", "prefix_command"},
-#line 28 "src/envtoconfitems.gperf"
- {"LOGFILE", "log_file"},
#line 29 "src/envtoconfitems.gperf"
+ {"LOGFILE", "log_file"},
+#line 30 "src/envtoconfitems.gperf"
{"MAXFILES", "max_files"},
- {"",""},
-#line 35 "src/envtoconfitems.gperf"
+#line 33 "src/envtoconfitems.gperf"
+ {"PATH", "path"},
+#line 36 "src/envtoconfitems.gperf"
{"PREFIX_CPP", "prefix_command_cpp"},
-#line 20 "src/envtoconfitems.gperf"
- {"DIRECT", "direct_mode"},
-#line 11 "src/envtoconfitems.gperf"
- {"BASEDIR", "base_dir"},
+#line 19 "src/envtoconfitems.gperf"
+ {"DEPEND", "depend_mode"},
+#line 26 "src/envtoconfitems.gperf"
+ {"HASHDIR", "hash_dir"},
#line 15 "src/envtoconfitems.gperf"
{"COMPRESS", "compression"},
-#line 22 "src/envtoconfitems.gperf"
+#line 23 "src/envtoconfitems.gperf"
{"EXTENSION", "cpp_extension"},
-#line 40 "src/envtoconfitems.gperf"
+#line 41 "src/envtoconfitems.gperf"
{"STATS", "stats"},
{"",""},
-#line 30 "src/envtoconfitems.gperf"
+#line 31 "src/envtoconfitems.gperf"
{"MAXSIZE", "max_size"},
#line 16 "src/envtoconfitems.gperf"
{"COMPRESSLEVEL", "compression_level"},
{"",""},
-#line 33 "src/envtoconfitems.gperf"
- {"PCH_EXTSUM", "pch_external_checksum"},
+#line 44 "src/envtoconfitems.gperf"
+ {"UNIFY", "unify"},
{"",""},
-#line 38 "src/envtoconfitems.gperf"
+#line 39 "src/envtoconfitems.gperf"
{"RECACHE", "recache"},
-#line 36 "src/envtoconfitems.gperf"
+#line 37 "src/envtoconfitems.gperf"
{"READONLY", "read_only"},
{"",""},
-#line 42 "src/envtoconfitems.gperf"
+#line 43 "src/envtoconfitems.gperf"
{"UMASK", "umask"},
{"",""},
-#line 31 "src/envtoconfitems.gperf"
+#line 32 "src/envtoconfitems.gperf"
{"NLEVELS", "cache_dir_levels"},
#line 18 "src/envtoconfitems.gperf"
{"COMMENTS", "keep_comments_cpp"},
{"",""},
-#line 37 "src/envtoconfitems.gperf"
+#line 38 "src/envtoconfitems.gperf"
{"READONLY_DIRECT", "read_only_direct"},
{"",""},
-#line 21 "src/envtoconfitems.gperf"
+#line 22 "src/envtoconfitems.gperf"
{"DISABLE", "disable"},
-#line 24 "src/envtoconfitems.gperf"
+#line 25 "src/envtoconfitems.gperf"
{"HARDLINK", "hard_link"},
{"",""}, {"",""}, {"",""}, {"",""}, {"",""}, {"",""},
-#line 23 "src/envtoconfitems.gperf"
+#line 24 "src/envtoconfitems.gperf"
{"EXTRAFILES", "extra_files_to_hash"},
{"",""}, {"",""},
-#line 26 "src/envtoconfitems.gperf"
+#line 27 "src/envtoconfitems.gperf"
{"IGNOREHEADERS", "ignore_headers_in_manifest"}
};
}
return 0;
}
-static const size_t ENVTOCONFITEMS_TOTAL_KEYWORDS = 33;
+static const size_t ENVTOCONFITEMS_TOTAL_KEYWORDS = 34;
#include "framework.h"
#include "util.h"
-#define N_CONFIG_ITEMS 32
+#define N_CONFIG_ITEMS 33
static struct {
char *descr;
const char *origin;
CHECK(!conf->compression);
CHECK_INT_EQ(6, conf->compression_level);
CHECK_STR_EQ("", conf->cpp_extension);
+ CHECK(!conf->depend_mode);
CHECK(conf->direct_mode);
CHECK(!conf->disable);
CHECK_STR_EQ("", conf->extra_files_to_hash);
"compression=true\n"
"compression_level= 2\n"
"cpp_extension = .foo\n"
+ "depend_mode = true\n"
"direct_mode = false\n"
"disable = true\n"
"extra_files_to_hash = a:b c:$USER\n"
CHECK(conf->compression);
CHECK_INT_EQ(2, conf->compression_level);
CHECK_STR_EQ(".foo", conf->cpp_extension);
+ CHECK(conf->depend_mode);
CHECK(!conf->direct_mode);
CHECK(conf->disable);
CHECK_STR_EQ_FREE1(format("a:b c:%s", user), conf->extra_files_to_hash);
true,
8,
"ce",
+ true,
false,
true,
"efth",
CHECK_STR_EQ("compression = true", received_conf_items[n++].descr);
CHECK_STR_EQ("compression_level = 8", received_conf_items[n++].descr);
CHECK_STR_EQ("cpp_extension = ce", received_conf_items[n++].descr);
+ CHECK_STR_EQ("depend_mode = true", received_conf_items[n++].descr);
CHECK_STR_EQ("direct_mode = false", received_conf_items[n++].descr);
CHECK_STR_EQ("disable = true", received_conf_items[n++].descr);
CHECK_STR_EQ("extra_files_to_hash = efth", received_conf_items[n++].descr);