mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #6300 from kaspar030/improve_bindist
examples/bindist: some improvements
This commit is contained in:
commit
c9644d58c3
@ -18,13 +18,14 @@ QUIET ?= 1
|
||||
# bindist specific stuff:
|
||||
#
|
||||
# build and use module "abc".
|
||||
# use BINARY_DIRS instead of DIRS
|
||||
BINARY_DIRS += abc
|
||||
USEMODULE += abc
|
||||
# use BIN_DIRS instead of DIRS, BIN_USEMODULE instead of USEMODULE,
|
||||
# to flag that the directory should only be included when doing a normal build,
|
||||
# and that the resulting .a should be saved when doing "make bindist"
|
||||
BIN_DIRS += abc
|
||||
BIN_USEMODULE += abc # include "abc" module
|
||||
BIN_USEMODULE += bindist # include application module (named $APPLICATION)
|
||||
|
||||
# list of files to include in binary distribution
|
||||
# "bin/$(BOARD)/$(APPLICATION).elf" will automatically be added
|
||||
# list of extra files to include in binary distribution
|
||||
DIST_FILES += Makefile
|
||||
DIST_FILES += bin/$(BOARD)/abc.a
|
||||
|
||||
include $(RIOTBASE)/Makefile.include
|
||||
|
@ -10,6 +10,8 @@ This application serves as simple example for "make bindist".
|
||||
It consists of an application module (bindist.a) and another example module
|
||||
(abc.a).
|
||||
|
||||
See https://github.com/RIOT-OS/RIOT/wiki/LGPL-guide for background information.
|
||||
|
||||
## Instructions
|
||||
|
||||
Calling "make bindist" creates a folder "bindist", which only contains the
|
||||
|
@ -1,9 +1,13 @@
|
||||
DIST_FILES += bin/$(BOARD)/$(APPLICATION).a
|
||||
USEMODULE += $(BIN_USEMODULE)
|
||||
|
||||
ifneq (, $(filter check_bindist, $(MAKECMDGOALS)))
|
||||
DIST_FILES += $(BIN_USEMODULE:%=bin/$(BOARD)/%.a)
|
||||
|
||||
# if the file Makefile.distcheck exists, we're executing from within a folder
|
||||
# generated by "make bindist".
|
||||
ifneq (, $(wildcard Makefile.distcheck))
|
||||
include Makefile.distcheck
|
||||
else
|
||||
DIRS+=$(BINARY_DIRS)
|
||||
DIRS+=$(BIN_DIRS)
|
||||
endif
|
||||
|
||||
bindist: all
|
||||
@ -15,12 +19,12 @@ bindist: all
|
||||
@cp -a bin/$(BOARD)/$(APPLICATION).elf bindist
|
||||
|
||||
@echo "BINDIST_RIOT_VERSION=$(RIOT_VERSION)" > bindist/Makefile.distcheck
|
||||
@echo "BINDIST_GIT_HEAD=$$(git --work-tree=$(RIOTBASE) describe)" >> bindist/Makefile.distcheck
|
||||
@echo "BINDIST_GIT_HEAD=$$(git -C $(RIOTBASE) describe)" >> bindist/Makefile.distcheck
|
||||
|
||||
prepare_check_bindist:
|
||||
@[ "$(BINDIST_RIOT_VERSION)" = "$(RIOT_VERSION)" ] || \
|
||||
echo "Warning! RIOT_VERSION doesn't match!"
|
||||
@[ "$(BINDIST_GIT_HEAD)" = "$$(git --work-tree=$(RIOTBASE) describe)" ] || \
|
||||
@[ "$(BINDIST_GIT_HEAD)" = "$$(git -C $(RIOTBASE) describe)" ] || \
|
||||
echo "Warning! git describe doesn't match!"
|
||||
|
||||
check_bindist: prepare_check_bindist all
|
||||
|
Loading…
Reference in New Issue
Block a user