intermediate filename extensions used in this optimisation, in which case
this option could allow ccache to be used anyway.
-*CCACHE_DETECT_SHEBANG*::
-
- The *CCACHE_DETECT_SHEBANG* environment variable only has meaning on
- Windows. It instructs ccache to open the executable file to detect the
- *#!/bin/sh* string, in which case ccache will search for *sh.exe* in
- *PATH* and use that to launch the executable.
-
*CCACHE_DIR*::
The *CCACHE_DIR* environment variable specifies where ccache will keep its
conf->compiler_check = x_strdup("mtime");
conf->compression = false;
conf->cpp_extension = x_strdup("");
- conf->detect_shebang = 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, "detect_shebang = %s", conf->detect_shebang ? "true" : "false");
- printer(s, conf->item_origins[find_conf("detect_shebang")->number], context);
-
reformat(&s, "direct_mode = %s", conf->direct_mode ? "true" : "false");
printer(s, conf->item_origins[find_conf("direct_mode")->number], context);
char *compiler_check;
bool compression;
char *cpp_extension;
- bool detect_shebang;
bool direct_mode;
bool disable;
char *extra_files_to_hash;
compiler_check, 4, ITEM(compiler_check, string)
compression, 5, ITEM(compression, bool)
cpp_extension, 6, ITEM(cpp_extension, string)
-detect_shebang, 7, ITEM(detect_shebang, bool)
-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)
-log_file, 13, ITEM(log_file, env_string)
-max_files, 14, ITEM(max_files, unsigned)
-max_size, 15, ITEM(max_size, size)
-path, 16, ITEM(path, env_string)
-prefix_command, 17, ITEM(prefix_command, env_string)
-read_only, 18, ITEM(read_only, bool)
-recache, 19, ITEM(recache, bool)
-run_second_cpp, 20, ITEM(run_second_cpp, bool)
-sloppiness, 21, ITEM(sloppiness, sloppiness)
-stats, 22, ITEM(stats, bool)
-temporary_dir, 23, ITEM(temporary_dir, env_string)
-umask, 24, ITEM(umask, umask)
-unify, 25, ITEM(unify, bool)
+direct_mode, 7, ITEM(direct_mode, bool)
+disable, 8, ITEM(disable, bool)
+extra_files_to_hash, 9, ITEM(extra_files_to_hash, env_string)
+hard_link, 10, ITEM(hard_link, bool)
+hash_dir, 11, ITEM(hash_dir, bool)
+log_file, 12, ITEM(log_file, env_string)
+max_files, 13, ITEM(max_files, unsigned)
+max_size, 14, ITEM(max_size, size)
+path, 15, ITEM(path, env_string)
+prefix_command, 16, ITEM(prefix_command, env_string)
+read_only, 17, ITEM(read_only, bool)
+recache, 18, ITEM(recache, bool)
+run_second_cpp, 19, ITEM(run_second_cpp, bool)
+sloppiness, 20, ITEM(sloppiness, sloppiness)
+stats, 21, ITEM(stats, bool)
+temporary_dir, 22, ITEM(temporary_dir, env_string)
+umask, 23, ITEM(umask, umask)
+unify, 24, ITEM(unify, bool)
45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
45, 45, 45, 45, 45, 45, 45, 0, 25, 0,
- 10, 15, 45, 45, 18, 0, 45, 45, 15, 10,
+ 5, 15, 45, 45, 30, 5, 45, 45, 15, 10,
0, 0, 0, 45, 10, 0, 0, 5, 45, 45,
10, 45, 45, 45, 45, 45, 45, 45, 45, 45,
45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
{
enum
{
- TOTAL_KEYWORDS = 26,
+ TOTAL_KEYWORDS = 25,
MIN_WORD_LENGTH = 4,
MAX_WORD_LENGTH = 19,
MIN_HASH_VALUE = 4,
{
{"",0,NULL,0,NULL}, {"",0,NULL,0,NULL},
{"",0,NULL,0,NULL}, {"",0,NULL,0,NULL},
-#line 26 "confitems.gperf"
- {"path", 16, ITEM(path, env_string)},
-#line 32 "confitems.gperf"
- {"stats", 22, ITEM(stats, bool)},
+#line 25 "confitems.gperf"
+ {"path", 15, ITEM(path, env_string)},
+#line 31 "confitems.gperf"
+ {"stats", 21, ITEM(stats, bool)},
{"",0,NULL,0,NULL}, {"",0,NULL,0,NULL},
#line 13 "confitems.gperf"
{"compiler", 3, ITEM(compiler, string)},
#line 11 "confitems.gperf"
{"cache_dir", 1, ITEM(cache_dir, env_string)},
-#line 35 "confitems.gperf"
- {"unify", 25, ITEM(unify, bool)},
+#line 34 "confitems.gperf"
+ {"unify", 24, ITEM(unify, bool)},
#line 15 "confitems.gperf"
{"compression", 5, ITEM(compression, bool)},
{"",0,NULL,0,NULL},
{"",0,NULL,0,NULL},
#line 12 "confitems.gperf"
{"cache_dir_levels", 2, ITEM_V(cache_dir_levels, unsigned, dir_levels)},
-#line 19 "confitems.gperf"
- {"disable", 9, ITEM(disable, bool)},
-#line 25 "confitems.gperf"
- {"max_size", 15, ITEM(max_size, size)},
-#line 24 "confitems.gperf"
- {"max_files", 14, ITEM(max_files, unsigned)},
-#line 34 "confitems.gperf"
- {"umask", 24, ITEM(umask, umask)},
#line 18 "confitems.gperf"
- {"direct_mode", 8, ITEM(direct_mode, bool)},
- {"",0,NULL,0,NULL},
+ {"disable", 8, ITEM(disable, bool)},
+#line 24 "confitems.gperf"
+ {"max_size", 14, ITEM(max_size, size)},
#line 23 "confitems.gperf"
- {"log_file", 13, ITEM(log_file, env_string)},
-#line 27 "confitems.gperf"
- {"prefix_command", 17, ITEM(prefix_command, env_string)},
-#line 31 "confitems.gperf"
- {"sloppiness", 21, ITEM(sloppiness, sloppiness)},
-#line 22 "confitems.gperf"
- {"hash_dir", 12, ITEM(hash_dir, bool)},
-#line 21 "confitems.gperf"
- {"hard_link", 11, ITEM(hard_link, bool)},
+ {"max_files", 13, ITEM(max_files, unsigned)},
#line 33 "confitems.gperf"
- {"temporary_dir", 23, ITEM(temporary_dir, env_string)},
+ {"umask", 23, ITEM(umask, umask)},
+#line 17 "confitems.gperf"
+ {"direct_mode", 7, ITEM(direct_mode, bool)},
+ {"",0,NULL,0,NULL},
+#line 22 "confitems.gperf"
+ {"log_file", 12, ITEM(log_file, env_string)},
+#line 26 "confitems.gperf"
+ {"prefix_command", 16, ITEM(prefix_command, env_string)},
#line 30 "confitems.gperf"
- {"run_second_cpp", 20, ITEM(run_second_cpp, bool)},
+ {"sloppiness", 20, ITEM(sloppiness, sloppiness)},
{"",0,NULL,0,NULL}, {"",0,NULL,0,NULL},
+#line 32 "confitems.gperf"
+ {"temporary_dir", 22, ITEM(temporary_dir, env_string)},
#line 29 "confitems.gperf"
- {"recache", 19, ITEM(recache, bool)},
+ {"run_second_cpp", 19, ITEM(run_second_cpp, bool)},
+ {"",0,NULL,0,NULL}, {"",0,NULL,0,NULL},
+#line 28 "confitems.gperf"
+ {"recache", 18, ITEM(recache, bool)},
#line 10 "confitems.gperf"
{"base_dir", 0, ITEM_V(base_dir, env_string, absolute_path)},
-#line 28 "confitems.gperf"
- {"read_only", 18, ITEM(read_only, bool)},
- {"",0,NULL,0,NULL}, {"",0,NULL,0,NULL},
+#line 27 "confitems.gperf"
+ {"read_only", 17, ITEM(read_only, bool)},
{"",0,NULL,0,NULL}, {"",0,NULL,0,NULL},
-#line 17 "confitems.gperf"
- {"detect_shebang", 7, ITEM(detect_shebang, bool)},
+ {"",0,NULL,0,NULL},
+#line 21 "confitems.gperf"
+ {"hash_dir", 11, ITEM(hash_dir, bool)},
+#line 20 "confitems.gperf"
+ {"hard_link", 10, ITEM(hard_link, bool)},
{"",0,NULL,0,NULL}, {"",0,NULL,0,NULL},
{"",0,NULL,0,NULL}, {"",0,NULL,0,NULL},
-#line 20 "confitems.gperf"
- {"extra_files_to_hash", 10, ITEM(extra_files_to_hash, env_string)}
+#line 19 "confitems.gperf"
+ {"extra_files_to_hash", 9, 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 = 26;
+static const size_t CONFITEMS_TOTAL_KEYWORDS = 25;
COMPILERCHECK, "compiler_check"
COMPRESS, "compression"
CPP2, "run_second_cpp"
-DETECT_SHEBANG, "detect_shebang"
DIR, "cache_dir"
DIRECT, "direct_mode"
DISABLE, "disable"
#line 9 "envtoconfitems.gperf"
struct env_to_conf_item;
-/* maximum key range = 42, duplicates = 0 */
+/* maximum key range = 41, duplicates = 0 */
#ifdef __GNUC__
__inline
{
static const unsigned char asso_values[] =
{
- 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
- 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
- 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
- 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
- 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
- 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
- 44, 44, 44, 44, 44, 15, 0, 0, 0, 0,
- 44, 44, 20, 0, 44, 44, 15, 5, 15, 10,
- 0, 44, 5, 0, 10, 10, 44, 44, 0, 44,
- 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
- 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
- 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
- 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
- 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
- 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
- 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
- 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
- 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
- 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
- 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
- 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
- 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
- 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
- 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
- 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
- 44, 44, 44, 44, 44, 44
+ 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
+ 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
+ 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
+ 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
+ 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
+ 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
+ 43, 43, 43, 43, 43, 10, 5, 0, 0, 0,
+ 43, 43, 20, 0, 43, 43, 15, 10, 20, 10,
+ 0, 43, 5, 0, 10, 5, 43, 43, 0, 43,
+ 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
+ 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
+ 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
+ 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
+ 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
+ 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
+ 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
+ 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
+ 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
+ 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
+ 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
+ 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
+ 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
+ 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
+ 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
+ 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
+ 43, 43, 43, 43, 43, 43
};
return len + asso_values[(unsigned char)str[1]] + asso_values[(unsigned char)str[0]];
}
{
enum
{
- TOTAL_KEYWORDS = 26,
+ TOTAL_KEYWORDS = 25,
MIN_WORD_LENGTH = 2,
- MAX_WORD_LENGTH = 14,
+ MAX_WORD_LENGTH = 13,
MIN_HASH_VALUE = 2,
- MAX_HASH_VALUE = 43
+ MAX_HASH_VALUE = 42
};
static const struct env_to_conf_item wordlist[] =
{"",""}, {"",""},
#line 12 "envtoconfitems.gperf"
{"CC", "compiler"},
-#line 17 "envtoconfitems.gperf"
+#line 16 "envtoconfitems.gperf"
{"DIR", "cache_dir"},
#line 15 "envtoconfitems.gperf"
{"CPP2", "run_second_cpp"},
{"",""},
-#line 18 "envtoconfitems.gperf"
+#line 17 "envtoconfitems.gperf"
{"DIRECT", "direct_mode"},
-#line 19 "envtoconfitems.gperf"
+#line 18 "envtoconfitems.gperf"
{"DISABLE", "disable"},
{"",""},
-#line 20 "envtoconfitems.gperf"
+#line 19 "envtoconfitems.gperf"
{"EXTENSION", "cpp_extension"},
-#line 21 "envtoconfitems.gperf"
+#line 20 "envtoconfitems.gperf"
{"EXTRAFILES", "extra_files_to_hash"},
-#line 29 "envtoconfitems.gperf"
+#line 28 "envtoconfitems.gperf"
{"PREFIX", "prefix_command"},
-#line 31 "envtoconfitems.gperf"
- {"RECACHE", "recache"},
#line 30 "envtoconfitems.gperf"
+ {"RECACHE", "recache"},
+#line 29 "envtoconfitems.gperf"
{"READONLY", "read_only"},
-#line 16 "envtoconfitems.gperf"
- {"DETECT_SHEBANG", "detect_shebang"},
-#line 33 "envtoconfitems.gperf"
+#line 27 "envtoconfitems.gperf"
+ {"PATH", "path"},
+#line 32 "envtoconfitems.gperf"
{"STATS", "stats"},
{"",""},
-#line 34 "envtoconfitems.gperf"
+#line 33 "envtoconfitems.gperf"
{"TEMPDIR", "temporary_dir"},
#line 14 "envtoconfitems.gperf"
{"COMPRESS", "compression"},
-#line 28 "envtoconfitems.gperf"
- {"PATH", "path"},
-#line 35 "envtoconfitems.gperf"
+ {"",""},
+#line 34 "envtoconfitems.gperf"
{"UMASK", "umask"},
{"",""},
#line 11 "envtoconfitems.gperf"
#line 13 "envtoconfitems.gperf"
{"COMPILERCHECK", "compiler_check"},
{"",""},
-#line 32 "envtoconfitems.gperf"
+#line 31 "envtoconfitems.gperf"
{"SLOPPINESS", "sloppiness"},
{"",""},
-#line 26 "envtoconfitems.gperf"
- {"MAXSIZE", "max_size"},
#line 25 "envtoconfitems.gperf"
+ {"MAXSIZE", "max_size"},
+#line 24 "envtoconfitems.gperf"
{"MAXFILES", "max_files"},
{"",""},
-#line 36 "envtoconfitems.gperf"
+#line 35 "envtoconfitems.gperf"
{"UNIFY", "unify"},
{"",""},
-#line 24 "envtoconfitems.gperf"
+#line 23 "envtoconfitems.gperf"
{"LOGFILE", "log_file"},
{"",""}, {"",""}, {"",""}, {"",""},
-#line 27 "envtoconfitems.gperf"
- {"NLEVELS", "cache_dir_levels"},
- {"",""}, {"",""}, {"",""}, {"",""},
-#line 23 "envtoconfitems.gperf"
- {"HASHDIR", "hash_dir"},
#line 22 "envtoconfitems.gperf"
- {"HARDLINK", "hard_link"}
+ {"HASHDIR", "hash_dir"},
+#line 21 "envtoconfitems.gperf"
+ {"HARDLINK", "hard_link"},
+ {"",""}, {"",""}, {"",""},
+#line 26 "envtoconfitems.gperf"
+ {"NLEVELS", "cache_dir_levels"}
};
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
}
return 0;
}
-static const size_t ENVTOCONFITEMS_TOTAL_KEYWORDS = 26;
+static const size_t ENVTOCONFITEMS_TOTAL_KEYWORDS = 25;
ext = get_extension(path);
if (ext && strcasecmp(ext, ".sh") == 0 && (path_env = getenv("PATH")))
sh = find_executable_in_path("sh.exe", NULL, path_env);
- if (!sh && conf->detect_shebang) {
+ if (!sh && gevenv("CCACHE_DETECT_SHEBANG")) {
/* Detect shebang. */
FILE *fp;
fp = fopen(path, "r");
#include "test/framework.h"
#include "test/util.h"
-#define N_CONFIG_ITEMS 26
+#define N_CONFIG_ITEMS 25
static struct {
char *descr;
const char *origin;
CHECK_STR_EQ("mtime", conf->compiler_check);
CHECK(!conf->compression);
CHECK_STR_EQ("", conf->cpp_extension);
- CHECK(!conf->detect_shebang);
CHECK(conf->direct_mode);
CHECK(!conf->disable);
CHECK_STR_EQ("", conf->extra_files_to_hash);
"compiler_check = none\n"
"compression=true\n"
"cpp_extension = .foo\n"
- "detect_shebang = true\n"
"direct_mode = false\n"
"disable = true\n"
"extra_files_to_hash = a:b c:$USER\n"
CHECK_STR_EQ("none", conf->compiler_check);
CHECK(conf->compression);
CHECK_STR_EQ(".foo", conf->cpp_extension);
- CHECK(conf->detect_shebang);
CHECK(!conf->direct_mode);
CHECK(conf->disable);
CHECK_STR_EQ_FREE1(format("a:b c:%s", user), conf->extra_files_to_hash);
"cc",
true,
"ce",
- true,
false,
true,
"efth",
}
conf_print_items(&conf, conf_item_receiver, NULL);
- CHECK_INT_EQ(26, n_received_conf_items);
+ CHECK_INT_EQ(25, n_received_conf_items);
CHECK_STR_EQ("base_dir = bd", received_conf_items[n++].descr);
CHECK_STR_EQ("cache_dir = cd", received_conf_items[n++].descr);
CHECK_STR_EQ("cache_dir_levels = 7", received_conf_items[n++].descr);
CHECK_STR_EQ("compiler_check = cc", received_conf_items[n++].descr);
CHECK_STR_EQ("compression = true", received_conf_items[n++].descr);
CHECK_STR_EQ("cpp_extension = ce", received_conf_items[n++].descr);
- CHECK_STR_EQ("detect_shebang = 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);