Skip to content

Commit

Permalink
ensure that commit_hash.h is included in the source tarball
Browse files Browse the repository at this point in the history
  • Loading branch information
ksedgwic committed Oct 2, 2024
1 parent f014af3 commit 5a80393
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ jobs:
- uses: cachix/install-nix-action@v22
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- run: nix develop --command bash -c "autoreconf -i && ./configure && make -j4 distcheck"
- run: nix develop --command bash -c "autoreconf -i && ./configure --disable-dependency-tracking && make -j4 distcheck"
16 changes: 12 additions & 4 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -680,16 +680,24 @@ BUILT_SOURCES = commit_hash.h

commit_hash.h: FORCE
@if test -e $(srcdir)/.git/logs/HEAD; then \
if [ ! -f $@ ] || [ $(srcdir)/.git/logs/HEAD -nt $@ ]; then \
echo "Regenerating commit_hash.h..."; \
if [ ! -f $(srcdir)/commit_hash.h ] || [ $(srcdir)/.git/logs/HEAD -nt $(srcdir)/commit_hash.h ]; then \
echo "Regenerating $(srcdir)/commit_hash.h..."; \
$(SHELL) $(srcdir)/generate_commit_hash.sh; \
else \
echo "commit_hash.h is up-to-date."; \
echo "$(srcdir)/commit_hash.h is up-to-date."; \
fi \
else \
echo "Using existing commit_hash.h"; \
echo "Using existing $(srcdir)/commit_hash.h"; \
fi

# Ensure that commit_hash.h is included in the source tarball.
dist-hook:
test -f $(srcdir)/commit_hash.h || $(MAKE) commit_hash.h
ls -ld $(distdir) # Print permissions of distdir
ls -l $(srcdir)/commit_hash.h # Print details of commit_hash.h
chmod u+w $(distdir)/
cp $(srcdir)/commit_hash.h $(distdir)/

FORCE:

.PHONY: FORCE
Expand Down

0 comments on commit 5a80393

Please sign in to comment.