Address comments.
[openssl.git] / Configurations / unix-Makefile.tmpl
index 84b3630c537ba58bbfce3086c8a97010ba91b727..726784f2a8590812efe5817267592c795c1b3e4d 100644 (file)
@@ -143,9 +143,15 @@ PROCESSOR= {- $config{processor} -}
 
 # 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) \
@@ -569,7 +575,7 @@ dist:
 
 # 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" || :; \
@@ -876,7 +882,8 @@ 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
   }