grep { $unified_info{sources}->{$_}->[0] =~ /\.c$/ }
keys %{$unified_info{sources}}); -}
{- output_on() if $disabled{makedepend}; "" -}
+GENERATED_MANDATORY={- join(" ", @{$unified_info{depends}->{""}} ) -}
GENERATED={- join(" ",
( map { (my $x = $_) =~ s|\.S$|\.s|; $x }
grep { defined $unified_info{generate}->{$_} }
# The main targets ###################################################
-all: configdata.pm build_libs_nodep build_engines_nodep build_apps_nodep \
+all: $(GENERATED_MANDATORY) \
+ build_libs_nodep build_engines_nodep build_apps_nodep \
depend link-utils
-build_libs: configdata.pm build_libs_nodep depend
+build_libs: $(GENERATED_MANDATORY) build_libs_nodep depend
build_libs_nodep: libcrypto.pc libssl.pc openssl.pc
-build_engines: configdata.pm build_engines_nodep depend
+build_engines: $(GENERATED_MANDATORY) build_engines_nodep depend
build_engines_nodep: $(ENGINES)
-build_apps: configdata.pm build_apps_nodep depend
+build_apps: $(GENERATED_MANDATORY) build_apps_nodep depend
build_apps_nodep: $(PROGRAMS) $(SCRIPTS)
-build_tests: configdata.pm build_tests_nodep depend
+build_tests: $(GENERATED_MANDATORY) build_tests_nodep depend
build_tests_nodep: $(TESTPROGS)
test: tests
-tests: build_tests_nodep build_apps_nodep build_engines_nodep \
+tests: $(GENERATED_MANDATORY) \
+ build_tests_nodep build_apps_nodep build_engines_nodep \
depend link-utils
@ : {- output_off() if $disabled{tests}; "" -}
( cd test; \
-rm -f `find . -type l -a \! -path "./.git/*"`
rm -f $(TARFILE)
+distclean: clean
+ rm -f configdata.pm
+ rm -f Makefile
+
# This exists solely for those who still type 'make depend'
#
# We check if any depfile is newer than Makefile and decide to
my $deps = join(" ", @{$args{generator_deps}}, @{$args{deps}});
if ($args{src} !~ /\.[sS]$/) {
- return <<"EOF";
+ if ($args{generator}->[0] =~ m|^.*\.in$|) {
+ my $dofile = abs2rel(rel2abs(catfile($config{sourcedir},
+ "util", "dofile.pl")),
+ rel2abs($config{builddir}));
+ return <<"EOF";
+$args{src}: $args{generator}->[0] $deps
+ \$(PERL) "-I\$(BLDDIR)" -Mconfigdata "$dofile" \\
+ "-o$target{build_file}" $generator > \$@
+EOF
+ } else {
+ return <<"EOF";
$args{src}: $args{generator}->[0] $deps
\$(PERL)$generator_incs $generator > \$@
EOF
+ }
} else {
if ($args{generator}->[0] =~ /\.pl$/) {
$generator = 'CC="$(CC)" $(PERL)'.$generator_incs.' '.$generator;