From 4a24945ce6db768722ab983c37627d59f2775196 Mon Sep 17 00:00:00 2001 From: panne Date: Thu, 1 Jun 2000 19:00:25 +0000 Subject: [PATCH] [project @ 2000-06-01 19:00:25 by panne] While adding a syslib, setup include dirs in addition to cc injects, too. The driver is really a piece from hell... :-( --- ghc/driver/ghc.lprl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ghc/driver/ghc.lprl b/ghc/driver/ghc.lprl index 38c8da2..65351c0 100644 --- a/ghc/driver/ghc.lprl +++ b/ghc/driver/ghc.lprl @@ -525,6 +525,9 @@ $NoImplicitPrelude = 0; # external main is provided instead. $NoHaskellMain=0; +# Hash to keep track of +%Syslibs_added = (); + } # end of initDriverGlobals (Sigh) # we split the argv passed to the driver into three: @@ -2510,9 +2513,6 @@ to the syslib family. The info bit consist of the following: \begin{code} -# Hash to keep track of -%Syslibs_added = (); - sub add_syslib { local($syslib) = @_; @@ -2711,7 +2711,10 @@ sub add_syslib { } # Make sure that header file HsFoo.h is included for syslib foo. - push(@CcInjects, "#include \"Hs\u$syslib.h\"\n") unless ( exists $Syslibs_added{$syslib} ); + if ( !exists $Syslibs_added{$syslib} ) { + push(@CcInjects, "#include \"Hs\u$syslib.h\"\n"); + push(@Include_dir, "$TopPwd/hslibs/$syslib/cbits") unless ( $INSTALLING ); + } # This check is here to avoid syslib loops from # spoiling the party. A side-effect of it is that -- 1.7.10.4