Shorten compilation times

Now fish shell stores version is a small file called by other files.
This means that a slight change which modifies one file won't cause
many of files to recompile.

The compilation unit is intentionally small, this is by design. The
smaller it is, the faster it will recompile, and it will be compiled
a lot.
This commit is contained in:
Konrad Borowski
2014-05-01 09:46:27 +02:00
parent a7facfb760
commit f8e35de18d
8 changed files with 81 additions and 52 deletions

View File

@@ -55,6 +55,7 @@
#include "path.h"
#include "complete.h"
#include "fish_version.h"
/** Command used to start fishd */
#define FISHD_CMD L"fishd ^ /tmp/fishd.log.%s"
@@ -599,7 +600,7 @@ void env_init(const struct config_paths_t *paths /* or NULL */)
/*
Set up the version variables
*/
wcstring version = str2wcstring(FISH_BUILD_VERSION);
wcstring version = str2wcstring(get_fish_version());
env_set(L"version", version.c_str(), ENV_GLOBAL);
env_set(L"FISH_VERSION", version.c_str(), ENV_GLOBAL);