Add a header to all build system files:
[ghc.git] / bindisttest / Makefile
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 .PHONY: default_target
14
15 default_target: all
16
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.
19 TOP=..
20 include $(TOP)/mk/config.mk
21
22 all:
23 $(RM) -rf $(BIN_DIST_INST_SUBDIR)
24 $(RM) -rf ghc*
25 $(RM) HelloWorld HelloWorld.o HelloWorld.hi output
26 # --force-local makes tar not think that c:/foo refers to a remote file
27 $(TAR) --force-local -jxf $(BIN_DIST_TAR_BZ2)
28 ifeq "$(Windows)" "YES"
29 mv $(BIN_DIST_NAME) $(BIN_DIST_INST_DIR)
30 else
31 cd $(BIN_DIST_NAME) && ./configure --prefix=$(BIN_DIST_INST_DIR)
32 cd $(BIN_DIST_NAME) && make install
33 endif
34 $(BIN_DIST_INST_DIR)/bin/ghc --make HelloWorld
35 ./HelloWorld > output
36 $(CONTEXT_DIFF) output expected_output
37
38 clean distclean:
39 $(RM) -rf $(BIN_DIST_INST_SUBDIR)
40 $(RM) -rf ghc*
41 $(RM) HelloWorld HelloWorld.o HelloWorld.hi output
42
43 # Ignore a load of other standard targets
44 install install-docs doc:
45 @:
46