Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[wxhaskell-from-cvs @ 2003-10-17 12:33:13 by dleijen]

Fixed makefile trouble when installing packages.

darcs-hash:20031017123314-deb31-7601bf546643ff5af81fcf570b00d68efbdcd16d.gz
  • Loading branch information...
commit 0ffff70e07eedd38753d715ffaa4f4dcc3a5829d 1 parent 269b4b7
dleijen authored
View
4 bin/macosx-postinstall
@@ -1,3 +1,3 @@
#!/bin/sh
-env installdir="$(LIBDIR)" /usr/local/bin/ghc-pkg -u -i "$1/Contents/Resources/wxcore.pkg"
-env installdir="$(LIBDIR)" /usr/local/bin/ghc-pkg -u -i "$1/Contents/Resources/wx.pkg"
+env wxhlibdir="$(LIBDIR)/lib" /usr/local/bin/ghc-pkg -u -i "$1/Contents/Resources/wxcore.pkg"
+env wxhlibdir="$(LIBDIR)/lib" /usr/local/bin/ghc-pkg -u -i "$1/Contents/Resources/wx.pkg"
View
13 bin/wxhaskell-register
@@ -38,17 +38,20 @@ while : ; do
shift
done
+# set libdir/bindir
+libdir="${installdir}/lib"
+bindir="${installdir}/bin"
# test if package files are found.
-if test ! -e "${installdir}/bin/wx.pkg"; then
+if test ! -e "${bindir}/wx.pkg"; then
echo "error: " 1>&2
- echo " Unable to find wxhaskell packages: ${installdir}/bin/wx.pkg" 1>&2
+ echo " Unable to find wxhaskell packages: ${bindir}/wx.pkg" 1>&2
echo " Please specify the installation directory on the command line." 1>&2
- echo " For example: wxhaskell-register --installdir=/usr/local/lib" 1>&2
+ echo " For example: wxhaskell-register --installdir=/usr/local/wxhaskell" 1>&2
echo "" 1>&2
exit 2
fi
# register the packages.
-env installdir=${installdir} ghc-pkg -u -i ${installdir}/wxcore.pkg
-env installdir=${installdir} ghc-pkg -u -i ${installdir}/wx.pkg
+env wxhlibdir=${libdir} ghc-pkg -u -i ${bindir}/wxcore.pkg
+env wxhlibdir=${libdir} ghc-pkg -u -i ${bindir}/wx.pkg
View
1  bin/wxhaskell-register-template.bat
@@ -19,6 +19,7 @@ IF NOT EXIST %installdir%\bin\wx.pkg GOTO notfound
:install
ECHO - register packages
+SET wxhlibdir=%installdir%\lib
ghc-pkg -u -i "%installdir%\bin\wxcore.pkg"
ghc-pkg -u -i "%installdir%\bin\wx.pkg"
View
19 bin/wxhaskell-unregister-template.bat
@@ -4,19 +4,8 @@ IF "%1"=="" GOTO noarg
IF "%1"=="--help" GOTO help
IF "%1"=="-?" GOTO help
IF "%1"=="/?" GOTO help
-GOTO installarg
-
-:installarg
-SET installdir=%1
-GOTO check
:noarg
-SET installdir=%CD%\..
-GOTO check
-
-:check
-IF NOT EXIST %installdir%\bin\wx.pkg GOTO notfound
-
ECHO uninstall wxhaskell:
ECHO - unregister packages
@@ -44,14 +33,6 @@ ECHO - done! You can now safely remove the wxhaskell install directory.
ECHO.
GOTO end
-:notfound
-ECHO error:
-ECHO Unable to find the wxHaskell packages (wx.pkg). You have already
-ECHO uninstalled wxHaskell or are trying to uninstall from another
-ECHO directory than the install directory.
-ECHO.
-GOTO help
-
:help
ECHO usage:
ECHO wxhaskell-unregister [^<installdir^>]
View
14 configure
@@ -8,7 +8,7 @@
# See license.txt for details.
#------------------------------------------------------------------------
-# $Id: configure,v 1.20 2003/10/15 18:34:42 dleijen Exp $
+# $Id: configure,v 1.21 2003/10/17 12:33:13 dleijen Exp $
#--------------------------------------------------------------------
# Variables
@@ -625,8 +625,8 @@ echo " - config/wxcore.pkg"
cat > config/wxcore.pkg << EOF
Package
{ name="wxcore"
- , import_dirs=["\${installdir}/lib/imports"]
- , library_dirs=["\${installdir}/lib"]
+ , import_dirs=["\${wxhlibdir}/imports"]
+ , library_dirs=["\${wxhlibdir}"]
, hs_libraries=["wxcore","wxcore0"]
, extra_libraries=["$wxclibname"]
, package_deps = ["base","data"]
@@ -638,8 +638,8 @@ echo " - config/wx.pkg"
cat > config/wx.pkg << EOF
Package
{ name="wx"
- , import_dirs=["\${installdir}/lib/imports"]
- , library_dirs=["\${installdir}/lib"]
+ , import_dirs=["\${wxhlibdir}"]
+ , library_dirs=["\${wxhlibdir}"]
, hs_libraries=["wx"]
, package_deps=["wxcore"]
}
@@ -701,8 +701,8 @@ EOF
echo " - config/macosx-postinstall"
cat > config/macosx-postinstall << EOF
#!/bin/sh
-env installdir="$libdir" /usr/local/bin/ghc-pkg -u -i "\$1/Contents/Resources/wxcore.pkg"
-env installdir="$libdir" /usr/local/bin/ghc-pkg -u -i "\$1/Contents/Resources/wx.pkg"
+env wxhlibdir="$libdir/lib" /usr/local/bin/ghc-pkg -u -i "\$1/Contents/Resources/wxcore.pkg"
+env wxhlibdir="$libdir/lib" /usr/local/bin/ghc-pkg -u -i "\$1/Contents/Resources/wx.pkg"
EOF
chmod a+x config/macosx-postinstall
View
4 makefile
@@ -4,7 +4,7 @@
# See "license.txt" for more details.
#-----------------------------------------------------------------------
-# $Id: makefile,v 1.41 2003/10/17 06:16:48 dleijen Exp $
+# $Id: makefile,v 1.42 2003/10/17 12:33:13 dleijen Exp $
#--------------------------------------------------------------------------
# make [all] - build the libraries (in "lib").
@@ -320,7 +320,7 @@ uninstall-files =$(call uninstall-filesx,$(2),$(call relative-fromto,$(1),$(2),$
# install packages
# usage: $(call install-pkg,<install dir>,<package file>)
# usage: $(call uninstall-pkg,<package name>)
-install-pkg=env installdir=$(1) $(HCPKG) -u -i $(2)
+install-pkg=env wxhlibdir=$(1) $(HCPKG) -u -i $(2)
uninstall-pkg=if $(call run-silent,$(HCPKG) -s $(1)); then echo "unregister package: $(1)" && $(HCPKG) -r $(1); fi
# copy files.
Please sign in to comment.
Something went wrong with that request. Please try again.