Commit 7eb456b9 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Add a for bindisttest/

parent e499cbe9
# -----------------------------------------------------------------------------
# (c) 2009 The University of Glasgow
# This file is part of the GHC build system.
# To understand how the build system works and how to modify it, see
# -----------------------------------------------------------------------------
ifeq "$(TEST_PREP)" "YES"
.PHONY: test_bindist
"$(RM)" $(RM_OPTS_REC) bindisttest/$(BIN_DIST_INST_SUBDIR)
"$(RM)" $(RM_OPTS_REC) bindisttest/a/b/c/*
"$(RM)" $(RM_OPTS) bindisttest/HelloWorld
"$(RM)" $(RM_OPTS) bindisttest/HelloWorld.o
"$(RM)" $(RM_OPTS) bindisttest/HelloWorld.hi
"$(RM)" $(RM_OPTS) bindisttest/output
# We use the a/b/c subdirectory as configure looks for install-sh in
# . .. ../.. and we don't want it to find the build system's install-sh.
# NB. tar has funny interpretation of filenames sometimes (thinking
# c:/foo is a remote file), so it's safer to bzip and then pipe into
# tar rather than using tar -xjf:
cd bindisttest/a/b/c/ && bzip2 -cd ../../../../$(BIN_DIST_TEST_TAR_BZ2) | $(TAR) -xf -
ifeq "$(Windows)" "YES"
mv bindisttest/a/b/c/$(BIN_DIST_NAME) $(BIN_DIST_INST_DIR)
cd bindisttest/a/b/c/$(BIN_DIST_NAME) && ./configure --prefix=$(TOP)/$(BIN_DIST_INST_DIR)
cd bindisttest/a/b/c/$(BIN_DIST_NAME) && $(MAKE) install
$(BIN_DIST_INST_DIR)/bin/runghc bindisttest/HelloWorld > bindisttest/output
$(CONTEXT_DIFF) bindisttest/output bindisttest/expected_output
$(BIN_DIST_INST_DIR)/bin/ghc --make bindisttest/HelloWorld
bindisttest/HelloWorld > bindisttest/output
$(CONTEXT_DIFF) bindisttest/output bindisttest/expected_output
# Without --no-user-package-conf we might pick up random packages from ~/.ghc
$(BIN_DIST_INST_DIR)/bin/ghc-pkg check --no-user-package-conf
$(eval $(call clean-target,bindisttest,all,$(BIN_DIST_INST_DIR) $(wildcard bindisttest/a/b/c/*) bindisttest/HelloWorld bindisttest/HelloWorld.o bindisttest/HelloWorld.hi bindisttest/output))
......@@ -521,6 +521,7 @@ BUILD_DIRS += \
ifneq "$(BINDIST)" "YES"
bindisttest \
......@@ -77,7 +77,7 @@ echo "Validating=YES" > mk/
make -j$threads ValidateHpc=$hpc ValidateSlow=$slow
make binary-dist-prep
make -C bindisttest TEST_PREP=YES
make test_bindist TEST_PREP=YES
fi # testsuite-only
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment