Commit 15a27e50 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Consistently use GHC_PKG instead of GHC_PKG_INPLACE

parent 45d6c046
......@@ -3,7 +3,7 @@ include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
PKGCONF01=local01.package.conf
LOCAL_GHC_PKG01 = $(GHC_PKG_INPLACE) -f $(PKGCONF01)
LOCAL_GHC_PKG01 = $(GHC_PKG) -f $(PKGCONF01)
# a bunch of tests for ghc-pkg
ghcpkg01 :
......@@ -47,7 +47,7 @@ ghcpkg01 :
if $(LOCAL_GHC_PKG01) register test3.pkg; then false; else true; fi
PKGCONF03=local03.package.conf
LOCAL_GHC_PKG03 = $(GHC_PKG_INPLACE) -f $(PKGCONF03)
LOCAL_GHC_PKG03 = $(GHC_PKG) -f $(PKGCONF03)
ghcpkg03 :
@rm -f $(PKGCONF03)
......@@ -65,7 +65,7 @@ ghcpkg03 :
$(LOCAL_GHC_PKG03) update --force test.pkg
PKGCONF04=local04.package.conf
LOCAL_GHC_PKG04 = $(GHC_PKG_INPLACE) -f $(PKGCONF04)
LOCAL_GHC_PKG04 = $(GHC_PKG) -f $(PKGCONF04)
# Test that importing a module exposed by two packages reports a conflict
ghcpkg04 :
......@@ -80,8 +80,8 @@ ghcpkg04 :
# Test stacking of package.confs (also #2441)
PKGCONF05a=local05a.package.conf
PKGCONF05b=local05b.package.conf
LOCAL_GHC_PKG05a = $(GHC_PKG_INPLACE) -f $(PKGCONF05a)
LOCAL_GHC_PKG05b = $(GHC_PKG_INPLACE) -f $(PKGCONF05a) -f $(PKGCONF05b)
LOCAL_GHC_PKG05a = $(GHC_PKG) -f $(PKGCONF05a)
LOCAL_GHC_PKG05b = $(GHC_PKG) -f $(PKGCONF05a) -f $(PKGCONF05b)
ghcpkg05 :
rm -f $(PKGCONF05a) $(PKGCONF05b)
......@@ -99,7 +99,7 @@ ghcpkg05 :
# Test for #2330: reject duplicate dependencies
PKGCONF06=local06.package.conf
LOCAL_GHC_PKG06 = $(GHC_PKG_INPLACE) -f $(PKGCONF06)
LOCAL_GHC_PKG06 = $(GHC_PKG) -f $(PKGCONF06)
ghcpkg06 :
rm -f $(PKGCONF06)
......@@ -109,14 +109,14 @@ ghcpkg06 :
$(LOCAL_GHC_PKG06) register --force testdup.pkg
PKGCONF1750=local1750.package.conf
LOCAL_GHC_PKG1750 = $(GHC_PKG_INPLACE) -f $(PKGCONF1750)
LOCAL_GHC_PKG1750 = $(GHC_PKG) -f $(PKGCONF1750)
1750:
rm -f $(PKGCONF1750) 1750.hs 1750.o 1750.hi 1750.out
echo "[]" >$(PKGCONF1750)
$(LOCAL_GHC_PKG1750) register --force 1750A.pkg >1750.out 2>&1
$(LOCAL_GHC_PKG1750) register --force 1750B.pkg >1750.out 2>&1
GHC_PACKAGE_PATH=$(PKGCONF1750) $(GHC_PKG_INPLACE) list
GHC_PACKAGE_PATH=$(PKGCONF1750) $(GHC_PKG) list
# GHC_PACKAGE_PATH trick is to make this work with 6.8.2 which doesn't have
# the patch "Change the command-line semantics for query commands" to
# ghc-pkg
......@@ -129,7 +129,7 @@ LOCAL_GHC_PKG1750 = $(GHC_PKG_INPLACE) -f $(PKGCONF1750)
# of InstalledPackageInfo.
COPY_PACKAGE_CONF = package.conf.copy
GHC_PKG_COPY = $(GHC_PKG_INPLACE) --global-conf=$(COPY_PACKAGE_CONF)
GHC_PKG_COPY = $(GHC_PKG) --global-conf=$(COPY_PACKAGE_CONF)
ghcpkg02:
cp $(INPLACE_DATA_DIR)/package.conf $(COPY_PACKAGE_CONF)
......
......@@ -11,8 +11,8 @@ clean:
rm -fr install
rm -f .setup-config .installed-pkg-config
# unregister if pakage 'test' already exists
if $(GHC_PKG_INPLACE) --user list | grep test-; then \
$(GHC_PKG_INPLACE) --user unregister test; \
if $(GHC_PKG) --user list | grep test-; then \
$(GHC_PKG) --user unregister test; \
fi
# We use the global package database as there's no easy way to tell
......@@ -23,7 +23,7 @@ cabal01:
$(MAKE) clean
$(TEST_HC) --make -o setup Setup.lhs -v0
./setup configure -v0 --prefix=$(shell $(TOP)/utils/pwd forwardslash)/install --with-compiler=$(TEST_HC) --with-hc-pkg=$(GHC_PKG_INPLACE) $(PROF)
./setup configure -v0 --prefix=$(shell $(TOP)/utils/pwd forwardslash)/install --with-compiler=$(TEST_HC) --with-hc-pkg=$(GHC_PKG) $(PROF)
./setup build -v0
./setup copy -v0
echo install1:
......@@ -36,6 +36,6 @@ cabal01:
./setup sdist -v0
echo dist:
ls dist
$(GHC_PKG_INPLACE) unregister test
$(GHC_PKG) unregister test
if [ "$(CLEANUP)" != "" ]; then $(MAKE) clean; fi
......@@ -4,7 +4,7 @@ include $(TOP)/mk/test.mk
CABAL_SETUP = $(FPTOOLS_TOP_ABS)/libraries/Cabal/cabal-setup/cabal-setup
CONFIG_ARGS = --with-compiler=$(TEST_HC) --with-hc-pkg=$(GHC_PKG_DIR_ABS)/$(GHC_PKG_INPLACE_PGM)
CONFIG_ARGS = --with-compiler=$(TEST_HC) --with-hc-pkg=$(GHC_PKG)
# We have 3 packages, P-1.0, P-2.0, and Q. Q depends on P-1.0.
# We have an executable R, that depends on P-2.0 and Q, so the resulting
......
......@@ -9,8 +9,8 @@ clean:
rm -f *.o *.hi
rm -f clean.out prep.out
rm -f p1/A.hs
-$(GHC_PKG_INPLACE) unregister p1
-$(GHC_PKG_INPLACE) unregister p2
-$(GHC_PKG) unregister p1
-$(GHC_PKG) unregister p2
# We aren't interested in the output from the cabal & compilation
# stages, so redirect it to a file.
......@@ -27,7 +27,7 @@ prep:
for i in p1 p2; do \
(cd $$i && \
$(TEST_HC) --make -o setup Setup.hs && \
./setup configure -v0 --with-compiler=$(TEST_HC) --with-hc-pkg=$(GHC_PKG_INPLACE) && \
./setup configure -v0 --with-compiler=$(TEST_HC) --with-hc-pkg=$(GHC_PKG) && \
./setup build && \
./setup register --inplace ); done
cp p1/A2.hs p1/A.hs
......
......@@ -10,7 +10,7 @@ clean:
rm -rf v1/dist v2/dist
rm -f *.o *.hi
rm -f clean.out prep.out
-$(GHC_PKG_INPLACE) unregister $(PKG)
-$(GHC_PKG) unregister $(PKG)
# We aren't interested in the output from the cabal & compilation
# stages, so redirect it to a file.
......@@ -24,7 +24,7 @@ prep:
for i in v1 v2; do \
(cd $$i && \
$(TEST_HC) --make -o setup Setup.hs && \
./setup configure -v0 --with-compiler=$(TEST_HC) --with-hc-pkg=$(GHC_PKG_INPLACE) && \
./setup configure -v0 --with-compiler=$(TEST_HC) --with-hc-pkg=$(GHC_PKG) && \
./setup build && \
./setup register --inplace ); done
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment