Skip to content

Commit

Permalink
Makefile_v1: move -s option of many recursive 'make' calls to end of …
Browse files Browse the repository at this point in the history
…line (to ease debugging)
  • Loading branch information
DDvO committed Dec 5, 2024
1 parent f2af1cc commit 2bc4e5c
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions Makefile_v1
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,11 @@ $(SECUTILS_OUT_LIB):
update_secutils:
git submodule update $(GIT_PROGRESS) --init $(GIT_DEPTH) $(SECUTILS_DIR)
build_secutils: # not: update_secutils
$(MAKE) -C $(SECUTILS_DIR) -f Makefile_v1 -s build_all $(SET_NDEBUG) $(SET_DEBUG_FLAGS) CFLAGS="$(CFLAGS) $(OSSL_VERSION_QUIRKS)" SECUTILS_USE_ICV=$(SECUTILS_USE_ICV) SECUTILS_USE_UTA=$(SECUTILS_USE_UTA) SECUTILS_NO_TLS=$(SECUTILS_NO_TLS) OPENSSL_DIR="$(OPENSSL_REVERSE_DIR)" OPENSSL_LIB="$(OPENSSL_REVERSE_LIB)" OUT_DIR="$(OUT_REVERSE_DIR)"
$(MAKE) -C $(SECUTILS_DIR) -f Makefile_v1 build_all $(SET_NDEBUG) \
$(SET_DEBUG_FLAGS) CFLAGS="$(CFLAGS) $(OSSL_VERSION_QUIRKS)" \
SECUTILS_USE_ICV=$(SECUTILS_USE_ICV) SECUTILS_USE_UTA=$(SECUTILS_USE_UTA) \
SECUTILS_NO_TLS=$(SECUTILS_NO_TLS) OPENSSL_DIR="$(OPENSSL_REVERSE_DIR)" \
OPENSSL_LIB="$(OPENSSL_REVERSE_LIB)" OUT_DIR="$(OUT_REVERSE_DIR)" -s

ifdef USE_LIBCMP
$(LIBCMP_DIR)/include:
Expand All @@ -331,7 +335,10 @@ update_cmpossl:
build_cmpossl: # not: update_cmpossl
@ # the old way to build with CMP was: buildCMPforOpenSSL
ifdef USE_LIBCMP
$(MAKE) -C $(LIBCMP_DIR) -f Makefile_v1 -s build $(SET_NDEBUG) $(SET_DEBUG_FLAGS) CFLAGS="$(CFLAGS)" OPENSSL_DIR="$(OPENSSL_REVERSE_DIR)" OPENSSL_LIB="$(OPENSSL_REVERSE_LIB)" OUT_DIR="$(OUT_REVERSE_DIR)" PWD=$(PWD)/$(LIBCMP_DIR)
$(MAKE) -C $(LIBCMP_DIR) -f Makefile_v1 build $(SET_NDEBUG) \
$(SET_DEBUG_FLAGS) CFLAGS="$(CFLAGS)" OPENSSL_DIR="$(OPENSSL_REVERSE_DIR)" \
OPENSSL_LIB="$(OPENSSL_REVERSE_LIB)" OUT_DIR="$(OUT_REVERSE_DIR)" \
PWD=$(PWD)/$(LIBCMP_DIR) -s
endif

clean_submodules:
Expand Down Expand Up @@ -380,7 +387,11 @@ ifneq ($(findstring build,$(MAKECMDGOALS))$(findstring default,$(MAKECMDGOALS)),
$(info detected OpenSSL version $(OPENSSL_VERSION))
endif
build_only: $(GENCMPCLIENT_CONFIG)
$(MAKE) -f Makefile_src build OUT_DIR="$(OUT_DIR)" BIN_DIR="$(BIN_DIR)" LIB_NAME="$(OUTLIB)" VERSION="$(VERSION)" $(SET_NDEBUG) $(SET_DEBUG_FLAGS) CFLAGS="$(CFLAGS)" OPENSSL_DIR="$(OPENSSL_DIR)" OPENSSL_LIB="$(OPENSSL_LIB)" LIBCMP_INC="$(LIBCMP_INC)" OSSL_VERSION_QUIRKS="$(OSSL_VERSION_QUIRKS)" INSTALL_DEB_PKGS=$(INSTALL_DEB_PKGS) DEB_TARGET_ARCH=$(DEB_TARGET_ARCH)
$(MAKE) -f Makefile_src build OUT_DIR="$(OUT_DIR)" BIN_DIR="$(BIN_DIR)"\
LIB_NAME="$(OUTLIB)" VERSION="$(VERSION)" $(SET_NDEBUG) $(SET_DEBUG_FLAGS) \
CFLAGS="$(CFLAGS)" OPENSSL_DIR="$(OPENSSL_DIR)" OPENSSL_LIB="$(OPENSSL_LIB)" \
LIBCMP_INC="$(LIBCMP_INC)" OSSL_VERSION_QUIRKS="$(OSSL_VERSION_QUIRKS)" \
INSTALL_DEB_PKGS=$(INSTALL_DEB_PKGS) DEB_TARGET_ARCH=$(DEB_TARGET_ARCH)

build_no_tls:
$(MAKE) -C $(SECUTILS_DIR) -f Makefile_v1 clean_config
Expand All @@ -393,7 +404,7 @@ build_no_tls:

ifeq ($(LPATH),)
clean_uta:
$(MAKE) -C $(SECUTILS_DIR) -f Makefile_v1 -s clean_uta
$(MAKE) -C $(SECUTILS_DIR) -f Makefile_v1 clean_uta -s
endif

clean_test:
Expand All @@ -402,7 +413,7 @@ clean_test:
OUT_DOC=cmpClient.1.gz
OUT_DEV_DOC=Generic_CMP_client_API.pdf
clean_this: clean_test
$(MAKE) -f Makefile_src -s clean OUT_DIR="$(OUT_DIR)" BIN_DIR="$(BIN_DIR)" LIB_NAME="$(OUTLIB)" VERSION="$(VERSION)"
$(MAKE) -f Makefile_src clean OUT_DIR="$(OUT_DIR)" BIN_DIR="$(BIN_DIR)" LIB_NAME="$(OUTLIB)" VERSION="$(VERSION)" -s
rm -f libgencmp-*.zip
rm -f doc/{*.1{,.gz},*.md}

Expand All @@ -414,11 +425,11 @@ endif
clean: clean_this clean_config
ifeq ($(LPATH),)
ifneq ($(wildcard $(SECUTILS_DIR)),)
$(MAKE) -C $(SECUTILS_DIR) -f Makefile_v1 -s $(CLEAN) OUT_DIR="$(OUT_REVERSE_DIR)"
$(MAKE) -C $(SECUTILS_DIR) -f Makefile_v1 $(CLEAN) OUT_DIR="$(OUT_REVERSE_DIR)" -s
endif
# ifdef USE_LIBCMP # better always try cleaning cmpossl artifacts, which may have been produced earlier with USE_LIBCMP=1
ifneq ($(wildcard $(LIBCMP_DIR)/Makefile_v1),)
$(MAKE) -C $(LIBCMP_DIR) -f Makefile_v1 -s $(CLEAN) OUT_DIR="$(OUT_REVERSE_DIR)"
$(MAKE) -C $(LIBCMP_DIR) -f Makefile_v1 $(CLEAN) OUT_DIR="$(OUT_REVERSE_DIR)" -s
endif
# endif
endif
Expand Down Expand Up @@ -667,7 +678,7 @@ test: clean build_no_tls
# doc and zip ##################################################################

doc: doc_this get_submodules
$(MAKE) -C $(SECUTILS_DIR) -f Makefile_v1 -s doc
$(MAKE) -C $(SECUTILS_DIR) -f Makefile_v1 doc -s

doc/$(OUT_DEV_DOC): doc/Generic_CMP_client_API.odt # to be done manually

Expand Down

0 comments on commit 2bc4e5c

Please sign in to comment.