Skip to content

Commit

Permalink
chore(build): Include Nix tooling in source distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Sep 18, 2021
1 parent 4dfa5e7 commit cb6df6c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,26 @@ EXTRA_DIST = spec tests examples documentation sile-dev-1.rockspec fontconfig.co
EXTRA_DIST += Makefile-distfiles
EXTRA_DIST += build-aux/action-updater.js build-aux/decore-automake.sh build-aux/git-version-gen build-aux/list-dist-files.sh
EXTRA_DIST += Dockerfile build-aux/docker-bootstrap.sh build-aux/docker-fontconfig.conf build-aux/docker-glibc-workaround.sh hooks/build
EXTRA_DIST += default.nix flake.nix flake.lock libtexpdf.git-rev shell.nix
EXTRA_DIST += package.json # imported by both Nix and Docker
EXTRA_DIST += $(MANUAL) $(EXAMPLES)

Makefile-distfiles: $(wildcard .version .tarball-version) | $(LUAMODLOCK)
build-aux/list-dist-files.sh > $@

BUILT_SOURCES = .version Makefile-distfiles

.version: $(shell $(AWK) '{print ".git/" $$2}' .git/HEAD 2>/dev/null ||:)
_BRANCH_REF := $(shell $(AWK) '{print ".git/" $$2}' .git/HEAD 2>/dev/null ||:)

.version: $(_BRANCH_REF)
[ -e "$@" ] && mv "$@" "$@-prev" || $(if $<,touch,cp "$(srcdir)/.tarball-version") "$@-prev"
$(if $<,./build-aux/git-version-gen "$(srcdir)/.tarball-version",printf "$(VERSION)") > "$@"
$(CMP) -s "$@" "$@-prev" || \
( autoreconf configure.ac --force && build-aux/decore-automake.sh )

libtexpdf.git-rev: $(_BRANCH_REF)
$(GIT) submodule status -- libtexpdf | $(AWK) '{ print $$1 }' > $@

dist-hook: $(MANUAL) $(EXAMPLES)
cd $(distdir)
printf "$(VERSION)" > .tarball-version
Expand Down

0 comments on commit cb6df6c

Please sign in to comment.