mirror of
https://github.com/g4klx/MMDVM.git
synced 2026-10-15 08:14:12 +02:00
Add GitVersion.h to Makefile
This commit is contained in:
@@ -171,3 +171,11 @@ endif
|
|||||||
ifneq ($(wildcard /opt/openocd/bin/openocd),)
|
ifneq ($(wildcard /opt/openocd/bin/openocd),)
|
||||||
/opt/openocd/bin/openocd -f /opt/openocd/share/openocd/scripts/board/stm32f4discovery.cfg -c "program bin/$(BINELF) verify reset exit"
|
/opt/openocd/bin/openocd -f /opt/openocd/share/openocd/scripts/board/stm32f4discovery.cfg -c "program bin/$(BINELF) verify reset exit"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Export the current git version if the index file exists, else 000...
|
||||||
|
GitVersion.h:
|
||||||
|
ifneq ("$(wildcard .git/index)","")
|
||||||
|
echo "const char *gitversion = \"$(shell git rev-parse HEAD)\";" > $@
|
||||||
|
else
|
||||||
|
echo "const char *gitversion = \"0000000000000000000000000000000000000000\";" > $@
|
||||||
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user