Commit 4ca6ebcd authored by panne's avatar panne
Browse files

[project @ 2001-03-25 11:08:42 by panne]

OK, here comes the third try to get a simple string from the Makefile
into the Haskell sources in a "portable" way... Perhaps we should use
compiler/main/Config.hs's technique here.
parent 9bff24a3
-----------------------------------------------------------------------------
-- $Id: Main.hs,v 1.4 2001/03/24 18:34:05 qrczak Exp $
-- $Id: Main.hs,v 1.5 2001/03/25 11:08:42 panne Exp $
--
-- Package management tool
-----------------------------------------------------------------------------
......@@ -18,7 +18,11 @@ import Directory
import System
import IO
default_pkgconf = clibdir ++ "/package.conf"
-- HACK: The confusing cpp tricks below introduce a leading space. Note that
-- cpp's stringify operator # doesn't work because of the -traditional flag.
-- TEXT SUBSTITUTION IS EVIL. TEXT SUBSTITUTION IS EVIL. TEXT SUBSTITUTION...
default_pkgconf = "\
\ clibdir" ++ "/package.conf"
main = do
args <- getArgs
......@@ -48,7 +52,7 @@ flags = [
runit clis = do
conf_file <-
case [ f | Config f <- clis ] of
[] -> return default_pkgconf
[] -> return (tail default_pkgconf) -- HACK: Remove leading space
[f] -> return f
_ -> die (usageInfo usageHeader flags)
......
# -----------------------------------------------------------------------------
# $Id: Makefile,v 1.5 2001/03/24 18:34:05 qrczak Exp $
# $Id: Makefile,v 1.6 2001/03/25 11:08:42 panne Exp $
TOP=../..
include $(TOP)/mk/boilerplate.mk
HS_PROG = ghc-pkg
SRC_HC_OPTS += -cpp -DPKG_TOOL -DWANT_PRETTY -package lang \
-package util -package text -Dclibdir="\"$(libdir)\""
-package util -package text -Dclibdir="$(libdir)"
INSTALL_PROGS = $(HS_PROG)
......
Supports Markdown
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