Don't reverse bindings in rnMethodBinds (fix Trac #4126)
[ghc.git] / bindisttest / ghc.mk
1 # -----------------------------------------------------------------------------
2 #
3 # (c) 2009 The University of Glasgow
4 #
5 # This file is part of the GHC build system.
6 #
7 # To understand how the build system works and how to modify it, see
8 # http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
9 # http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
10 #
11 # -----------------------------------------------------------------------------
12
13 ifeq "$(TEST_PREP)" "YES"
14 BIN_DIST_TEST_TAR_BZ2 = $(BIN_DIST_PREP_TAR_BZ2)
15 else
16 BIN_DIST_TEST_TAR_BZ2 = $(BIN_DIST_TAR_BZ2)
17 endif
18
19 .PHONY: test_bindist
20 test_bindist:
21 "$(RM)" $(RM_OPTS_REC) bindisttest/$(BIN_DIST_INST_SUBDIR)
22 "$(RM)" $(RM_OPTS_REC) bindisttest/a/b/c/*
23 "$(RM)" $(RM_OPTS) bindisttest/HelloWorld
24 "$(RM)" $(RM_OPTS) bindisttest/HelloWorld.o
25 "$(RM)" $(RM_OPTS) bindisttest/HelloWorld.hi
26 "$(RM)" $(RM_OPTS) bindisttest/output
27 # We use the a/b/c subdirectory as configure looks for install-sh in
28 # . .. ../.. and we don't want it to find the build system's install-sh.
29 #
30 # NB. tar has funny interpretation of filenames sometimes (thinking
31 # c:/foo is a remote file), so it's safer to bzip and then pipe into
32 # tar rather than using tar -xjf:
33 cd bindisttest/a/b/c/ && bzip2 -cd ../../../../$(BIN_DIST_TEST_TAR_BZ2) | $(TAR) -xf -
34 ifeq "$(Windows)" "YES"
35 mv bindisttest/a/b/c/$(BIN_DIST_NAME) $(BIN_DIST_INST_DIR)
36 else
37 cd bindisttest/a/b/c/$(BIN_DIST_NAME) && ./configure --prefix=$(TOP)/$(BIN_DIST_INST_DIR)
38 cd bindisttest/a/b/c/$(BIN_DIST_NAME) && $(MAKE) install
39 endif
40 $(BIN_DIST_INST_DIR)/bin/runghc bindisttest/HelloWorld > bindisttest/output
41 $(CONTEXT_DIFF) bindisttest/output bindisttest/expected_output
42 $(BIN_DIST_INST_DIR)/bin/ghc --make bindisttest/HelloWorld
43 bindisttest/HelloWorld > bindisttest/output
44 $(CONTEXT_DIFF) bindisttest/output bindisttest/expected_output
45 # Without --no-user-package-conf we might pick up random packages from ~/.ghc
46 $(BIN_DIST_INST_DIR)/bin/ghc-pkg check --no-user-package-conf
47
48 $(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))
49