Skip to content

Commit

Permalink
build: Fix building clboss as a git submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisguida authored and ksedgwic committed Oct 28, 2024
1 parent 5a546c1 commit 965e131
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -679,8 +679,10 @@ create-tarball: create-tarball.in Makefile
BUILT_SOURCES = commit_hash.h

commit_hash.h: FORCE
@if test -e $(srcdir)/.git/logs/HEAD; then \
if [ ! -f $(srcdir)/commit_hash.h ] || [ $(srcdir)/.git/logs/HEAD -nt $(srcdir)/commit_hash.h ]; then \
@if git -C $(srcdir) rev-parse --is-inside-work-tree > /dev/null 2>&1; then \
CURRENT_HASH="$$(git -C $(srcdir) rev-parse HEAD)"; \
if [ ! -f $(srcdir)/commit_hash.h ] || \
[ "$$(grep -oE '[0-9a-f]{40}' $(srcdir)/commit_hash.h)" != "$$CURRENT_HASH" ]; then \
echo "Regenerating $(srcdir)/commit_hash.h..."; \
$(SHELL) $(srcdir)/generate_commit_hash.sh; \
else \
Expand Down

0 comments on commit 965e131

Please sign in to comment.