2003-06-16 16:33:38 +03:00
|
|
|
#ifndef __GLOBALS_H
|
|
|
|
#define __GLOBALS_H
|
|
|
|
|
|
|
|
#include <string>
|
2004-01-13 18:35:43 +02:00
|
|
|
#include "util.hh"
|
2003-06-16 16:33:38 +03:00
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
/* Path names. */
|
|
|
|
|
2003-06-27 16:55:12 +03:00
|
|
|
/* nixStore is the directory where we generally store atomic and
|
|
|
|
derived files. */
|
|
|
|
extern string nixStore;
|
2003-06-16 16:33:38 +03:00
|
|
|
|
2003-07-10 16:41:28 +03:00
|
|
|
extern string nixDataDir; /* !!! fix */
|
|
|
|
|
2003-06-27 16:55:12 +03:00
|
|
|
/* nixLogDir is the directory where we log various operations. */
|
2003-06-16 16:33:38 +03:00
|
|
|
extern string nixLogDir;
|
|
|
|
|
2003-11-19 19:27:16 +02:00
|
|
|
/* nixStateDir is the directory where state is stored. */
|
|
|
|
extern string nixStateDir;
|
|
|
|
|
2003-07-31 16:47:13 +03:00
|
|
|
/* nixDBPath is the path name of our Berkeley DB environment. */
|
|
|
|
extern string nixDBPath;
|
|
|
|
|
2005-02-02 00:07:48 +02:00
|
|
|
/* nixConfDir is the directory where configuration files are
|
|
|
|
stored. */
|
|
|
|
extern string nixConfDir;
|
|
|
|
|
|
|
|
|
2003-06-16 16:33:38 +03:00
|
|
|
|
2003-08-19 12:04:47 +03:00
|
|
|
/* Misc. global flags. */
|
|
|
|
|
|
|
|
/* Whether to keep temporary directories of failed builds. */
|
|
|
|
extern bool keepFailed;
|
|
|
|
|
2004-06-25 18:36:09 +03:00
|
|
|
/* Whether to keep building subgoals when a sibling (another subgoal
|
|
|
|
of the same goal) fails. */
|
|
|
|
extern bool keepGoing;
|
|
|
|
|
2004-06-28 13:42:57 +03:00
|
|
|
/* Whether, if we cannot realise the known closure corresponding to a
|
|
|
|
derivation, we should try to normalise the derivation instead. */
|
|
|
|
extern bool tryFallback;
|
|
|
|
|
2004-01-13 18:35:43 +02:00
|
|
|
/* Verbosity level for build output. */
|
|
|
|
extern Verbosity buildVerbosity;
|
|
|
|
|
2004-05-12 17:20:32 +03:00
|
|
|
/* Maximum number of parallel build jobs. 0 means unlimited. */
|
|
|
|
extern unsigned int maxBuildJobs;
|
|
|
|
|
2004-10-25 17:38:23 +03:00
|
|
|
/* Read-only mode. Don't copy stuff to the store, don't change the
|
|
|
|
database. */
|
|
|
|
extern bool readOnlyMode;
|
|
|
|
|
2003-08-19 12:04:47 +03:00
|
|
|
|
2005-02-02 00:07:48 +02:00
|
|
|
string querySetting(const string & name, const string & def);
|
|
|
|
|
2005-02-14 15:07:09 +02:00
|
|
|
bool queryBoolSetting(const string & name, bool def);
|
|
|
|
|
2005-02-02 00:07:48 +02:00
|
|
|
|
2003-06-16 16:33:38 +03:00
|
|
|
#endif /* !__GLOBALS_H */
|