From 814766cd8057e692d640c62c3ce9097c0c88d534 Mon Sep 17 00:00:00 2001 From: simonmar Date: Tue, 10 Aug 2004 14:33:46 +0000 Subject: [haddock @ 2004-08-10 14:33:45 by simonmar] Fixes to installation under Windows. --- src/Main.hs | 5 +++-- src/Makefile | 6 +++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Main.hs b/src/Main.hs index 08c3ba7a..d4488b24 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -161,10 +161,11 @@ run flags files = do (t:_) -> Just t libdir <- case [str | Flag_Lib str <- flags] of - [] -> do maybe_exec_dir <- getBaseDir -- Get directory of executable + [] -> do maybe_exec_dir <- getBaseDir + -- Get directory of executable case maybe_exec_dir of Nothing -> return "." - Just dir -> return (dir ++ "\\imports") + Just dir -> return dir fs -> return (last fs) let css_file = case [str | Flag_CSS str <- flags] of diff --git a/src/Makefile b/src/Makefile index 03192ee4..b572e8ee 100644 --- a/src/Makefile +++ b/src/Makefile @@ -19,7 +19,7 @@ else SRC_HC_OPTS += -package data -package text -package util -package net endif -ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32" +ifeq "$(Windows)" "YES" HS_PROG_EXT = .exe else HS_PROG_EXT = .bin @@ -84,7 +84,11 @@ INTERP=$(SHELL) SCRIPT_SUBST_VARS = HADDOCKLIB HADDOCKBIN +# The script isn't installed on Windows; we run the binary directly +ifeq "$(Windows)" "NO" INSTALL_SCRIPTS += $(SCRIPT_PROG) +endif + INSTALL_LIBEXECS = $(HS_PROG) # don't recurse on 'make install' -- cgit v1.2.3