File: Makefile

package info (click to toggle)
git-lfs 3.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,808 kB
  • sloc: sh: 21,256; makefile: 507; ruby: 417
file content (67 lines) | stat: -rw-r--r-- 1,689 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
SHELL = bash
RM ?= rm -f
PROVE ?= prove
PROVE_EXTRA_ARGS =
DEFAULT_TEST_TARGET ?= test

GO ?= go

# GOTOOLCHAIN is an environment variable which, when set to 'local',
# prevents Go from downloading and running non-local versions of itself.
export GOTOOLCHAIN = local

ifeq ($(OS),Windows_NT)
X ?= .exe
else
X ?=
endif

TEST_CMDS =

TEST_CMDS += ../bin/git-credential-lfsnoop$X
TEST_CMDS += ../bin/git-credential-lfstest$X
TEST_CMDS += ../bin/lfs-askpass$X
TEST_CMDS += ../bin/lfs-ssh-echo$X
TEST_CMDS += ../bin/lfs-ssh-proxy-test$X
TEST_CMDS += ../bin/lfstest-badpathcheck$X
TEST_CMDS += ../bin/lfstest-count-tests$X
TEST_CMDS += ../bin/lfstest-customadapter$X
TEST_CMDS += ../bin/lfstest-genrandom$X
TEST_CMDS += ../bin/lfstest-gitserver$X
TEST_CMDS += ../bin/lfstest-nanomtime$X
TEST_CMDS += ../bin/lfstest-realpath$X
TEST_CMDS += ../bin/lfstest-standalonecustomadapter$X
TEST_CMDS += ../bin/lfstest-testutils$X

# Not used for the integration tests, but build it here anyway to ensure it
# continues to work.
TEST_CMDS += ../bin/git-lfs-test-server-api$X

TEST_SRCS     = $(wildcard t-*.sh)
TEST_API_SRCS = $(wildcard git-lfs-test-server-api/*.go)

all : $(DEFAULT_TEST_TARGET)

test-commands : $(TEST_CMDS)

test : test-commands
	$(RM) -r remote test_count{,.lock}
	@. ./testenv.sh && setup && cd t && \
		RM_GIT_LFS_TEST_DIR=no $(PROVE) $(PROVE_EXTRA_ARGS) t-*.sh && \
		shutdown

.PHONY : $(TEST_SRCS)
$(TEST_SRCS) : $(TEST_CMDS)
	$(RM) -r remote test_count{,.lock}
	$(PROVE) -v $(PROVE_EXTRA_ARGS) $@

.PHONY : clean
clean :
	$(RM) -r remote
	$(RM) $(TEST_CMDS)

../bin/%$X : cmd/%.go
	$(GO) build -o $@ $^

../bin/git-lfs-test-server-api$X : $(TEST_API_SRCS)
	$(GO) build -o $@ $^