diff options
author | Richard Levitte <levitte@openssl.org> | 2016-02-18 13:04:05 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2016-02-18 23:42:09 +0100 |
commit | 88297284ad14a233430cb5140d368edf17dacf7a (patch) | |
tree | 9bb78754b806e2341ce88e1928a7244361d34b8d /Configurations/descrip.mms.tmpl | |
parent | 7d1037661afedc008f0abbd050c492e23905b431 (diff) |
Don't treat .d (depend) files separately from object files
.d (.MMS in the VMS world) files with just dependencies are built from
exactly the same conditions as the object files. Therefore, the rules
for them can be built at the same time as the rules for the
corresponding object files.
This removes the requirement for a src2dep function in the build file
templates, and for common.tmpl to call it. In the end, the existence
of depend files is entirely up to the build file.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'Configurations/descrip.mms.tmpl')
-rw-r--r-- | Configurations/descrip.mms.tmpl | 41 |
1 files changed, 3 insertions, 38 deletions
diff --git a/Configurations/descrip.mms.tmpl b/Configurations/descrip.mms.tmpl index 4ce797324f..2798b19916 100644 --- a/Configurations/descrip.mms.tmpl +++ b/Configurations/descrip.mms.tmpl @@ -410,43 +410,6 @@ descrip.mms : {- sourcefile("Configurations", "descrip.mms.tmpl") -} $(SRCDIR)Co {- use File::Basename; use File::Spec::Functions qw/abs2rel rel2abs catfile catdir/; - sub src2dep { - my %args = @_; - my $dep = $args{obj}; - my $deps = join(", -\n\t\t", @{$args{srcs}}, @{$args{deps}}); - - # Because VMS C isn't very good at combining a /INCLUDE path with - # #includes having a relative directory (like '#include "../foo.h"), - # the best choice is to move to the first source file's intended - # directory before compiling, and make sure to write the object file - # in the correct position (important when the object tree is other - # than the source tree). - my $forward = dirname($args{srcs}->[0]); - my $backward = abs2rel(rel2abs("."), rel2abs($forward)); - my $depd = abs2rel(rel2abs(dirname($dep)), rel2abs($forward)); - my $depn = basename($dep); - my $srcs = - join(", ", - map { abs2rel(rel2abs($_), rel2abs($forward)) } @{$args{srcs}}); - my $incs = - "/INCLUDE=(".join(",", - map { - file_name_is_absolute($_) - ? $_ : catdir($backward,$_) - } @{$args{incs}}).")"; - my $before = $unified_info{before}->{$dep.".OBJ"} || "\@ !"; - my $after = $unified_info{after}->{$dep.".OBJ"} || "\@ !"; - - return <<"EOF"; -$dep.MMS : $deps - ${before} - SET DEFAULT $forward - \$(CC) \$(CFLAGS)${incs} /MMS=(TARGET=.OBJ)/OBJECT=${depd}${depn}.MMS $srcs - SET DEFAULT $backward - ${after} - - PURGE $dep.MMS -EOF - } sub src2obj { my %args = @_; my $obj = $args{obj}; @@ -475,7 +438,9 @@ EOF my $after = $unified_info{after}->{$obj.".OBJ"} || "\@ !"; return <<"EOF"; -$obj.OBJ : $deps +$obj.MMS : $deps + \$(CC) \$(CFLAGS)${incs} /MMS=(FILE=${objd}${objn}.MMS,TARGET=$obj.OBJ) /NOOBJECT $srcs +$obj.OBJ : $obj.MMS ${before} SET DEFAULT $forward \$(CC) \$(CFLAGS)${incs} /OBJECT=${objd}${objn}.OBJ /REPOSITORY=$backward $srcs |