make: autodetect default SETTINGS
Use the oldest available version. We only keep the current version and the next in these directories by default, otherwise use SETTINGS or CONFIGDIR overrides directly.
This commit is contained in:
parent
feab3fbeaf
commit
99f7dbec73
11
Makefile
11
Makefile
|
@ -56,13 +56,14 @@ lint: lint-steps lint-composite
|
|||
TOOLSDIR?= /usr/tools
|
||||
TOOLSBRANCH?= master
|
||||
|
||||
.if defined(CONFIGDIR)
|
||||
SETTINGS= ${CONFIGDIR:C/^.*\///}
|
||||
.else
|
||||
SETTINGS?= 21.1
|
||||
.if defined(SETTINGS)
|
||||
_CONFIGDIR= ${TOOLSDIR}/config/${SETTINGS}
|
||||
.elif !defined(CONFIGDIR)
|
||||
_CONFIGDIR!= find -s ${TOOLSDIR}/config -type d -depth 1
|
||||
.endif
|
||||
|
||||
CONFIGDIR?= ${TOOLSDIR}/config/${SETTINGS}
|
||||
CONFIGDIR= ${_CONFIGDIR:[1]}
|
||||
SETTINGS?= ${CONFIGDIR:C/^.*\///}
|
||||
|
||||
.include "${CONFIGDIR}/build.conf"
|
||||
.-include "${CONFIGDIR}/build.conf.local"
|
||||
|
|
Loading…
Reference in New Issue