Adapt to recent changes in polly.
[llvm-testsuite/polly-testsuite.git] / TEST.buildrepo.Makefile
blobd11e851847d17ec14de02526856941c482357bf0
1 ##===- TEST.buildrepo.Makefile -----------------------------*- Makefile -*-===##
3 # This "test" is used to copy all compiled bytecode files into the repository.
5 ##===----------------------------------------------------------------------===##
7 ifeq ($(BYTECODE_REPOSITORY),)
8 ERROR: BYTECODE_REPOSITORY must be defined to build a repository!
9 endif
11 # Calculate the directory we should copy the bytecode file into.  This is
12 # relative to BYTECODE_REPOSITORY and the current directory this program is in.
14 CURDIR  := $(shell cd .; pwd)
15 PROGDIR := $(PROJ_SRC_ROOT)
16 DESTDIR := $(BYTECODE_REPOSITORY)/$(subst $(PROGDIR),,$(CURDIR))
18 .PRECIOUS: $(DESTDIR)/.dir $(DESTDIR)/%.bc
20 # To Make a file up-to-date, just copy it over.
21 $(PROGRAMS_TO_TEST:%=$(DESTDIR)/%.bc): \
22 $(DESTDIR)/%.bc: Output/%.llvm.bc
23         cp $< $@
25 # buildrepo 'test' just requires files in their final destination to be
26 # up-to-date
28 $(PROGRAMS_TO_TEST:%=test.$(TEST).%): \
29 test.buildrepo.%: $(DESTDIR)/%.bc