Skip to content
Snippets Groups Projects
Commit 0f77780f authored by sof's avatar sof
Browse files

[project @ 1999-01-08 18:14:13 by sof]

mkdependHS: for "source" imports of the form, e.g.,

   import {-# SOURCE #-} Foo

emit dependency on Foo.hi-boot-<iface-file-version-number>
rather than just Foo.hi-boot if the former exists.
parent 7790cbad
No related merge requests found
...@@ -9,7 +9,8 @@ SCRIPT_PROG=mkdependHS ...@@ -9,7 +9,8 @@ SCRIPT_PROG=mkdependHS
SCRIPT_OBJS=mkdependHS.prl SCRIPT_OBJS=mkdependHS.prl
SCRIPT_SUBST_VARS= \ SCRIPT_SUBST_VARS= \
TOP_PWD \ TOP_PWD \
INSTALLING INSTALLING \
HscIfaceFileVersion
INTERP=perl INTERP=perl
......
# #
# perl script expect the following variables to be prepended: # perl script expect the following variables to be prepended:
# #
# RAWCPP TMPDIR TOP_PWD # RAWCPP TMPDIR TOP_PWD HscIfaceFileVersion
# libdir libexecdir datadir INSTALLING # libdir libexecdir datadir INSTALLING
# SED # SED
# #
...@@ -58,7 +58,7 @@ mkdependHS-specific options (not between --'s): ...@@ -58,7 +58,7 @@ mkdependHS-specific options (not between --'s):
Regard <file> as not "stable"; i.e., generate dependencies Regard <file> as not "stable"; i.e., generate dependencies
on it (if any). This option is normally used in conjunction on it (if any). This option is normally used in conjunction
with the --exclude-directory option. with the --exclude-directory option.
EOUSAGE EOUSAGE
$Status = 0; # just used for exit() status $Status = 0; # just used for exit() status
...@@ -84,6 +84,9 @@ $InstDataDirGhc = "${datadir}"; ...@@ -84,6 +84,9 @@ $InstDataDirGhc = "${datadir}";
$Unlit = ($INSTALLING) ? "${InstLibExecDirGhc}/unlit" $Unlit = ($INSTALLING) ? "${InstLibExecDirGhc}/unlit"
: "${TopPwd}/ghc/utils/unlit/unlit"; : "${TopPwd}/ghc/utils/unlit/unlit";
$HiBootVersion = $HscIfaceFileVersion;
$hi_boot_with_version = 0;
$Begin_magic_str = "# DO NOT DELETE: Beginning of Haskell dependencies\n"; $Begin_magic_str = "# DO NOT DELETE: Beginning of Haskell dependencies\n";
$End_magic_str = "# DO NOT DELETE: End of Haskell dependencies\n"; $End_magic_str = "# DO NOT DELETE: End of Haskell dependencies\n";
@Obj_suffix = ("o"); @Obj_suffix = ("o");
...@@ -466,7 +469,12 @@ sub process_dependency { ...@@ -466,7 +469,12 @@ sub process_dependency {
local($source_dep); local($source_dep);
if ( $source ) { if ( $source ) {
$source_dep = "$int_file.hi-boot"; # if a version specific .hi-boot file exist, use it.
if ( -f "$int_file.hi-boot-${HiBootVersion}" ) {
$source_dep = "$int_file.hi-boot-${HiBootVersion}";
} else {
$source_dep = "$int_file.hi-boot";
}
} else { } else {
local($str)=""; local($str)="";
foreach $obj (@Obj_suffix) { foreach $obj (@Obj_suffix) {
...@@ -535,6 +543,10 @@ sub find_in_Import_dirs { ...@@ -535,6 +543,10 @@ sub find_in_Import_dirs {
} }
if ( $source ) { if ( $source ) {
$name_to_check = "$import_dir/$modname.hi-boot-${HiBootVersion}";
print STDERR "trying... $name_to_check\n" if $Verbose >= 2; # very verbose
return($name_to_check) if -f $name_to_check;
$name_to_check = "$import_dir/$modname.hi-boot"; $name_to_check = "$import_dir/$modname.hi-boot";
print STDERR "trying... $name_to_check\n" if $Verbose >= 2; # very verbose print STDERR "trying... $name_to_check\n" if $Verbose >= 2; # very verbose
return($name_to_check) if -f $name_to_check; return($name_to_check) if -f $name_to_check;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment