summaryrefslogtreecommitdiff
path: root/t/macro/inherit.sdf
blob: f5e7f34cd55cc584962acf44366bb032368007a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Test the inherit macro

# Define a macro to dump the current include path in terms of
#  the current library directory
!block script
sub dump_path_Macro {
    local($sdfhome, $igc);

    $sdfhome = $::app_lib_dir;
    print "SDF include path is now:\n";
    for $igc (@include_path) {
        $igc =~ s/$sdfhome/\$SDFHOME/;
        print "$igc.\n";
    }
}
!endblock

# Show the initial path
!dump_path

# Try a simple name
!inherit "abc"
!dump_path

# Try a name with several parts
!inherit "xyz/qwe"
!dump_path

# Try an absolute path
!inherit "/qwe/xyz"
!dump_path