forked from microsoft/checkedc-llvm-test-suite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TEST.buildrepo.Makefile
29 lines (24 loc) · 969 Bytes
/
TEST.buildrepo.Makefile
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
##===- TEST.buildrepo.Makefile -----------------------------*- Makefile -*-===##
#
# This "test" is used to copy all compiled bytecode files into the repository.
#
##===----------------------------------------------------------------------===##
ifeq ($(BYTECODE_REPOSITORY),)
ERROR: BYTECODE_REPOSITORY must be defined to build a repository!
endif
# Calculate the directory we should copy the bytecode file into. This is
# relative to BYTECODE_REPOSITORY and the current directory this program is in.
#
CURDIR := $(shell cd .; pwd)
PROGDIR := $(PROJ_SRC_ROOT)
DESTDIR := $(BYTECODE_REPOSITORY)/$(subst $(PROGDIR),,$(CURDIR))
.PRECIOUS: $(DESTDIR)/.dir $(DESTDIR)/%.bc
# To Make a file up-to-date, just copy it over.
$(PROGRAMS_TO_TEST:%=$(DESTDIR)/%.bc): \
$(DESTDIR)/%.bc: Output/%.llvm.bc
cp $< $@
# buildrepo 'test' just requires files in their final destination to be
# up-to-date
#
$(PROGRAMS_TO_TEST:%=test.$(TEST).%): \
test.buildrepo.%: $(DESTDIR)/%.bc