my $dofile = abs2rel(rel2abs(catfile($config{sourcedir},
"util", "dofile.pl")),
rel2abs($config{builddir}));
+ my @modules = ( 'configdata.pm',
+ grep { $_ =~ m|\.pm$| } @{$args{deps}} );
+ my %moduleincs = map { '"-I'.dirname($_).'"' => 1 } @modules;
+ @modules = map { '"-M'.basename($_, '.pm').'"' } @modules;
+ my $modules = join(' ', '', sort keys %moduleincs, @modules);
return <<"EOF";
$target : $args{generator}->[0] $deps
- \$(PERL) "-I\$(BLDDIR)" "-Mconfigdata" $dofile \\
- "-o$target{build_file}" $generator > \$\@
+ \$(PERL)$modules $dofile "-o$target{build_file}" $generator > \$\@
EOF
} else {
return <<"EOF";
my $dofile = abs2rel(rel2abs(catfile($config{sourcedir},
"util", "dofile.pl")),
rel2abs($config{builddir}));
+ my @modules = ( 'configdata.pm',
+ grep { $_ =~ m|\.pm$| } @{$args{deps}} );
+ my %moduleincs = map { '"-I'.dirname($_).'"' => 1 } @modules;
+ @modules = map { "-M".basename($_, '.pm') } @modules;
+ my $modules = join(' ', '', sort keys %moduleincs, @modules);
return <<"EOF";
-$args{src}: $args{generator}->[0] $deps
- \$(PERL) "-I\$(BLDDIR)" -Mconfigdata "$dofile" \\
- "-o$target{build_file}" $generator > \$@
+$args{src}: $args{generator}->[0] $deps \$(BLDDIR)/configdata.pm
+ \$(PERL)$modules "$dofile" "-o$target{build_file}" $generator > \$@
EOF
} else {
return <<"EOF";
my $dofile = abs2rel(rel2abs(catfile($config{sourcedir},
"util", "dofile.pl")),
rel2abs($config{builddir}));
+ my @modules = ( 'configdata.pm',
+ grep { $_ =~ m|\.pm$| } @{$args{deps}} );
+ my %moduleincs = map { '"-I'.dirname($_).'"' => 1 } @modules;
+ @modules = map { "-M".basename($_, '.pm') } @modules;
+ my $modules = join(' ', '', sort keys %moduleincs, @modules);
return <<"EOF";
$target: "$args{generator}->[0]" $deps
- "\$(PERL)" "-I\$(BLDDIR)" -Mconfigdata "$dofile" \\
- "-o$target{build_file}" $generator > \$@
+ "\$(PERL)"$modules "$dofile" "-o$target{build_file}" $generator > \$@
EOF
} else {
return <<"EOF";
# unconditionally before anything else.
DEPEND[]=include/openssl/opensslconf.h include/crypto/bn_conf.h \
include/crypto/dso_conf.h doc/man7/openssl_user_macros.pod
-DEPEND[include/openssl/opensslconf.h]=configdata.pm
GENERATE[include/openssl/opensslconf.h]=include/openssl/opensslconf.h.in
-DEPEND[include/crypto/bn_conf.h]=configdata.pm
GENERATE[include/crypto/bn_conf.h]=include/crypto/bn_conf.h.in
-DEPEND[include/crypto/dso_conf.h]=configdata.pm
GENERATE[include/crypto/dso_conf.h]=include/crypto/dso_conf.h.in
-DEPEND[doc/man7/openssl_user_macros.pod]=configdata.pm
GENERATE[doc/man7/openssl_user_macros.pod]=doc/man7/openssl_user_macros.pod.in
IF[{- defined $target{shared_defflag} -}]
For I<generator>s where this is applicable, any B<INCLUDE> statement
for the same I<item> will be given to the I<generator> as its
-inclusion directories.
+inclusion directories. Likewise, any B<DEPEND> statement for the same
+I<item> will be given to the I<generator> as an extra file or module
+to load, where this is applicable.
The build file generators must be able to recognise the I<generator>.
Currently, they at least recognise files ending in C<.pl>, and will