Skip to content

Commit

Permalink
Add dummy package to populate setup-exe-cache for build-type Configure.
Browse files Browse the repository at this point in the history
  • Loading branch information
valderman committed Jul 28, 2015
1 parent e1a73d0 commit 7376ecd
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packagelibs.sh
Expand Up @@ -3,5 +3,5 @@
if [[ $1 == "" ]] ; then
echo "Usage: ./packagelibs.sh version"
else
tar -cjf haste-libs-$1.tar.bz2 --exclude-backups '--exclude=*.hi' '--exclude=*.o' include libraries/rts.pkg libraries/haste-lib/{haste-lib.cabal,src/{Haste.hs,Haste},LICENSE} libraries/time libraries/ghc-7.8/{array/{array.cabal,Data,include,LICENSE,Setup.hs},base/{base.cabal,Control,Data,Debug,Foreign,Foreign.hs,GHC,Haste,include,LICENSE,Numeric.hs,Prelude.hs,Setup.hs,System,Text,Unsafe},ghc-prim/{ghc-prim.cabal,GHC,LICENSE,packageconfig},integer-gmp/{integer-gmp.cabal,GHC,LICENSE,Setup.hs}}
tar -cjf haste-libs-$1.tar.bz2 --exclude-backups '--exclude=*.hi' '--exclude=*.o' include popcache/{configure,LICENSE,haste-populate-configure.cabal,Setup.hs} libraries/rts.pkg libraries/haste-lib/{haste-lib.cabal,src/{Haste.hs,Haste},LICENSE} libraries/time libraries/ghc-7.8/{array/{array.cabal,Data,include,LICENSE,Setup.hs},base/{base.cabal,Control,Data,Debug,Foreign,Foreign.hs,GHC,Haste,include,LICENSE,Numeric.hs,Prelude.hs,Setup.hs,System,Text,Unsafe},ghc-prim/{ghc-prim.cabal,GHC,LICENSE,packageconfig},integer-gmp/{integer-gmp.cabal,GHC,LICENSE,Setup.hs}}
fi
Empty file added popcache/LICENSE
Empty file.
2 changes: 2 additions & 0 deletions popcache/Setup.hs
@@ -0,0 +1,2 @@
import Distribution.Simple
main = defaultMain
Empty file added popcache/configure
Empty file.
24 changes: 24 additions & 0 deletions popcache/haste-populate-configure.cabal
@@ -0,0 +1,24 @@
-- Initial haste-populate-configure.cabal generated by cabal init. For
-- further documentation, see http://haskell.org/cabal/users-guide/

name: haste-populate-configure
version: 0.1.0.0
synopsis: Dummy package with build type configure for populating setup-exe-cache.
-- description:
license: PublicDomain
license-file: LICENSE
author: Anton Ekblad
maintainer: anton@ekblad.cc
-- copyright:
-- category:
build-type: Simple
-- extra-source-files:
cabal-version: >=1.10

library
-- exposed-modules:
-- other-modules:
-- other-extensions:
build-depends: base >=4.7 && <4.8
-- hs-source-dirs:
default-language: Haskell2010
3 changes: 3 additions & 0 deletions src/haste-boot.hs
Expand Up @@ -131,6 +131,8 @@ bootHaste cfg tmpdir = inDirectory tmpdir $ do
when (populateSetupExeCache cfg) $ do
void $ run "cabal" ["update"] ""
void $ run "cabal" ["install", "-j", "populate-setup-exe-cache"] ""
inDirectory "popcache" . void $ run "cabal" ["install", "-j"] ""
void $ run "ghc-pkg" ["unregister", "haste-populate-configure"] ""
void $ run "ghc-pkg" ["unregister", "populate-setup-exe-cache"] ""
when (not $ useLocalLibs cfg) $ do
fetchLibs tmpdir
Expand Down Expand Up @@ -224,6 +226,7 @@ buildLibs cfg = do
-- Install time
inDirectory "time" $ do
run_ "autoreconf" [] ""
run_ "cabal" ["configure"] ""
hasteCabal ("install" : ghcOpts)

-- Export monads-tf; it seems to be hidden by default
Expand Down

0 comments on commit 7376ecd

Please sign in to comment.