1 # -----------------------------------------------------------------------------
3 # (c) 2009 The University of Glasgow
5 # This file is part of the GHC build system.
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
11 # -----------------------------------------------------------------------------
13 .PHONY: default_target
17 # Ideally we'd just include something to give us variables
18 # for paths and arguments to tools etc, and those set in mk/build.mk.
20 include $(TOP)/mk/config.mk
22 ifeq "$(TEST_PREP)" "YES"
23 BIN_DIST_TEST_TAR_BZ2 = ../$(BIN_DIST_PREP_TAR_BZ2)
25 BIN_DIST_TEST_TAR_BZ2 = ../$(BIN_DIST_TAR_BZ2)
29 $(RM) -rf $(BIN_DIST_INST_SUBDIR)
31 $(RM) HelloWorld HelloWorld.o HelloWorld.hi output
32 # We use the a/b/c subdirectory as configure looks for install-sh in
33 # . .. ../.. and we don't want it to find the build system's install-sh.
34 # --force-local makes tar not think that c:/foo refers to a remote file
35 cd a/b/c/ && $(TAR) --force-local -jxf ../../../$(BIN_DIST_TEST_TAR_BZ2)
36 ifeq "$(Windows)" "YES"
37 mv a/b/c/$(BIN_DIST_NAME) $(BIN_DIST_INST_DIR)
39 cd a/b/c/$(BIN_DIST_NAME) && ./configure --prefix=$(BIN_DIST_INST_DIR)
40 cd a/b/c/$(BIN_DIST_NAME) && make install
42 $(BIN_DIST_INST_DIR)/bin/runghc HelloWorld > output
43 $(CONTEXT_DIFF) output expected_output
44 $(BIN_DIST_INST_DIR)/bin/ghc --make HelloWorld
46 $(CONTEXT_DIFF) output expected_output
47 $(BIN_DIST_INST_DIR)/bin/ghc-pkg check
50 $(RM) -rf $(BIN_DIST_INST_SUBDIR)
52 $(RM) HelloWorld HelloWorld.o HelloWorld.hi output
54 # Ignore a load of other standard targets
55 install install-docs doc: