Commit facca5c4 authored by Andreas Werner's avatar Andreas Werner
Browse files

add version generation of each subssystem

parent d5f438f1
**.cmd
**.o
**.a
version.c
......@@ -7,3 +7,18 @@ obj-$(CONFIG_EVENT_GROUP) += event_groups.o
obj-$(CONFIG_DEFAULT_TASK_RETURN_ADDRESS) += taskReturn.o
obj-$(CONFIG_STREAM_BUFFER) += stream_buffer.o
ldflags-y=-T freertos/freertos.ld
obj-$(CONFIG_GEN_VERSION) += version.o
BUILDID := $(USER)@$(shell hostname) $(shell date +'%Y-%m-%d %H:%M:%S')
$(obj)/version.c: FORCE
@echo " GEN $(obj)/version.c"
$(Q)version="const char *versionKernel = \""; \
dir=`pwd`; \
cd `dirname $@`; \
version=$$version`git log -n 1 --pretty="format:$(BUILDID) %H" --no-notes`; \
if git diff-index --name-only HEAD | grep -qv "^scripts/package" > /dev/null; then \
version="$$version-dirty"; \
fi; \
version="$$version\";"; \
cd $$dir; \
echo $$version > $@;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment