2023-02-22 15:26:44 -08:00
|
|
|
|
|
|
|
# dummy target that forces another to be run once per make invocation
|
|
|
|
.FORCE:
|
|
|
|
|
|
|
|
gitversion.h.gen : .FORCE
|
|
|
|
echo "#pragma once" > $@
|
|
|
|
echo "#define GIT_HASH \"$$(git rev-parse HEAD)\"" >> $@
|
|
|
|
echo "#define GIT_HASH_SHORT \"$$(git rev-parse --short HEAD)\"" >> $@
|
|
|
|
|
|
|
|
gitversion.h : gitversion.h.gen
|
|
|
|
rsync --checksum $< $@
|
2023-02-22 15:58:15 -08:00
|
|
|
|
|
|
|
# All objects could depend on git version
|
2023-02-22 16:22:08 -08:00
|
|
|
$(OBJS) : gitversion.h
|