diff --git a/CMakeLists.txt b/CMakeLists.txt index 5558f6b..c8956f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -91,6 +91,9 @@ SET (TASK_DOCDIR share/doc/task CACHE STRING "Installation directory for doc fi SET (TASK_RCDIR "${TASK_DOCDIR}/rc" CACHE STRING "Installation directory for configuration files") SET (TASK_BINDIR bin CACHE STRING "Installation directory for the binary") +SET (SYSTEM_TASKRC "${CMAKE_INSTALL_PREFIX}/etc/taskrc" + CACHE STRING "System-wide taskrc") + message ("-- Looking for SHA1 references") if (EXISTS ${CMAKE_SOURCE_DIR}/.git/index) set (HAVE_COMMIT true) diff --git a/cmake.h.in b/cmake.h.in index 0041e6e..f8c1a0e 100644 --- a/cmake.h.in +++ b/cmake.h.in @@ -16,6 +16,7 @@ /* Installation details */ #define TASK_RCDIR "${CMAKE_INSTALL_PREFIX}/${TASK_RCDIR}" +#define SYSTEM_TASKRC "${SYSTEM_TASKRC}" /* Localization */ #define PACKAGE_LANGUAGE ${PACKAGE_LANGUAGE} diff --git a/src/Context.cpp b/src/Context.cpp index 8aae74e..ffa5557 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -121,7 +121,8 @@ int Context::initialize (int argc, const char** argv) } config.clear (); - config.load (rc_file); + config.load (SYSTEM_TASKRC); + config.load (rc_file, 2); CLI2::applyOverrides (argc, argv); //////////////////////////////////////////////////////////////////////////// @@ -146,7 +147,6 @@ int Context::initialize (int argc, const char** argv) } tdb2.set_location (data_dir); - createDefaultConfig (); //////////////////////////////////////////////////////////////////////////// //