Skip to content
Browse files

Add 'cabal-install' make target and some more Makefile fixes.

  • Loading branch information...
1 parent bdccd21 commit 0f346e69483554a0b144710450b067c7f6fadc9e @nominolo nominolo committed Dec 8, 2008
Showing with 22 additions and 7 deletions.
  1. +17 −5 Makefile
  2. +5 −2 config.mk.sample
View
22 Makefile
@@ -10,6 +10,8 @@ SETUP_DIST = setup-dist
SETUP_CONFIG = $(DIST)/setup-config
SETUP = $(SETUP_DIST)/Setup
+CABAL_INSTALL_OPTS += --ghc --with-compiler=$(HC) --with-hc-pkg=$(PKG)
+
main: build
setup: $(SETUP)
@@ -33,7 +35,7 @@ test: build
# ./dist/build/test_get_imports/test_get_imports $(GHC_PATH)/compiler dist-stage2 +RTS -s -RTS
clean:
- $(SETUP) clean
+ $(SETUP) clean || rm -rf $(DIST)
distclean: clean
rm -rf $(SETUP_DIST)
@@ -42,7 +44,17 @@ doc:
$(SETUP) haddock --with-haddock=$(HADDOCK)
printvars:
- @echo "GHC_PATH = $(GHC_PATH)"
- @echo "HC = $(HC)"
- @echo "PKG = $(PKG)"
- @echo "HADDOCK = $(HADDOCK)"
+ @echo "UseInplaceGhc = $(UseInplaceGhc)"
+ @echo "GHC_PATH = $(GHC_PATH)"
+ @echo "HC = $(HC)"
+ @echo "PKG = $(PKG)"
+ @echo "HADDOCK = $(HADDOCK)"
+ @echo "CABAL_INSTALL = $(CABAL_INSTALL)"
+ @echo " ..._OPTS = $(CABAL_INSTALL_OPTS)"
+ @echo "---------------------------------------------------------------"
+ @echo "DIST = $(DIST)"
+ @echo "SETUP_CONFIG = $(SETUP_CONFIG)"
+ @echo "SETUP_DIST = $(SETUP_DIST)"
+
+cabal-install:
+ $(CABAL_INSTALL) install $(CABAL_INSTALL_OPTS)
View
7 config.mk.sample
@@ -4,13 +4,13 @@
# As Scion depends on features or bugfixes of GHC's HEAD branch, by
# default we assume that we use an inplace GHC.
-UseInplaceGhc = "NO"
+UseInplaceGhc = NO
# ----------------------------------------------------------------------
ifeq "$(UseInplaceGhc)" "YES"
-GHC_PATH = ../ghc
+GHC_PATH = /absolute/path/to/ghc
else
@@ -19,3 +19,6 @@ PKG = ghc-pkg
HADDOCK = haddock
endif
+
+# path to 'cabal' program from the 'cabal-install' tool.
+CABAL_INSTALL = cabal

0 comments on commit 0f346e6

Please sign in to comment.
Something went wrong with that request. Please try again.