Don't build test programs by default, add convenience targets for unified build
authorRichard Levitte <levitte@openssl.org>
Sat, 13 Feb 2016 17:15:51 +0000 (18:15 +0100)
committerRichard Levitte <levitte@openssl.org>
Sat, 13 Feb 2016 17:32:01 +0000 (18:32 +0100)
Test programs are now only built when running "make test" or "make
build_tests".

Reviewed-by: Rich Salz <rsalz@openssl.org>
Configurations/descrip.mms.tmpl
Configurations/unix-Makefile.tmpl
Makefile.in

index 1c5f58af2513202726685835a217ab2e5bffa7d6..d449a428952fffe82075eee6df8f36ffc6a93f8b 100644 (file)
@@ -200,9 +200,14 @@ NODEBUG=@
 
 # The main targets ###################################################
 
-all : descrip.mms, $(LIBS), $(ENGINES), $(PROGRAMS), $(SCRIPTS), $(TESTPROGS)
+all : descrip.mms, build_libs, build_engines, build_apps
 
-test tests : $(TESTPROGS), rehash
+build_libs : $(LIBS)
+build_engines : $(ENGINES)
+build_apps : $(PROGRAMS), $(SCRIPTS)
+build_tests : $(TESTPROGS)
+
+test tests : build_tests, rehash
         SET DEFAULT [.test]{- move("test") -}
         DEFINE SRCTOP {- sourcedir() -}
         DEFINE BLDTOP {- builddir() -}
index 84b3630c537ba58bbfce3086c8a97010ba91b727..fe524e187bbcfbda3077a64d90cb0352b0eef7b7 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 rehash
        ( cd test; \
          SRCTOP=../$(SRCDIR) \
          BLDTOP=../$(BLDDIR) \
index ad51e76c0c8b04d7680c17e7042957c70eb68094..cc2c0b520db96a4cac5a34624665a7db2790d0c2 100644 (file)
@@ -224,7 +224,7 @@ INSTALLDIRS=        \
                $(DESTDIR)$(OPENSSLDIR)/certs \
                $(DESTDIR)$(OPENSSLDIR)/private
 
-all: Makefile build_all
+all: Makefile build_all_but_tests
 
 # as we stick to -e, CLEARENV ensures that local variables in lower
 # Makefiles remain local and variable. $${VAR+VAR} is tribute to Korn
@@ -311,7 +311,8 @@ reflect:
 
 sub_all: build_all
 
-build_all: build_libs build_apps build_tests build_tools
+build_all_but_tests: build_libs build_apps build_tools
+build_all: build_all_but_tests build_tests
 
 build_libs: build_libcrypto build_libssl openssl.pc
 
@@ -477,7 +478,7 @@ rehash.time: certs build_apps build_tools
 test:   files tests
 
 
-tests: rehash
+tests:  build_tests rehash
        @(cd test && echo "testing..." && \
        $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on OPENSSL_CONF=../apps/openssl.cnf tests );
        @if [ -z "$(CROSS_COMPILE)" ]; then \