blob: 95dda9544199d7b04d2e9c651a2ac6a9d2713bc9 [file] [log] [blame]
host := i386-apple-darwin10
build := i386-apple-darwin10
target := i386-apple-darwin10
srcdir := $(shell pwd)/src
objdir := $(shell pwd)/obj
CCC_ADD_ARGS := -ccc-clang-cxx,-Qunused-arguments,-std-default=gnu89,-ferror-limit=0,-fmessage-length=0,-fno-color-diagnostics,-fno-caret-diagnostics,-Wno-unused-value,-Wno-return-type,-Wno-constant-logical-operand,-fno-verbose-asm
CC_UNDER_TEST := /Developer/usr/bin/clang
CXX_UNDER_TEST := /Developer/usr/bin/clang++
ALT_CC_UNDER_TEST := /Developer/usr/bin/gcc
ALT_CXX_UNDER_TEST := /Developer/usr/bin/g++
COMPAT_OPTIONS := [list [list {-m64} {-m64}] [list {-m32} {-m32}]]
# You can override RUNTESTFLAGS to pass options to 'runtest', as in the GCC make
# check configurations.
RUNTESTFLAGS :=
TESTSUITEDIR := src
site.exp:
@echo "Making a new config file..."
-@rm -f ./tmp?
@touch site.exp
-@mv site.exp site.bak
@echo "## these variables are automatically generated by make ##" > ./tmp0
@echo "# Do not edit here. If you wish to override these values" >> ./tmp0
@echo "# add them to the last section" >> ./tmp0
@echo "set srcdir \"${srcdir}\"" >> ./tmp0
@echo "set tmpdir \"${objdir}\"" >> ./tmp0
@echo "set host_triplet $(host)" >> ./tmp0
@echo "set build_triplet $(build)" >> ./tmp0
@echo "set target_triplet $(target)" >> ./tmp0
@echo "set target_alias $(target)" >> ./tmp0
@echo "set CFLAGS \"\"" >> ./tmp0
@echo "set CXXFLAGS \"\"" >> ./tmp0
@echo "set HOSTCC \"$(CC_UNDER_TEST)\"" >> ./tmp0
@echo "set HOSTCFLAGS \"\"" >> ./tmp0
@echo "set HAVE_LIBSTDCXX_V3 1" >> ./tmp0
@echo "set GCC_UNDER_TEST \"$(CC_UNDER_TEST)\"" >> ./tmp0;
@echo "set GXX_UNDER_TEST \"$(CXX_UNDER_TEST)\"" >> ./tmp0;
@echo "set OBJC_UNDER_TEST \"$(CC_UNDER_TEST)\"" >> ./tmp0;
@echo "set OBJCXX_UNDER_TEST \"$(CXX_UNDER_TEST)\"" >> ./tmp0;
@echo "set ALT_CC_UNDER_TEST \"$(ALT_CC_UNDER_TEST)\"" >> ./tmp0;
@echo "set ALT_CXX_UNDER_TEST \"$(ALT_CXX_UNDER_TEST)\"" >> ./tmp0;
@echo "set COMPAT_OPTIONS \"$(COMPAT_OPTIONS)\"" >> ./tmp0;
@echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0
@cat ./tmp0 > site.exp
@cat site.bak | sed \
-e '1,/^## All variables above are.*##/ d' >> site.exp
-@rm -f ./tmp?
.PHONY: site.exp
check:
$(MAKE) -k check-gcc check-g++ check-objc check-obj-c++
.PHONY: check
save-results:
if [ -z "$(VERSION)" ]; then \
echo "usage: make $@ VERSION=107"; \
exit 1; \
fi
mkdir -p results
rm -f results/clang-$(VERSION).sum
for i in gcc g++ objc obj-c++; do \
cat obj/$$i/$$i.sum >> results/clang-$(VERSION).sum; \
done
check-%: obj/.dir obj/%/.dir site.exp
@cp site.exp ${objdir}/$*
(cd ${objdir}/$* && \
env CCC_ADD_ARGS=$(CCC_ADD_ARGS) runtest --tool $* $(RUNTESTFLAGS))
.PHONY: check-%
clean:
rm -rf obj site.exp site.bak
.PHONY: clean
%/.dir:
@mkdir -p $* > /dev/null
@echo "Created." > $@
.PRECIOUS: %/.dir