Define CABAL in mk/cabal-flags.mk, rather than everywhere we use it
[ghc-hetmet.git] / utils / hsc2hs / Makefile
1
2 TOP=../..
3 include $(TOP)/mk/boilerplate.mk
4 include $(TOP)/mk/cabal-flags.mk
5
6 # XXX We would like to turn this on, but Cabal generates paths files
7 #     that are not -Wall clean!
8 # SRC_HC_OPTS      += -Wall
9
10 ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32"
11 INSTALL_FLAGS =
12 else
13 INSTALL_FLAGS = --enable-shell-wrappers
14 endif
15
16 boot:
17         $(CABAL) configure --distpref dist-inplace $(INPLACE_CONFIGURE_FLAGS)
18         $(CABAL) build     --distpref dist-inplace $(BUILD_FLAGS)
19         $(CABAL) install   --distpref dist-inplace $(INSTALL_FLAGS)
20
21 ifneq "$(NO_INSTALL_HSC2HS)" "YES"
22 # XXX
23 #all:
24 #       $(CABAL) configure --distpref dist-install $(INSTALL_CONFIGURE_FLAGS)
25 #       $(CABAL) build     --distpref dist-install $(BUILD_FLAGS)
26 endif
27
28 all:
29
30 clean: distclean
31
32 distclean:
33         -$(CABAL) clean --distpref dist-inplace
34         -$(CABAL) clean --distpref dist-install
35
36 # XXX fix:
37 #binary-dist:
38 #       $(INSTALL_DIR)                      $(BIN_DIST_DIR)/utils/hsc2hs
39 #       $(INSTALL_DATA)    Makefile         $(BIN_DIST_DIR)/utils/hsc2hs/
40 #       $(INSTALL_DATA)    hsc2hs.sh        $(BIN_DIST_DIR)/utils/hsc2hs/
41 #       $(INSTALL_DATA)    $(INSTALL_DATAS) $(BIN_DIST_DIR)/utils/hsc2hs/
42 #       $(INSTALL_PROGRAM) $(HS_PROG)       $(BIN_DIST_DIR)/utils/hsc2hs/
43