Permalink
Browse files

Revert to using a single .cabal file and update README.

  • Loading branch information...
1 parent d763be7 commit f8e5274708303cfc6b89f40724045c9893fd0ec3 @nominolo committed Aug 26, 2009
Showing with 271 additions and 289 deletions.
  1. +20 −58 Makefile
  2. +129 −79 README.markdown
  3. +0 −62 lib/scion.cabal
  4. +0 −55 scion-server.cabal
  5. +122 −0 scion.cabal
  6. +0 −35 server/scion-server.cabal
View
@@ -22,65 +22,41 @@ CABAL_INSTALL_OPTS += --ghc --with-compiler=$(HC) --with-hc-pkg=$(PKG)
CABAL_FLAGS ?=
# -ftesting
-$(DIST):
- mkdir $(DIST)
+$(DIST)/setup-config: $(SETUP) scion.cabal $(DIST)
+ $(SETUP) configure -v --builddir=$(DIST) \
+ --with-compiler=$(HC) --with-hc-pkg=$(PKG) \
+ --user $(CABAL_FLAGS) > $(DIST)/lib-config-log
-$(DIST_LIB)/setup-config: $(SETUP) lib/scion.cabal $(DIST)
- @echo === Configuring scion ===
- @echo Configure log: $(DIST)/lib-config-log
- @cd lib && \
- ($(DOTDOTSETUP) configure -v --builddir=../$(DIST_LIB) \
- --with-compiler=$(HC) --with-hc-pkg=$(PKG) \
- --user $(CABAL_FLAGS)> ../$(DIST)/lib-config-log)
-
-$(DIST_SERVER)/setup-config: $(SETUP) server/scion-server.cabal $(DIST) $(DIST_LIB)/.installed_tag
- @echo === Configuring scion-server ===
- @echo Configure log: $(DIST)/server-config-log
- @cd server && \
- ($(DOTDOTSETUP) configure -v --builddir=../$(DIST_SERVER) \
- --with-compiler=$(HC) --with-hc-pkg=$(PKG) \
- --user $(CABAL_FLAGS) > ../$(DIST)/server-config-log)
-
-$(DIST_LIB)/build/libHSscion-0.1.a: $(SETUP) $(DIST_LIB)/setup-config $(wildcard lib/**/*.hs lib/**/**/*.hs)
+$(DIST)/build/libHSscion-0.1.a: $(SETUP) $(DIST)/setup-config $(wildcard lib/**/*.hs lib/**/**/*.hs server/**/*.hs)
@echo === Building scion ===
- @cd lib && \
- $(DOTDOTSETUP) build --builddir=../$(DIST_LIB)
-
-$(DIST_LIB)/.installed_tag: $(DIST_LIB)/build/libHSscion-0.1.a $(SETUP)
- @echo === Installing scion ===
- @cd lib && $(DOTDOTSETUP) install --user --builddir=../$(DIST_LIB)
- @touch $@
+ $(SETUP) build --builddir=$(DIST)
-$(DIST_SERVER)/build/scion_server/scion_server: $(DIST_LIB)/.installed_tag server/Main.hs $(wildcard server/Scion/Server/*.hs server/Scion/Server/**/*.hs)
- @echo === Installing Server ===
- @cd server && cabal install --user
-
-# $(DIST_SERVER)/build/scion_server/scion_server: $(SETUP) $(DIST_SERVER)/setup-config server/Main.hs $(wildcard server/Scion/Server/*.hs server/Scion/Server/**/*.hs)
-# @echo === Building scion-server ===
-# @cd server && \
-# $(DOTDOTSETUP) build --builddir=../$(DIST_SERVER)
-
-# $(SETUP): Setup.hs
-# @echo === Building Setup ===
-# @mkdir -p $(SETUP_DIST)
-# @$(HC) --make -odir $(SETUP_DIST) -hidir $(SETUP_DIST) -o $@ $<
+$(DIST):
+ mkdir $(DIST)
+$(SETUP): Setup.hs $(SETUP_DIST)
+ $(HC) --make $< -o $@
+$(SETUP_DIST):
+ mkdir $@
setup: $(SETUP)
-build: $(DIST_LIB)/build/libHSscion-0.1.a $(DIST_SERVER)/build/scion_server/scion_server
+build: $(DIST)/build/libHSscion-0.1.a
+
+# TODO: dodgy
+install: $(DIST)/build/libHSscion-0.1.a
+ cabal install
# test: build
# echo main | $(HC) --interactive -package ghc -DDEBUG -isrc -idist/build tests/RunTests.hs
# # ./dist/build/test_get_imports/test_get_imports $(GHC_PATH)/compiler dist-stage2 +RTS -s -RTS
clean:
- @(cd lib && $(DOTDOTSETUP) clean --builddir=../$(DIST_LIB)) || rm -rf $(DIST_LIB)
- @(cd server && $(DOTDOTSETUP) clean --builddir=../$(DIST_SERVER)) || rm -rf $(DIST_SERVER)
+ $(SETUP) clean --builddir=$(DIST) || rm -rf $(DIST)
-# distclean: clean
-# rm -rf $(SETUP_DIST)
+distclean: clean
+ rm -rf $(SETUP_DIST)
# doc: configure
# $(SETUP) haddock --with-haddock=$(HADDOCK)
@@ -97,17 +73,3 @@ printvars:
@echo "---------------------------------------------------------------"
@echo "DIST_LIB = $(DIST_LIB)"
@echo "SETUP_DIST = $(SETUP_DIST)"
-
-install-deps:
- cabal install --with-compiler=$(HC) --with-hc-pkg=$(PKG) ghc-paths
- cabal install --with-compiler=$(HC) --with-hc-pkg=$(PKG) ghc-syb
- cabal install --with-compiler=$(HC) --with-hc-pkg=$(PKG) multiset
- cabal install --with-compiler=$(HC) --with-hc-pkg=$(PKG) time
- cabal install --with-compiler=$(HC) --with-hc-pkg=$(PKG) uniplate
-
-
-# cabal-install:
-# $(CABAL_INSTALL) install $(CABAL_INSTALL_OPTS) $(CABAL_FLAGS)
-
-# run-emacs: build
-# ./$(DIST)/build/scion_emacs/scion_emacs
Oops, something went wrong.

0 comments on commit f8e5274

Please sign in to comment.