File tree 1 file changed +9
-1
lines changed
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,14 @@ vpath %.S $(SOURCEDIRS)
136
136
137
137
CFLAGS += ${addprefix -I,$(SOURCEDIRS)}
138
138
139
+ ### Check for a git repo and pass version if found
140
+ ### git.exe in Windows cmd shells may require no stderr redirection
141
+ #RELSTR=${shell git describe --tags}
142
+ RELSTR=${shell git describe --tags 2>/dev/null}
143
+ ifneq ($(RELSTR),)
144
+ CFLAGS += -DCONTIKI_VERSION_STRING=\"Contiki-$(RELSTR)\"
145
+ endif
146
+
139
147
### Automatic dependency generation
140
148
141
149
ifneq ($(MAKECMDGOALS),clean)
@@ -152,7 +160,7 @@ sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
152
160
rm -f $(@:.o=.$$$$)
153
161
endef
154
162
155
- clean:
163
+ clean:
156
164
rm -f *~ *core core *.srec \
157
165
*.lst *.map \
158
166
*.cprg *.bin *.data contiki*.a *.firmware core-labels.S *.ihex *.ini \
You can’t perform that action at this time.
0 commit comments