Do the building and installing of hsc2hs with the stage1 compiler
[ghc-hetmet.git] / utils / hsc2hs / Makefile
index 699aa80..66fb9de 100644 (file)
@@ -7,28 +7,36 @@ include $(TOP)/mk/cabal-flags.mk
 #     that are not -Wall clean!
 # SRC_HC_OPTS      += -Wall
 
-CABAL = $(FPTOOLS_TOP_ABS)/libraries/cabal-bin \
-            $(GHC) $(FPTOOLS_TOP_ABS)/libraries/bootstrapping.conf
-
 ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32"
 INSTALL_FLAGS =
 else
 INSTALL_FLAGS = --enable-shell-wrappers
 endif
 
-boot:
-       $(CABAL) configure --distpref dist-inplace $(INPLACE_CONFIGURE_FLAGS)
+default all: with-bootstrapping-compiler
+
+with-bootstrapping-compiler:
+       $(CABAL) configure --distpref dist-inplace         \
+                          $(INPLACE_DIRS_CONFIGURE_FLAGS) \
+                          $(USE_BOOT_CONFIGURE_FLAGS)     \
+                          $(COMMON_CONFIGURE_FLAGS)
        $(CABAL) build     --distpref dist-inplace $(BUILD_FLAGS)
        $(CABAL) install   --distpref dist-inplace $(INSTALL_FLAGS)
 
-ifneq "$(NO_INSTALL_HSC2HS)" "YES"
-# XXX
-#all:
-#      $(CABAL) configure --distpref dist-install $(INSTALL_CONFIGURE_FLAGS)
-#      $(CABAL) build     --distpref dist-install $(BUILD_FLAGS)
-endif
-
-all:
+with-stage-1:
+       $(CABAL) configure --distpref dist-install         \
+                          $(INSTALL_DIRS_CONFIGURE_FLAGS) \
+                          $(USE_STAGE1_CONFIGURE_FLAGS)   \
+                          $(COMMON_CONFIGURE_FLAGS)
+       $(CABAL) build     --distpref dist-install $(BUILD_FLAGS)
+
+install:
+       $(INSTALL_PACKAGE) install UNUSED UNUSED '$(DESTDIR)' '$(prefix)' \
+                          '$(prefix)' '$(bindir)' '$(libdir)'            \
+                       '$(libexecdir)' '$(dynlibdir)' '$(datadir)'    \
+                       '$(docdir)' '$(htmldir)' '$(haddockdir)'
+                          --distpref dist-install                        \
+                          $(INSTALL_FLAGS)
 
 clean: distclean