Permalink
Browse files

Add --user option.

darcs-hash:20081127140914-c1071-4f168d38b40c127cc6d0a3d1f6c7a732949a13e1.gz
  • Loading branch information...
1 parent 1851b6f commit 0ed1b402ec954595daad959bc739fd622311445a @shelarcy shelarcy committed Nov 27, 2008
Showing with 14 additions and 2 deletions.
  1. +12 −0 configure
  2. +2 −2 makefile.lib
View
@@ -32,6 +32,7 @@ hcflags=""
hcpkg="ghc-pkg"
hcopt=""
hcprof="-prof"
+hcpkgopt=""
hcpkglocal=""
hdoc="haddock"
@@ -286,6 +287,7 @@ process_args ()
echo " --hcprof=<flags> enable profiling (using flags [$hcprof])"
echo " --fvia-C use -fvia-C option"
echo " --package-conf=<file> optional local package configuration [$hcpkglocal]"
+ echo " --user use current user's local package database"
echo " --version=<version> library version [$version]"
echo " --release=<version> library release version [$release]"
echo " --cache expands into previous configure options"
@@ -342,6 +344,15 @@ process_args ()
enableprof="yes";;
-package-conf=*|--package-conf=*)
hcpkglocal="$arg";;
+ -user|--user)
+ hcpkgopt="--user";;
+ # I don't know why macosx-app doesn't work when use .cabal location.
+ # if test -d "$HOME/.cabal"; then
+ # prefix="$HOME/.cabal/lib/wxhaskell"
+ # execprefix="$prefix"
+ # libprefix="$prefix"
+ # sharedprefix="$prefix/share"
+ # fi;;
-version=*|--version=*)
version="$arg";;
-release=*|--release=*)
@@ -937,6 +948,7 @@ HCNAME=$hcname
HCBASENAME=$hcbasename
HCFLAGS=$hcflags
HCPKG=$hcpkg
+HCPKGOPT=$hcpkgopt
GHCOLD=$ghcold
ENABLE-PROF=$enableprof
ENABLE-SPLITOBJS=$enablesplitobjs
View
@@ -214,8 +214,8 @@ uninstall-files =$(call uninstall-filesx,$(2),$(call relative-fromto,$(patsubst
# install packages
# usage: $(call install-pkg,<install dir>,<package file>)
# usage: $(call uninstall-pkg,<package name>)
-install-pkg=cat $(2) | sed -e "s|\$${wxhlibdir}|$(1)|" | $(HCPKG) update -
-uninstall-pkg=if $(call run-silent,$(HCPKG) describe $(1)); then echo "unregister package: $(1)" && $(HCPKG) unregister $(1); fi
+install-pkg=cat $(2) | sed -e "s|\$${wxhlibdir}|$(1)|" | $(HCPKG) $(HCPKGOPT) update -
+uninstall-pkg=if $(call run-silent,$(HCPKG) $(HCPKGOPT) describe $(1)); then echo "unregister package: $(1)" && $(HCPKG) $(HCPKGOPT) unregister $(1); fi
#--------------------------------------------------------------------------

0 comments on commit 0ed1b40

Please sign in to comment.