Skip to content

Commit

Permalink
Use find for .v files when building without git
Browse files Browse the repository at this point in the history
Fixes #54

For coq/opam#2137
  • Loading branch information
JasonGross authored Mar 30, 2022
1 parent 3ab7a18 commit 21d6dc8
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,16 @@
LIBDIR := $(shell cygpath -m "$$(pwd)" 2>/dev/null || pwd)/src/Rupicola/Lib
ALLDIR := $(shell cygpath -m "$$(pwd)" 2>/dev/null || pwd)/src/Rupicola

# use git ls-files if we can to avoid building non-checked-in cruft;
# use find when building from a tarball
ifneq (,$(wildcard .git/))
find_vs = $(shell git ls-files "$(1)/*.v")
else
find_vs = $(shell find "$(1)" -type f -name '*.v')
endif
# absolute paths so that emacs compile mode knows where to find error
VS_LIB:=$(abspath $(shell git ls-files "$(LIBDIR)/*.v"))
VS_ALL:=$(abspath $(shell git ls-files "$(ALLDIR)/*.v"))
VS_LIB:=$(abspath $(call find_vs,$(LIBDIR)))
VS_ALL:=$(abspath $(call find_vs,$(ALLDIR)))

all: Makefile.coq $(VS_ALL)
rm -f .coqdeps.d
Expand Down

0 comments on commit 21d6dc8

Please sign in to comment.