Permalink
Browse files

Update make test-sdist

  • Loading branch information...
1 parent a2524b5 commit 2aa4d9f8965bd5f3c46be74a421cd49e3b3f58bc JeanPhilippe.bernardy@gmail.com committed Jan 12, 2008
Showing with 16 additions and 32 deletions.
  1. +15 −31 Makefile
  2. +1 −1 cabal-make.inc
View
@@ -34,45 +34,29 @@ CONTRIBUTORS: Contributors _darcs/patches/*
darcs changes | ./Contributors > $@
-dists:
- make sdist
- make -C packages/yi-vty sdist
- make -C packages/yi-gtk sdist
+dist/yi-$(version).tar.gz:
+ make sdist # does not work atm
+
+test_prefix := $(shell pwd)/hackage
+
+test-dist: dist/yi-$(version).tar.gz
rm -fr hackage
mkdir -p hackage
cp dist/yi-$(version).tar.gz hackage
- cp packages/yi-vty/dist/yi-vty-$(version).tar.gz hackage
- cp packages/yi-gtk/dist/yi-gtk-$(version).tar.gz hackage
-
-test-dists:
- -ghc-pkg --user unregister yi-gtk
- -ghc-pkg --user unregister yi-vty
-
- cd hackage;\
- tar -zxvf yi-$(version).tar.gz;\
- tar -zxvf yi-vty-$(version).tar.gz;\
- tar -zxvf yi-gtk-$(version).tar.gz;\
- cd yi-$(version);\
- runghc Setup.hs configure --user --prefix=$(prefix);\
- runghc Setup.hs build --with-ghc=/usr/bin/ghc;\
- runghc Setup.hs install;\
- cd ..;\
- cd yi-vty-$(version);\
- runghc Setup.hs configure --user --prefix=$(prefix);\
- runghc Setup.hs build;\
- runghc Setup.hs install;\
- cd ..;\
- cd yi-gtk-$(version);\
- runghc Setup.hs configure --user --prefix=$(prefix);\
- runghc Setup.hs build;\
- runghc Setup.hs install;\
+ cd hackage &&\
+ tar zxvf yi-$(version).tar.gz &&\
+ cd yi-$(version) &&\
+ runghc Setup.hs configure --user --prefix=$(test_prefix) &&\
+ runghc Setup.hs build &&\
+ runghc Setup.hs install &&\
cd ..;\
+
test-gtk:
- $(prefix)/bin/yi -fvty
+ $(test_prefix)/bin/yi -fvty
test-vty:
- $(prefix)/bin/yi -fgtk
+ $(test_prefix)/bin/yi -fgtk
View
@@ -123,7 +123,7 @@ clean:
rm -rf dist
rm -f $(cabal_config) .installed-pkg-config ./setup `find . -name '*.hi' -o -name '*.o'`
-version ?= $(strip $(shell cat *.cabal | egrep -i 'version:' | sed -e 's/version://I'))
+version ?= $(strip $(shell cat *.cabal | egrep -i '^version:' | sed -e 's/version://I'))
show-version:
@echo $(version)

0 comments on commit 2aa4d9f

Please sign in to comment.