- if (! $follow_file) { # it didnae find anything
- die "$orig_src_file: Couldn't handle: $_\n";
-
- } else { # it found something
- if ($follow_file ne '__ignore__') {
- local($int_file);
- $int_file = $follow_file;
-
- if ( $int_file !~ /\.(l?hs|hi|l?y)$/ ) {
- local($str) = "";
- foreach $obj (@Obj_suffix) {
- $str .= "$bf.$obj ";
- foreach $suff (@File_suffix) {
- $str .= "$bf.${suff}_$obj ";
- }
- }
- push(@Depend_lines, "$str: $int_file\n");
- } else {
- $int_file =~ s/\.l?hs$//;
- $int_file =~ s/\.l?y$//;
- $int_file =~ s/\.hi$//;
- local($source_dep);
-
- if ( $source ) {
- $source_dep = "$int_file.hi-boot";
- } else {
- local($str)="";
- foreach $obj (@Obj_suffix) {
- $str .= "$bf.$obj ";
- }
- push(@Depend_lines, "$str: $int_file.hi\n");
- }
-
- if ( ! $source ) {
- foreach $suff (@File_suffix) {
- local($str) = "";
- foreach $obj (@Obj_suffix) {
- $str .= "$bf.${suff}_$obj ";
- }
- push(@Depend_lines, "$str: $int_file.${suff}_hi\n");
- }
- } else {
- local($str) = "";
- foreach $obj (@Obj_suffix) {
- $str .= "$bf.$obj ";
- foreach $suff (@File_suffix) {
- $str .= "$bf.${suff}_$obj ";
- }
- }
- push(@Depend_lines, "$str: $source_dep\n");
- }
- }
+#
+# Handle
+sub process_dependency {
+ local($todo,$source,$modname) = @_;
+
+ if ($todo eq 'import') {
+ if ( $IgnoreMe{$modname} eq 'Y' ) {
+ # user specifically asked for this module
+ # to be ignored.
+ $follow_file = '__ignore__';
+ } elsif ( $ModuleIn{$modname} ) {
+ $follow_file = "$ModuleIn{$modname}/$modname.hi";
+ } else { # hard way
+ $follow_file =
+ &find_in_Import_dirs($orig_src_file, $modname, $last_seen_dir, $source );
+ }
+ } else {
+ $follow_file
+ = &find_in_Include_dirs($orig_src_file, $modname, $last_seen_dir);
+ }
+
+ if (! $follow_file) { # it didnae find anything
+ die "$orig_src_file: Couldn't handle: $_\n";
+
+ } else { # it found something
+ if ($follow_file ne '__ignore__') {
+ local($int_file) = $follow_file;
+
+ if ( $int_file !~ /\.(l?hs|hi|l?y)$/ ) {
+ local($str) = "";
+ foreach $obj (@Obj_suffix) {
+ $str .= "$bf.$obj ";
+ foreach $suff (@File_suffix) {
+ $str .= "$bf.${suff}_$obj ";
+ }