From deea6261e9985380da80fd983df38060496ca6cc Mon Sep 17 00:00:00 2001 From: Kareem Date: Wed, 2 Mar 2022 13:20:22 -0700 Subject: [PATCH 1/2] Allow disabling forced 'make clean' at the end of ./configure. --- configure.ac | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index 1c076891a..e4d56db54 100644 --- a/configure.ac +++ b/configure.ac @@ -6821,6 +6821,14 @@ AC_ARG_ENABLE([iotsafe-hwrng], [ ENABLED_IOTSAFE_HWRNG=no ] ) +# Make clean +AC_ARG_ENABLE([makeclean], + [AS_HELP_STRING([--enable-makeclean], [Enables forced "make clean" at the + end of configure (default: enabled)])], + [ ENABLED_MAKECLEAN=$enableval ], + [ ENABLED_MAKECLEAN=yes ] + ) + # User Settings AC_ARG_ENABLE([usersettings], [AS_HELP_STRING([--enable-usersettings],[Use your own user_settings.h and do not add Makefile CFLAGS (default: disabled)])], @@ -7707,13 +7715,16 @@ AX_OUT_OF_TREE_FILE([wolfssl/wolfcrypt/port/intel/quickassist_mem.h]) AC_OUTPUT -# force make clean -AC_MSG_NOTICE([---]) -AC_MSG_NOTICE([Running make clean...]) -if test "$verbose" = "yes"; then - make clean -else - make clean >/dev/null +if test "$ENABLED_MAKECLEAN" = "yes" +then + # force make clean + AC_MSG_NOTICE([---]) + AC_MSG_NOTICE([Running make clean...]) + if test "$verbose" = "yes"; then + make clean + else + make clean >/dev/null + fi fi if test "$ENABLED_REPRODUCIBLE_BUILD" != "yes" From 09e7b7150f855997374e1464b4089f53e4d30b45 Mon Sep 17 00:00:00 2001 From: Kareem Date: Thu, 3 Mar 2022 15:46:57 -0700 Subject: [PATCH 2/2] Allow overriding make command used for make clean with make. --- configure.ac | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index e4d56db54..12774aba1 100644 --- a/configure.ac +++ b/configure.ac @@ -7720,10 +7720,14 @@ then # force make clean AC_MSG_NOTICE([---]) AC_MSG_NOTICE([Running make clean...]) + if test -z "$MAKE"; then + MAKE="make" + fi + if test "$verbose" = "yes"; then - make clean + $MAKE clean else - make clean >/dev/null + $MAKE clean >/dev/null fi fi