|
1 | 1 | #!/usr/bin/env perl
|
2 | 2 | #
|
3 |
| -# Copyright (c) 2009-2016 Cisco Systems, Inc. All rights reserved. |
| 3 | +# Copyright (c) 2009-2017 Cisco Systems, Inc. All rights reserved |
4 | 4 | # Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
|
5 | 5 | # Copyright (c) 2013 Mellanox Technologies, Inc.
|
6 | 6 | # All rights reserved.
|
@@ -432,11 +432,28 @@ sub mca_process_project {
|
432 | 432 | next
|
433 | 433 | if (! -d "$dir/$d" || $d eq "base" || substr($d, 0, 1) eq ".");
|
434 | 434 |
|
435 |
| - # If this directory has a $dir.h file and a base/ |
| 435 | + my $framework_header = "$dir/$d/$d.h"; |
| 436 | + |
| 437 | + # If there's a $dir/$d/autogen.options file, read it |
| 438 | + my $ao_file = "$dir/$d/autogen.options"; |
| 439 | + if (-r $ao_file) { |
| 440 | + verbose "\n>>> Found $dir/$d/autogen.options file\n"; |
| 441 | + open(IN, $ao_file) || |
| 442 | + die "$ao_file present, but cannot open it"; |
| 443 | + while (<IN>) { |
| 444 | + if (m/\s*framework_header\s*=\s*(.+?)\s*$/) { |
| 445 | + verbose " Framework header entry: $1\n"; |
| 446 | + $framework_header = "$dir/$d/$1"; |
| 447 | + } |
| 448 | + } |
| 449 | + close(IN); |
| 450 | + } |
| 451 | + |
| 452 | + # If this directory has a framework header and a base/ |
436 | 453 | # subdirectory, or its name is "common", then it's a
|
437 | 454 | # framework.
|
438 | 455 | if ("common" eq $d || !$project->{need_base} ||
|
439 |
| - (-f "$dir/$d/$d.h" && -d "$dir/$d/base")) { |
| 456 | + (-f $framework_header && -d "$dir/$d/base")) { |
440 | 457 | verbose "\n=== Found $pname / $d framework\n";
|
441 | 458 | mca_process_framework($topdir, $project, $d);
|
442 | 459 | }
|
|
0 commit comments