summaryrefslogtreecommitdiff
path: root/rules
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2009-08-14 22:45:49 +0000
committerIan Lynagh <igloo@earth.li>2009-08-14 22:45:49 +0000
commit926ae90b75cd3368049854898062a563e57c9ad2 (patch)
tree543ef37498be98d3cb18a587c26b589e8d78d311 /rules
parent328681951873b54dade3d0ecef2bea9bf97fff29 (diff)
downloadhaskell-926ae90b75cd3368049854898062a563e57c9ad2.tar.gz
Make our install variables etc compliant with GNU standards; fixes #1924
Diffstat (limited to 'rules')
-rw-r--r--rules/build-perl.mk4
-rw-r--r--rules/build-prog.mk8
-rw-r--r--rules/manual-package-config.mk4
-rw-r--r--rules/shell-wrapper.mk18
4 files changed, 18 insertions, 16 deletions
diff --git a/rules/build-perl.mk b/rules/build-perl.mk
index 982a2b699d..86f729fbb1 100644
--- a/rules/build-perl.mk
+++ b/rules/build-perl.mk
@@ -22,8 +22,8 @@ define build-perl
# $1 = dir
# $2 = distdir
-ifeq "$$($1_$2_LIBEXEC)" "YES"
-$1_$2_INPLACE = $(INPLACE_LIB)/$$($1_$2_PROG)
+ifeq "$$($1_$2_TOPDIR)" "YES"
+$1_$2_INPLACE = $(INPLACE_TOPDIR)/$$($1_$2_PROG)
else
$1_$2_INPLACE = $(INPLACE_BIN)/$$($1_$2_PROG)
endif
diff --git a/rules/build-prog.mk b/rules/build-prog.mk
index 6910e8f6e8..3631a90bf1 100644
--- a/rules/build-prog.mk
+++ b/rules/build-prog.mk
@@ -126,8 +126,8 @@ else
ifeq "$$($1_$2_SHELL_WRAPPER) $$(Windows)" "YES NO"
$1_$2_INPLACE = $$(INPLACE_LIB)/$$($1_$2_PROG)
else
-ifeq "$$($1_$2_LIBEXEC)" "YES"
-$1_$2_INPLACE = $$(INPLACE_LIB)/$$($1_$2_PROG)
+ifeq "$$($1_$2_TOPDIR)" "YES"
+$1_$2_INPLACE = $$(INPLACE_TOPDIR)/$$($1_$2_PROG)
else
$1_$2_INPLACE = $$(INPLACE_BIN)/$$($1_$2_PROG)
endif
@@ -150,8 +150,8 @@ endif
$(call shell-wrapper,$1,$2)
ifeq "$$($1_$2_INSTALL)" "YES"
-ifeq "$$($1_$2_LIBEXEC)" "YES"
-INSTALL_LIBEXECS += $1/$2/build/tmp/$$($1_$2_PROG)
+ifeq "$$($1_$2_TOPDIR)" "YES"
+INSTALL_TOPDIRS += $1/$2/build/tmp/$$($1_$2_PROG)
else
INSTALL_BINS += $1/$2/build/tmp/$$($1_$2_PROG)
endif
diff --git a/rules/manual-package-config.mk b/rules/manual-package-config.mk
index da5cacffaf..5a24141d99 100644
--- a/rules/manual-package-config.mk
+++ b/rules/manual-package-config.mk
@@ -29,8 +29,8 @@ $1/package.conf.inplace : $1/package.conf.in $(GHC_PKG_INPLACE)
$1/package.conf.install:
$$(CPP) $$(RAWCPP_FLAGS) -P \
-DINSTALLING \
- -DLIB_DIR='"$$(libdir)"' \
- -DINCLUDE_DIR='"$$(libdir)/include"' \
+ -DLIB_DIR='"$$(ghclibdir)"' \
+ -DINCLUDE_DIR='"$$(ghclibdir)/include"' \
$$($1_PACKAGE_CPP_OPTS) \
-x c -I$$(GHC_INCLUDE_DIR) $1/package.conf.in | \
grep -v '^#pragma GCC' | \
diff --git a/rules/shell-wrapper.mk b/rules/shell-wrapper.mk
index 312504e278..9535a7d720 100644
--- a/rules/shell-wrapper.mk
+++ b/rules/shell-wrapper.mk
@@ -38,6 +38,7 @@ $$(INPLACE_BIN)/$$($1_$2_PROG): $$($1_$2_INPLACE)
echo 'executablename=$$(TOP)/$$<' >> $$@
echo 'datadir=$$(TOP)/$$(INPLACE_LIB)' >> $$@
echo 'bindir=$$(TOP)/$$(INPLACE_BIN)' >> $$@
+ echo 'topdir=$$(TOP)/$$(INPLACE_TOPDIR)' >> $$@
cat $$($1_$2_SHELL_WRAPPER_NAME) >> $$@
$$(EXECUTABLE_FILE) $$@
endif
@@ -58,14 +59,15 @@ install: install_$1_$2_wrapper
install_$1_$2_wrapper: WRAPPER=$$(DESTDIR)$$(bindir)/$$($1_$2_INSTALL_SHELL_WRAPPER_NAME)
install_$1_$2_wrapper:
$$(INSTALL_DIR) $$(DESTDIR)$$(bindir)
- "$$(RM)" $$(RM_OPTS) $$(WRAPPER)
- $$(CREATE_SCRIPT) $$(WRAPPER)
- echo '#!$$(SHELL)' >> $$(WRAPPER)
- echo 'executablename=$$(libexecdir)/$$($1_$2_PROG)' >> $$(WRAPPER)
- echo 'datadir=$$(datadir)' >> $$(WRAPPER)
- echo 'bindir=$$(bindir)' >> $$(WRAPPER)
- cat $$($1_$2_SHELL_WRAPPER_NAME) >> $$(WRAPPER)
- $$(EXECUTABLE_FILE) $$(WRAPPER)
+ "$$(RM)" $$(RM_OPTS) $$(WRAPPER)
+ $$(CREATE_SCRIPT) $$(WRAPPER)
+ echo '#!$$(SHELL)' >> $$(WRAPPER)
+ echo 'executablename=$$(ghclibexecdir)/$$($1_$2_PROG)' >> $$(WRAPPER)
+ echo 'datadir=$$(datadir)' >> $$(WRAPPER)
+ echo 'bindir=$$(bindir)' >> $$(WRAPPER)
+ echo 'topdir=$$(topdir)' >> $$(WRAPPER)
+ cat $$($1_$2_SHELL_WRAPPER_NAME) >> $$(WRAPPER)
+ $$(EXECUTABLE_FILE) $$(WRAPPER)
endif # $1_$2_INSTALL_SHELL_WRAPPER