]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Merge commit '7c6e3f549ad84e08b2661c0842af8de07b847ab8^'
authorJoel Rosdahl <joel@rosdahl.net>
Mon, 4 Aug 2014 14:23:09 +0000 (16:23 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Mon, 4 Aug 2014 14:23:09 +0000 (16:23 +0200)
* commit '7c6e3f549ad84e08b2661c0842af8de07b847ab8^':
  Fix problem with logging of current working directory
  Reformat NEWS.txt entries to be easier to work with

Conflicts:
ccache.c

1  2 
ccache.c

diff --cc ccache.c
index e583329d2e68cffe6dfe5f3a06935b0fd1faf567,8bdc8bdc397defa9956c21229f698638290894a9..c1ada499191c489e42cf3b892dbc64c5b30dea5e
+++ b/ccache.c
@@@ -2477,39 -2045,45 +2481,39 @@@ ccache(int argc, char *argv[]
        /* Arguments to send to the real compiler. */
        struct args *compiler_args;
  
 -      setup_uncached_err();
 -
 -      if (!getenv("CCACHE_READONLY")) {
 -              if (create_cachedirtag(cache_dir) != 0) {
 -                      cc_log("failed to create %s/CACHEDIR.TAG (%s)\n",
 -                              cache_dir, strerror(errno));
 -                      failed();
 -              }
 -      }
 +      orig_args = args_init(argc, argv);
  
 -      sloppiness = parse_sloppiness(getenv("CCACHE_SLOPPINESS"));
 +      initialize();
 +      find_compiler(argv);
  
 -      cc_log_argv("Command line: ", argv);
 -      cc_log("Hostname: %s", get_hostname());
 -      cc_log("Working directory: %s", get_current_working_dir());
 +#ifndef _WIN32
 +      signal(SIGHUP, signal_handler);
 +#endif
 +      signal(SIGINT, signal_handler);
 +      signal(SIGTERM, signal_handler);
  
 -      if (base_dir) {
 -              cc_log("Base directory: %s", base_dir);
 +      if (str_eq(conf->temporary_dir, "")) {
 +              clean_up_internal_tempdir();
        }
  
 -      if (getenv("CCACHE_UNIFY")) {
 -              cc_log("Unify mode enabled");
 -              enable_unify = true;
 +      if (!str_eq(conf->log_file, "")) {
 +              conf_print_items(conf, configuration_logger, NULL);
        }
  
 -      if (getenv("CCACHE_NODIRECT") || enable_unify) {
 -              cc_log("Direct mode disabled");
 -              enable_direct = false;
 +      if (conf->disable) {
 +              cc_log("ccache is disabled");
 +              failed();
        }
  
 -      if (getenv("CCACHE_COMPRESS")) {
 -              cc_log("Compression enabled");
 -              enable_compression = true;
 -      }
 +      setup_uncached_err();
 +
 +      cc_log_argv("Command line: ", argv);
 +      cc_log("Hostname: %s", get_hostname());
-       cc_log("Working directory: %s", current_working_dir);
++      cc_log("Working directory: %s", get_current_working_dir());
  
 -      if ((env = getenv("CCACHE_NLEVELS"))) {
 -              nlevels = atoi(env);
 -              if (nlevels < 1) nlevels = 1;
 -              if (nlevels > 8) nlevels = 8;
 +      if (conf->unify) {
 +              cc_log("Direct mode disabled because unify mode is enabled");
 +              conf->direct_mode = false;
        }
  
        if (!cc_process_args(orig_args, &preprocessor_args, &compiler_args)) {