#!/usr/bin/make -f

TARGET_BUILD	:= build-llvm
DEB_HOST_ARCH       = $(shell dpkg-architecture -qDEB_HOST_ARCH)

ifneq (,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS))))
  NJOBS := -j $(subst parallel=,,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS))))
endif

# List of the archs we know we have 100 % tests working
ARCH_LLVM_TEST_OK := amd64 i386

all:
# clang tests
# setup the env
	cd $(CURDIR)/../../$(TARGET_BUILD)/Release/lib/ && ln -s libclang.so libclang.so.1
	cd $(CURDIR)/../../$(TARGET_BUILD)/ && $(MAKE) -C tools/clang/ test || true
	rm -f $(CURDIR)/../../$(TARGET_BUILD)/Release/lib/libclang.so.1

