From 7005a585a03949a8eeb3e2d0ce2c3b52cd4bf9f3 Mon Sep 17 00:00:00 2001 From: Nils Schneider Date: Mon, 28 Jul 2014 20:53:43 +0200 Subject: [PATCH] allow GLUON_SITEDIR to be set by environement --- docs/user/builds.rst | 14 ++++++++++++++ include/gluon.mk | 8 ++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/docs/user/builds.rst b/docs/user/builds.rst index 00c1e9cc..a207ee12 100644 --- a/docs/user/builds.rst +++ b/docs/user/builds.rst @@ -47,3 +47,17 @@ will also call ``make clean`` on the OpenWRT tree, and make dirclean will do all this, and call ``make dirclean`` on the OpenWRT tree. + +Environment variables +--------------------- + +Gluon's build process can be controlled by various environment variables. + +GLUON_SITEDIR + Path to the site configuration. Defaults to ``site/``. + +GLUON_IMAGEDIR + Path where images will be stored. Defaults to ``images/``. + +GLUON_BUILDDIR ?= $(GLUONDIR)/build + Working directory during build. Defaults to ``build/``. diff --git a/include/gluon.mk b/include/gluon.mk index 9a96f045..9fac5f1c 100644 --- a/include/gluon.mk +++ b/include/gluon.mk @@ -1,13 +1,13 @@ ifneq ($(__gluon_inc),1) __gluon_inc=1 -GLUON_ORIGOPENWRTDIR := $(GLUONDIR)/openwrt -GLUON_SITEDIR := $(GLUONDIR)/site -GLUON_SITE_CONFIG := $(GLUON_SITEDIR)/site.conf - +GLUON_SITEDIR ?= $(GLUONDIR)/site GLUON_IMAGEDIR ?= $(GLUONDIR)/images GLUON_BUILDDIR ?= $(GLUONDIR)/build +GLUON_ORIGOPENWRTDIR := $(GLUONDIR)/openwrt +GLUON_SITE_CONFIG := $(GLUON_SITEDIR)/site.conf + GLUON_OPENWRTDIR = $(GLUON_BUILDDIR)/$(GLUON_TARGET)/openwrt BOARD_BUILDDIR = $(GLUON_BUILDDIR)/$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET))