46041716fdf0379af4b27823af4a2a601cdf686b
[ghc-hetmet.git] / utils / hsc2hs / Makefile
1
2 TOP=../..
3 include $(TOP)/mk/boilerplate.mk
4 include $(TOP)/mk/cabal-flags.mk
5
6 SRC_HC_OPTS      += -Wall
7
8 CABAL = $(FPTOOLS_TOP_ABS)/libraries/cabal-bin \
9             $(GHC) $(FPTOOLS_TOP_ABS)/libraries/bootstrapping.conf
10
11 ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32"
12 INSTALL_FLAGS =
13 else
14 INSTALL_FLAGS = --enable-shell-wrappers
15 endif
16
17 boot:
18         $(CABAL) configure --distpref dist-inplace $(INPLACE_CONFIGURE_FLAGS)
19         $(CABAL) build     --distpref dist-inplace $(BUILD_FLAGS)
20         $(CABAL) install   --distpref dist-inplace $(INSTALL_FLAGS)
21
22 ifneq "$(NO_INSTALL_HSC2HS)" "YES"
23 # XXX
24 #all:
25 #       $(CABAL) configure --distpref dist-install $(INSTALL_CONFIGURE_FLAGS)
26 #       $(CABAL) build     --distpref dist-install $(BUILD_FLAGS)
27 endif
28
29 all:
30
31 clean: distclean
32
33 distclean:
34         -$(CABAL) clean --distpref dist-inplace
35         -$(CABAL) clean --distpref dist-install
36
37 # XXX fix:
38 #binary-dist:
39 #       $(INSTALL_DIR)                      $(BIN_DIST_DIR)/utils/hsc2hs
40 #       $(INSTALL_DATA)    Makefile         $(BIN_DIST_DIR)/utils/hsc2hs/
41 #       $(INSTALL_DATA)    hsc2hs.sh        $(BIN_DIST_DIR)/utils/hsc2hs/
42 #       $(INSTALL_DATA)    $(INSTALL_DATAS) $(BIN_DIST_DIR)/utils/hsc2hs/
43 #       $(INSTALL_PROGRAM) $(HS_PROG)       $(BIN_DIST_DIR)/utils/hsc2hs/
44