# 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:
\begin{code}
-# Hash to keep track of
-%Syslibs_added = ();
-
sub add_syslib {
local($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