MANDIR=$(INSTALLTOP)/share/man
HTMLDIR=$(INSTALLTOP)/share/doc/$(BASENAME)/html
-MANSUFFIX=ssl
+# MANSUFFIX is for the benefit of anyone who may want to have a suffix
+# appended after the manpage file section number. "ssl" is popular,
+# resulting in files such as config.5ssl rather than config.5.
+MANSUFFIX=
HTMLSUFFIX=html
RM= rm -f
TAR= {- $target{tar} || "tar" -}
TARFLAGS= {- $target{tarflags} -}
+MAKEDEPEND=$(CROSS_COMPILE){- $config{makedepprog} -}
BASENAME= openssl
NAME= $(BASENAME)-$(VERSION)
# The main targets ###################################################
-all: Makefile libcrypto.pc libssl.pc openssl.pc $(ENGINES) $(PROGRAMS) $(SCRIPTS) $(TESTPROGS) link-utils
+all: build_libs build_engines build_apps link-utils
-test tests: $(TESTPROGS) rehash
+# The pkg-config files depend on the libraries as well as Makefile
+build_libs: libcrypto.pc libssl.pc openssl.pc
+build_engines: $(ENGINES)
+build_apps: $(PROGRAMS) $(SCRIPTS)
+build_tests: $(TESTPROGS)
+
+test tests: build_tests build_apps build_engines rehash
( cd test; \
SRCTOP=../$(SRCDIR) \
BLDTOP=../$(BLDDIR) \
-rm -f `find $(BLDDIR) -type l`
rm -f $(TARFILE)
-DCLEAN_CMD=sed -e '/^DO NOT DELETE.*/,$$d'
+DCLEAN_CMD=sed -e '/^. DO NOT DELETE.*/,$$d'
dclean:
$(DCLEAN_CMD) < Makefile >Makefile.new
mv -f Makefile.new Makefile
# Helper targets #####################################################
-rehash: link-utils copy-certs
+rehash: link-utils copy-certs build_apps
@if [ -z "$(CROSS_COMPILE)" ]; then \
(OPENSSL="$(BLDDIR)/util/shlib_wrap.sh apps/openssl"; \
[ -x "$(BLDDIR)/openssl.exe" ] && OPENSSL="$(BLDDIR)/openssl.exe" || :; \
return <<"EOF";
$dep : $deps
rm -f \$\@.tmp; touch \$\@.tmp
- \$(MAKEDEPEND) -f\$\@.tmp -o"|$obj"\
- -- -DOPENSSL_DOING_MAKEDEPEND \$(DEPFLAGS)$incs \
- -- $srcs
- sed -e 's/^.*|//' -e 's/ \\/\\(\\\\.\\|[^ ]\\)*//g' -e '/: *\$/d' -e '/^\\(#.*\\| *\\)\$/d' \$\@.tmp > \$\@
+ \$(MAKEDEPEND) -f\$\@.tmp -o"|$obj" \\
+ -- -DOPENSSL_DOING_MAKEDEPEND \$(DEPFLAGS)$incs \\
+ -- $srcs \\
+ 2>/dev/null
+ sed -e 's/^.*|//' -e 's/ \\/\\(\\\\.\\|[^ ]\\)*//g' -e '/: *\$\$/d' -e '/^\\(#.*\\| *\\)\$\$/d' \$\@.tmp > \$\@
rm \$\@.tmp
EOF
}
rel2abs($config{builddir}));
return <<"EOF";
$script : $sources
- \$(PERL) "-I\$(BLDDIR)" -Mconfigdata "$dofile" $sources > "$script"
+ \$(PERL) "-I\$(BLDDIR)" -Mconfigdata "$dofile" \\
+ "-o$target{build_file}" $sources > "$script"
chmod a+x $script
EOF
}