X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=Makefile.org;h=22b169925742c4e71d4be8018aa2beebf84e746d;hb=fb4c24b6e76c511eb86fe90e5b0f0c8e80c28cc6;hp=aa240a6281fa1b1f7b639321d8f3275f2cb051ff;hpb=2f58af0d85cf3755603e5b7c5a76184602111c1d;p=oweals%2Fopenssl.git diff --git a/Makefile.org b/Makefile.org index aa240a6281..22b1699257 100644 --- a/Makefile.org +++ b/Makefile.org @@ -111,11 +111,11 @@ SHLIBDIRS= crypto ssl SDIRS= \ objects \ md2 md4 md5 sha mdc2 hmac ripemd \ - des aes rc2 rc4 rc5 idea bf cast \ + des aes rc2 rc4 rc5 idea bf cast camellia seed \ bn ec rsa dsa ecdsa dh ecdh dso engine \ buffer bio stack lhash rand err \ evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5 \ - store pqueue + store cms pqueue # keep in mind that the above list is adjusted by ./Configure # according to no-xxx arguments... @@ -195,12 +195,29 @@ BUILDENV= PLATFORM='${PLATFORM}' PROCESSOR='${PROCESSOR}' \ # MAKEOVERRIDES= effectively "equalizes" GNU-ish and SysV-ish make flavors, # which in turn eliminates ambiguities in variable treatment with -e. +# BUILD_CMD is a generic macro to build a given target in a given +# subdirectory. The target must be given through the shell variable +# `target' and the subdirectory to build in must be given through `dir'. +# This macro shouldn't be used directly, use RECURSIVE_BUILD_CMD or +# BUILD_ONE_CMD instead. +# +# BUILD_ONE_CMD is a macro to build a given target in a given +# subdirectory if that subdirectory is part of $(DIRS). It requires +# exactly the same shell variables as BUILD_CMD. +# +# RECURSIVE_BUILD_CMD is a macro to build a given target in all +# subdirectories defined in $(DIRS). It requires that the target +# is given through the shell variable `target'. BUILD_CMD= if [ -d "$$dir" ]; then \ ( cd $$dir && echo "making $$target in $$dir..." && \ $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. DIR=$$dir $$target \ ) || exit 1; \ fi RECURSIVE_BUILD_CMD=for dir in $(DIRS); do $(BUILD_CMD); done +BUILD_ONE_CMD=\ + if echo " $(DIRS) " | grep " $$dir " >/dev/null 2>/dev/null; then \ + $(BUILD_CMD); \ + fi reflect: @[ -n "$(THIS)" ] && $(CLEARENV) && $(MAKE) $(THIS) -e $(BUILDENV) @@ -211,21 +228,21 @@ build_all: build_libs build_apps build_tests build_tools build_libs: build_crypto build_ssl build_engines build_crypto: - @dir=crypto; target=all; $(RECURSIVE_BUILD_CMD) + @dir=crypto; target=all; $(BUILD_ONE_CMD) build_ssl: - @dir=ssl; target=all; $(RECURSIVE_BUILD_CMD) + @dir=ssl; target=all; $(BUILD_ONE_CMD) build_engines: - @dir=engines; target=all; $(RECURSIVE_BUILD_CMD) + @dir=engines; target=all; $(BUILD_ONE_CMD) build_apps: - @dir=apps; target=all; $(RECURSIVE_BUILD_CMD) + @dir=apps; target=all; $(BUILD_ONE_CMD) build_tests: - @dir=test; target=all; $(RECURSIVE_BUILD_CMD) + @dir=test; target=all; $(BUILD_ONE_CMD) build_tools: - @dir=tools; target=all; $(RECURSIVE_BUILD_CMD) + @dir=tools; target=all; $(BUILD_ONE_CMD) all_testapps: build_libs build_testapps build_testapps: - @dir=crypto; target=testapps; $(RECURSIVE_BUILD_CMD) + @dir=crypto; target=testapps; $(BUILD_ONE_CMD) libcrypto$(SHLIB_EXT): libcrypto.a @if [ "$(SHLIB_TARGET)" != "" ]; then \