Skip to content

Commit

Permalink
Use find for .v files when building without git (#55)
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 de0aa61 commit 0b67e4f
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 0b67e4f

Please sign in to comment.