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!
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
25 # buildrepo 'test' just requires files in their final destination to be
28 $(PROGRAMS_TO_TEST:%=test.$(TEST).%): \
29 test.buildrepo.%: $(DESTDIR)/%.bc