diff --git a/environment.mk b/environment.mk index 412dd46..a9ad5d3 100644 --- a/environment.mk +++ b/environment.mk @@ -36,6 +36,17 @@ export ENV_LOADED SHELL = /bin/sh export SHELL +# User-defined configuration file +SITE_ENV ?= content/site-env +SITE_ENV ::= $(strip ${site_env}) + +ifeq ($(strip $(shell [ -r ${SITE_ENV} ] && echo ${SITE_ENV})),) + $(info Generate a site configuration file first via `make configure`) + $(error Configuration file ${site_env} not readable.) +else + include ${SITE_ENV} +endif + # Base/root directory of the build system. Allows us to use absolute paths. MAKO_DIR ?= ${CURDIR} export MAKO_DIR @@ -45,17 +56,6 @@ CONTENT ?= ${MAKO_DIR}/content CONTENT ::= $(strip ${CONTENT}) export CONTENT -# User-defined configuration file -site_env ?= ${CONTENT}/site-env -site_env ::= $(strip ${site_env}) - -ifeq ($(strip $(shell [ -r ${site_env} ] && echo ${site_env})),) - $(info Generate a site configuration file first via `make configure`) - $(error Configuration file ${site_env} not readable.) -else - include ${site_env} -endif - # Place for intermediate files WORKING ?= ${MAKO_DIR}/workspace WORKING ::= $(strip ${WORKING})