c14a08577bb250b1b126842650a5c8f633fa2d1e
[ghc-hetmet.git] / bindisttest / Makefile
1
2 .PHONY: default_target
3
4 default_target: all
5
6 # Ideally we'd just include something to give us variables
7 # for paths and arguments to tools etc, and those set in mk/build.mk.
8 TOP=..
9 include $(TOP)/mk/boilerplate.mk
10
11 all:
12         $(RM) -rf $(BIN_DIST_INST_SUBDIR)
13         $(RM) -rf ghc*
14         $(RM) HelloWorld HelloWorld.o HelloWorld.hi output
15         # --force-local makes tar not think that c:/foo refers to a remote file
16         $(TAR) --force-local -jxf $(FPTOOLS_TOP_ABS)/$(BIN_DIST_TAR_BZ2)
17 ifeq "$(Windows)" "YES"
18         mv $(BIN_DIST_NAME) $(BIN_DIST_INST_DIR)
19 else
20         cd $(BIN_DIST_NAME) && ./configure --prefix=$(BIN_DIST_INST_DIR)
21         cd $(BIN_DIST_NAME) && make install
22 endif
23         $(BIN_DIST_INST_DIR)/bin/ghc --make HelloWorld
24         ./HelloWorld > output
25         $(CONTEXT_DIFF) output expected_output
26
27 clean distclean:
28         $(RM) -rf $(BIN_DIST_INST_SUBDIR)
29         $(RM) -rf ghc*
30         $(RM) HelloWorld HelloWorld.o HelloWorld.hi output
31
32 # Ignore a load of other standard targets
33 install install-docs doc:
34         @:
35