#
# RAWCPP TMPDIR TOP_PWD
# libdir libexecdir datadir INSTALLING
-# PROJECTVERSION SED
+# ProjectVersionInt SED
#
# tries to work like mkdependC - capable of dealing with:
#
don't generate any dependencies on modules therein.
-Xdirs same as --exclude-directory
--include-prelude
- Regard prelude library as unstable, i.e., generate dependencies
+ Regard prelude libraries as unstable, i.e., generate dependencies
on prelude modules. This option is normally only used by the
various system libraries. If a -syslib option is used, dependencies
will also be generated on the library's interfaces.
$End_magic_str = "# DO NOT DELETE: End of Haskell dependencies\n";
@Obj_suffix = ("o");
@File_suffix = ();
-$ghc_version_info = int ( ${PROJECTVERSION} * 100 );
+$ghc_version_info = ${ProjectVersionInt};
$Import_dirs = '.';
%Syslibs = ();
# set up array of ignored modules
local(@dirs) = ($INSTALLING) ?
- ("$InstLibDirGhc/imports")
- : ("$TopPwd/ghc/lib/ghc",
- "$TopPwd/ghc/lib/required",
- "$TopPwd/ghc/lib/glaExts",
- "$TopPwd/ghc/lib/concurrent");
+ ("$InstLibDirGhc/imports/std")
+ : ("$TopPwd/ghc/lib/std");
if (!$Include_prelude) {
push(@Ignore_dirs, @dirs);
} else {
foreach $lib ( @Syslibs ) {
local($dir) =
- ($INSTALLING) ? "${InstHsLibDirGhc}/${lib}/imports"
- : "${TopPwd}/hslibs/${lib}/src";
+ ($INSTALLING) ? "${InstLibDirGhc}/imports/${lib}"
+ : "${TopPwd}/ghc/lib/${lib}";
if (!$Include_prelude) {
push(@Ignore_dirs,$dir);
} else {
}
-# OK, mangle the Makefile
-unlink("$Makefile.bak");
-
#
-# If no output file exist as yet, create one.
+# Create backup version of output file.
#
-if ( ! -f $Makefile.bak ) {
- system("touch $Makefile.bak");
-}
-if ( -f $Makefile ) {
+if ( ! -f $Makefile ) {
+ # truncate() may not be implemented, so we
+ # play it safe here.
+ local(*TRUNC);
+ open(TRUNC,"> $Makefile.bak") && close(TRUNC);
+} else {
rename($Makefile,"$Makefile.bak");
}
# now copy Makefile.bak into Makefile, rm'ing old dependencies
$Include_dirs .= " $_";
} elsif ( /^-syslib$/ ) {
push(@Syslibs, &grab_arg_arg($_,''));
+ } elsif ( /^-fglasgow-exts$/ ) {
+ push(@Syslibs, 'exts');
} elsif ($Dashdashes_seen != 1) { # not between -- ... --
if ( /^-v$/ ) {
$Verbose++;
} else {
push(@Src_files, $_);
}
-
- } elsif ($Dashdashes_seen == 1) { # where we ignore unknown options
- push(@Src_files, $_) if ! /^-/;
- }
+ }
+ # Removed support for picking up plausible source file
+ # names inside the ghc options chunk of the command
+ # line. It failed to deal with `option-value' stuff present
+ # on some invocations of ghc (e.g., "-ohi foo.baz").
+ # -- sof 12/97
+ #
+ # } elsif ($Dashdashes_seen == 1) {
+ # push(@Src_files, $_) if ! /^-/;
+ # }
}
@File_suffix = sort (@File_suffix);
}