*~ *~
/target /target
/local.conf /build.conf
/_build /_build
\ No newline at end of file
...@@ -3,8 +3,24 @@ ...@@ -3,8 +3,24 @@
# This file may be used under the terms of the GNU General Public License version 3 # This file may be used under the terms of the GNU General Public License version 3
# see COPYING # see COPYING
BUILD_CONF?=./build.conf # BUILD_CONF must be specified relative to the repo root or must be an absolute path
-include $(BUILD_CONF) # BUILD_CONF defaults to ./build.conf
REPO_ROOT_REL:=$(dir $(lastword $(MAKEFILE_LIST)))
ifndef BUILD_CONF
BUILD_CONF=$(REPO_ROOT_REL)/build.conf
-include $(BUILD_CONF)
else
BUILD_CONF_EFF=$(BUILD_CONF)
ifeq ($(dir $(BUILD_CONF)),./)
BUILD_CONF_EFF=$(REPO_ROOT_REL)/$(BUILD_CONF)
endif
ifeq ($(wildcard $(BUILD_CONF_EFF)),)
$(info BUILD_CONF must be specified relative to the repo root or must be an absolute path)
$(error file specified using BUILD_CONF ($(BUILD_CONF)) not found)
endif
include $(BUILD_CONF_EFF)
endif
# Build config defaults # Build config defaults
DEBUG?=debug DEBUG?=debug
......
# This is an Example build config (local.conf) # This is an Example build config (build.conf)
# The values here reflect the defaults. # The values here reflect the defaults.
# If needed, copy this file into a file called # If needed, copy this file into a file called
# `local.conf` and adjust the values # `build.conf` and adjust the values
# The dir where the build artifacts get installed into # The dir where the build artifacts get installed into
# PREFIX=/usr/local # PREFIX=/usr/local
......