Do the building and installing of hsc2hs with the stage1 compiler
authorIan Lynagh <igloo@earth.li>
Thu, 17 Jul 2008 15:04:20 +0000 (15:04 +0000)
committerIan Lynagh <igloo@earth.li>
Thu, 17 Jul 2008 15:04:20 +0000 (15:04 +0000)
utils/Makefile
utils/hsc2hs/Makefile

index 72bb31a..26e751f 100644 (file)
@@ -3,12 +3,12 @@ include $(TOP)/mk/boilerplate.mk
 
 ifeq "$(DOING_BIN_DIST)" "YES"
 # We're doing a binary-dist, descend into a subset of the dirs.
-SUBDIRS = mkdirhier ghc-pkg hasktags hp2ps hsc2hs parallel unlit runghc hpc pwd
+SUBDIRS = mkdirhier ghc-pkg hasktags hp2ps parallel unlit runghc hpc pwd
 else
 ifeq "$(BootingFromHc)" "YES"
 SUBDIRS = mkdependC mkdirhier runstdtest genapply genprimopcode ghc-pkg unlit
 else
-SUBDIRS = mkdependC mkdirhier runstdtest ghc-pkg hasktags hp2ps hsc2hs \
+SUBDIRS = mkdependC mkdirhier runstdtest ghc-pkg hasktags hp2ps \
          installPackage parallel unlit genprimopcode genapply runghc hpc pwd
 endif
 ifneq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
@@ -53,3 +53,14 @@ boot ::
        $(MAKE) -C genprimopcode
 endif
 
+boot ::
+       $(MAKE) -C hsc2hs with-bootstrapping-compiler
+
+ifneq "$(NO_INSTALL_HSC2HS)" "YES"
+all ::
+       $(MAKE) -C hsc2hs with-stage-1
+
+install ::
+       $(MAKE) -C hsc2hs install
+endif
+
index b26562b..66fb9de 100644 (file)
@@ -13,25 +13,30 @@ else
 INSTALL_FLAGS = --enable-shell-wrappers
 endif
 
-boot:
-       $(CABAL) configure --distpref dist-inplace \
+default all: with-bootstrapping-compiler
+
+with-bootstrapping-compiler:
+       $(CABAL) configure --distpref dist-inplace         \
                           $(INPLACE_DIRS_CONFIGURE_FLAGS) \
-                          $(USE_BOOT_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 \
-#                         $(INPLACE_DIRS_CONFIGURE_FLAGS) \
-#                         $(USE_STAGE1_CONFIGURE_FLAGS) \
-#                         $(COMMON_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