Skip to content

Commit

Permalink
Generate gitversion.h only in git checkouts
Browse files Browse the repository at this point in the history
  • Loading branch information
gjedeer committed Nov 1, 2017
1 parent c5438fb commit 44a23bb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ INCLUDES = $(wildcard *.h)
# Targets
all: tuntox

gitversion.h: .git/HEAD .git/index
@echo " GEN $@"
@echo "#define GITVERSION \"$(shell git rev-parse HEAD)\"" > $@
gitversion.h: FORCE
@if [ -f .git/HEAD ] ; then echo " GEN $@"; echo "#define GITVERSION \"$(shell git rev-parse HEAD)\"" > $@; fi

FORCE:

tox_bootstrap.h:
python generate_tox_bootstrap.py
Expand Down

0 comments on commit 44a23bb

Please sign in to comment.