Make our install variables etc compliant with GNU standards; fixes #1924
[ghc-hetmet.git] / distrib / Makefile-bin-vars.in
index 53c4163..0899369 100644 (file)
@@ -1,62 +1,39 @@
 
-# Where the different pieces of the bundle should go:
-bindir      = @bindir@
-libdir      = @libdir@/$(package)-$(version)
-datadir     = @datadir@/$(package)-$(version)
+# Where we are
+bindist_abs_root = @hardtop@
+FPTOOLS_TOP_ABS  = @hardtop@
 
-platform    = @TargetPlatform@
-prefix      = @prefix@
-exec_prefix = @exec_prefix@
-
-# default
-htmldir     = $(datadir)/html
-psdir       = $(datadir)
-pdfdir      = $(datadir)
+# This Makefile isn't used on Windows, so we always have ghc-pkg.bin
+# rather than ghc-pkg.exe.
+GHC_PKG_PROG = $(FPTOOLS_TOP_ABS)/utils/ghc-pkg/ghc-pkg.bin
 
+platform    = @TargetPlatform@
 
 PERL        = @PerlCmd@
 SH         = /bin/sh
-RM          = rm -f
+RM          = rm
+RM_OPTS     = -f
 MV          = mv
 CP          = cp
 LN_S        = @LN_S@
 CHMOD       = chmod
 INSTALL            = @INSTALL@
-exeext      = @exeext@
-SED        = @SedCmd@
-DEFAULT_TMPDIR = /tmp
-
-# sigh
-INSTALL_DIR  = ./mkdirhier
-
-#
-# Set of package scripts for which you'd like a name-<version> symlink
-# to be created, i.e., create a symlink, ghc-$(version), pointing to ghc to
-# avoid version vertigo.
 #
-VERSION_SYMLINKS_FOR=$(PACKAGE_LINKS)
-
-# Binaries to install
-PACKAGE_BIN_INSTALL=$(PACKAGE_PRL_SCRIPTS) $(PACKAGE_SH_SCRIPTS)
-
-#----------end of user-serviceable parts------------
-#
-#
-# How to install the different pieces
+# Sigh - the autoconf macro for INSTALL will subst a relative path to the fallback
+# install-sh script (if chosen). This not terribly useful to us, so we convert
+# it into an abs. path.
 # 
-INSTALL_BIN    = $(INSTALL) $(INSTALL_BIN_OPTS)
-INSTALL_LIB    = $(INSTALL) $(INSTALL_LIB_OPTS)
-INSTALL_DATA   = $(INSTALL) $(INSTALL_DATA_OPTS)
-INSTALL_SCRIPT = $(INSTALL) $(INSTALL_SCRIPT_OPTS)
+INSTALL                        := $(subst ./install-sh,$(FPTOOLS_TOP_ABS)/install-sh,$(INSTALL))
+
+exeext      = @exeext@
+SED            = @SedCmd@
+DEFAULT_TMPDIR = /tmp
+RANLIB      = @RANLIB@
+CPP         = @CPP@
 
-# What's common to all installs
-INSTALL_OPTS= $(EXTRA_INSTALL_OPTS)
+RAWCPP_FLAGS            = -undef -traditional
 
-BIN_PERMS = 755
-LIB_PERMS = 644
+EXECUTABLE_FILE = chmod $(BIN_PERMS)
 
-INSTALL_BIN_OPTS    = -m $(BIN_PERMS) $(INSTALL_OPTS) $(EXTRA_INSTALL_BIN_OPTS)
-INSTALL_LIB_OPTS    = -m $(LIB_PERMS) $(INSTALL_OPTS) $(EXTRA_INSTALL_LIB_OPTS)
-INSTALL_DATA_OPTS   = -m $(LIB_PERMS) $(INSTALL_OPTS) $(EXTRA_INSTALL_DATA_OPTS)
-INSTALL_SCRIPT_OPTS = -m $(BIN_PERMS) $(INSTALL_OPTS) $(EXTRA_INSTALL_SCRIPT_OPTS)
+GHC_COMPAT_DIR=$(TOP)/mk