Skip to content

Commit

Permalink
Add 'cabal-install' make target and some more Makefile fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
nominolo committed Dec 8, 2008
1 parent bdccd21 commit 0f346e6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
22 changes: 17 additions & 5 deletions Makefile
Expand Up @@ -10,6 +10,8 @@ SETUP_DIST = setup-dist
SETUP_CONFIG = $(DIST)/setup-config SETUP_CONFIG = $(DIST)/setup-config
SETUP = $(SETUP_DIST)/Setup SETUP = $(SETUP_DIST)/Setup


CABAL_INSTALL_OPTS += --ghc --with-compiler=$(HC) --with-hc-pkg=$(PKG)

main: build main: build


setup: $(SETUP) setup: $(SETUP)
Expand All @@ -33,7 +35,7 @@ test: build
# ./dist/build/test_get_imports/test_get_imports $(GHC_PATH)/compiler dist-stage2 +RTS -s -RTS # ./dist/build/test_get_imports/test_get_imports $(GHC_PATH)/compiler dist-stage2 +RTS -s -RTS


clean: clean:
$(SETUP) clean $(SETUP) clean || rm -rf $(DIST)


distclean: clean distclean: clean
rm -rf $(SETUP_DIST) rm -rf $(SETUP_DIST)
Expand All @@ -42,7 +44,17 @@ doc:
$(SETUP) haddock --with-haddock=$(HADDOCK) $(SETUP) haddock --with-haddock=$(HADDOCK)


printvars: printvars:
@echo "GHC_PATH = $(GHC_PATH)" @echo "UseInplaceGhc = $(UseInplaceGhc)"
@echo "HC = $(HC)" @echo "GHC_PATH = $(GHC_PATH)"
@echo "PKG = $(PKG)" @echo "HC = $(HC)"
@echo "HADDOCK = $(HADDOCK)" @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)
7 changes: 5 additions & 2 deletions config.mk.sample
Expand Up @@ -4,13 +4,13 @@
# As Scion depends on features or bugfixes of GHC's HEAD branch, by # As Scion depends on features or bugfixes of GHC's HEAD branch, by
# default we assume that we use an inplace GHC. # default we assume that we use an inplace GHC.


UseInplaceGhc = "NO" UseInplaceGhc = NO


# ---------------------------------------------------------------------- # ----------------------------------------------------------------------


ifeq "$(UseInplaceGhc)" "YES" ifeq "$(UseInplaceGhc)" "YES"


GHC_PATH = ../ghc GHC_PATH = /absolute/path/to/ghc


else else


Expand All @@ -19,3 +19,6 @@ PKG = ghc-pkg
HADDOCK = haddock HADDOCK = haddock


endif endif

# path to 'cabal' program from the 'cabal-install' tool.
CABAL_INSTALL = cabal

0 comments on commit 0f346e6

Please sign in to comment.