forked from remote/site-ffmuc
Makefile: Misc release-releated build fixes
This commit is contained in:
24
Makefile
24
Makefile
@@ -2,23 +2,29 @@ GLUON_BUILD_DIR := gluon-build
|
||||
GLUON_GIT_URL := git://github.com/freifunk-gluon/gluon.git
|
||||
GLUON_GIT_REF := 08ecab23dec1e43b02fdca4caa86d2b7940b2f12
|
||||
|
||||
JOBS ?= $(shell cat /proc/cpuinfo | grep processor | wc -l)
|
||||
|
||||
_GIT_DESCRIBE = $(shell git describe --tags 2>&1)
|
||||
_GIT_DESCRIBE = $(shell git describe --tags 2>/dev/null)
|
||||
ifneq (,${_GIT_DESCRIBE})
|
||||
GLUON_RELEASE := ${_GIT_DESCRIBE}
|
||||
GLUON_BRANCH ?= stable
|
||||
GLUON_BRANCH := stable
|
||||
else
|
||||
GLUON_BRANCH ?= nightly
|
||||
GLUON_RELEASE ?= snapshot~$(shell date '+%Y%m%d')~$(shell git describe --always)
|
||||
endif
|
||||
|
||||
JOBS ?= $(shell cat /proc/cpuinfo | grep processor | wc -l)
|
||||
|
||||
GLUON_MAKE := ${MAKE} -j ${JOBS} -C ${GLUON_BUILD_DIR} \
|
||||
GLUON_RELEASE=${GLUON_RELEASE} \
|
||||
GLUON_BRANCH=${GLUON_BRANCH}
|
||||
|
||||
all: build
|
||||
|
||||
build: gluon-prepare
|
||||
cd ${GLUON_BUILD_DIR} \
|
||||
&& make update \
|
||||
&& make -j ${JOBS} \
|
||||
&& make manifest
|
||||
echo '${GLUON_RELEASE} (${GLUON_BRANCH})'
|
||||
${GLUON_MAKE} update
|
||||
${GLUON_MAKE} images
|
||||
|
||||
manifest: gluon-prepare
|
||||
${GLUON_MAKE} manifest
|
||||
|
||||
${GLUON_BUILD_DIR}:
|
||||
git clone ${GLUON_GIT_URL} ${GLUON_BUILD_DIR}
|
||||
|
||||
2
site.mk
2
site.mk
@@ -23,7 +23,7 @@ GLUON_SITE_PACKAGES := \
|
||||
haveged
|
||||
|
||||
|
||||
DEFAULT_GLUON_RELEASE := nightly~$(shell date '+%Y%m%d')~$(shell cd ../../../.. && git describe --always --abbrev=8)
|
||||
DEFAULT_GLUON_RELEASE := snapshot~$(shell date '+%Y%m%d')
|
||||
|
||||
# Allow overriding the release number from the command line
|
||||
GLUON_RELEASE ?= $(DEFAULT_GLUON_RELEASE)
|
||||
|
||||
Reference in New Issue
Block a user