From ef5a3d3905318f5c68ed48c3d3b8937bbfc2f811 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Sat, 28 Jul 2018 09:21:31 -0400 Subject: [PATCH] Add autotools-clean and cmake-clean rules to GNUmakefile --- GNUmakefile | 23 +++++++++++++++-------- GNUmakefile-cross | 26 +++++++++++++++++--------- TestScripts/cryptest-cmake.sh | 11 +++-------- 3 files changed, 35 insertions(+), 25 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 69d9fbd4..d0ae1bad 100755 --- a/GNUmakefile +++ b/GNUmakefile @@ -875,19 +875,26 @@ clean: @-$(RM) -r *.dylib.dSYM/ @-$(RM) -r cov-int/ -.PHONY: distclean -distclean: clean - -$(RM) adhoc.cpp adhoc.cpp.copied GNUmakefile.deps benchmarks.html cryptest.txt cryptest-*.txt - @-$(RM) libcryptopp.pc cryptopp.tgz *.o *.bc *.ii *~ - @-$(RM) -r cryptlib.lib cryptest.exe *.suo *.sdf *.pdb Win32/ x64/ ipch/ - @-$(RM) -r $(LIBOBJS:.o=.obj) $(TESTOBJS:.o=.obj) $(DOCUMENT_DIRECTORY)/ +.PHONY: autotools-clean +autotools-clean: @-$(RM) -f configure.ac configure configure.in Makefile.am Makefile.in Makefile @-$(RM) -f config.guess config.status config.sub depcomp install-sh compile @-$(RM) -f stamp-h1 ar-lib *.m4 local.* lt*.sh missing libtool* libcryptopp.pc* @-$(RM) -rf m4/ auto*.cache/ .deps/ .libs/ + +.PHONY: cmake-clean +cmake-clean: + @-$(RM) -f cryptopp-config.cmake CMakeLists.txt + @-$(RM) -rf cmake_build/ + +.PHONY: distclean +distclean: clean autotools-clean cmake-clean + -$(RM) adhoc.cpp adhoc.cpp.copied GNUmakefile.deps benchmarks.html cryptest.txt cryptest-*.txt + @-$(RM) libcryptopp.pc cryptopp.tgz *.o *.bc *.ii *~ + @-$(RM) -r cryptlib.lib cryptest.exe *.suo *.sdf *.pdb Win32/ x64/ ipch/ + @-$(RM) -r $(LIBOBJS:.o=.obj) $(TESTOBJS:.o=.obj) $(DOCUMENT_DIRECTORY)/ @-$(RM) -r TestCoverage/ - @-$(RM) cryptopp$(LIB_VER)\.* - @-$(RM) CryptoPPRef.zip + @-$(RM) cryptopp$(LIB_VER)\.* CryptoPPRef.zip # Install cryptest.exe, libcryptopp.a, libcryptopp.so and libcryptopp.pc. # The library install was broken-out into its own recipe at GH #653. diff --git a/GNUmakefile-cross b/GNUmakefile-cross index ef2113d7..1bd559d6 100755 --- a/GNUmakefile-cross +++ b/GNUmakefile-cross @@ -387,10 +387,10 @@ lean: static dynamic cryptest.exe .PHONY: clean clean: - -$(RM) adhoc.cpp.o adhoc.cpp.proto.o $(LIBOBJS) $(AOSP_CPU_OBJ) $(TESTOBJS) $(DLLOBJS) $(LIBIMPORTOBJS) $(TESTIMPORTOBJS) $(DLLTESTOBJS) + -$(RM) adhoc.cpp.o adhoc.cpp.proto.o $(LIBOBJS) rdrand-*.o $(TESTOBJS) $(DLLOBJS) $(LIBIMPORTOBJS) $(TESTIMPORTOBJS) $(DLLTESTOBJS) @-$(RM) libcryptopp.a libcryptopp.dylib cryptopp.dll libcryptopp.dll.a libcryptopp.import.a @-$(RM) libcryptopp.so libcryptopp.so$(SOLIB_COMPAT_SUFFIX) libcryptopp.so$(SOLIB_VERSION_SUFFIX) - @-$(RM) cryptest.exe dlltest.exe cryptest.import.exe cryptest.info ct rdrand-???.o + @-$(RM) cryptest.exe dlltest.exe cryptest.import.exe cryptest.info ct et @-$(RM) *.la *.lo *.gcov *.gcno *.gcda *.stackdump core core-* @-$(RM) /tmp/adhoc.exe @-$(RM) -r /tmp/cryptopp_test/ @@ -398,18 +398,26 @@ clean: @-$(RM) -r *.dylib.dSYM/ @-$(RM) -r cov-int/ -.PHONY: distclean -distclean: clean - -$(RM) adhoc.cpp adhoc.cpp.copied GNUmakefile.deps benchmarks.html cryptest.txt cryptest-*.txt - @-$(RM) cryptopp.tgz *.o *.bc *.ii *~ - @-$(RM) -r $(SRCS:.cpp=.obj) cryptlib.lib cryptest.exe *.suo *.sdf *.pdb Win32/ x64/ ipch/ +.PHONY: autotools-clean +autotools-clean: @-$(RM) -f configure.ac configure configure.in Makefile.am Makefile.in Makefile @-$(RM) -f config.guess config.status config.sub depcomp install-sh compile @-$(RM) -f stamp-h1 ar-lib *.m4 local.* lt*.sh missing libtool* libcryptopp.pc* @-$(RM) -rf m4/ auto*.cache/ .deps/ .libs/ + +.PHONY: cmake-clean +cmake-clean: + @-$(RM) -f cryptopp-config.cmake CMakeLists.txt + @-$(RM) -rf cmake_build/ + +.PHONY: distclean +distclean: clean autotools-clean cmake-clean + -$(RM) adhoc.cpp adhoc.cpp.copied GNUmakefile.deps benchmarks.html cryptest.txt cryptest-*.txt + @-$(RM) libcryptopp.pc cryptopp.tgz *.o *.bc *.ii *~ + @-$(RM) -r cryptlib.lib cryptest.exe *.suo *.sdf *.pdb Win32/ x64/ ipch/ + @-$(RM) -r $(LIBOBJS:.o=.obj) $(TESTOBJS:.o=.obj) $(DOCUMENT_DIRECTORY)/ @-$(RM) -r TestCoverage/ - @-$(RM) cryptopp$(LIB_VER)\.* - @-$(RM) CryptoPPRef.zip + @-$(RM) cryptopp$(LIB_VER)\.* CryptoPPRef.zip # Install cryptest.exe, libcryptopp.a and libcryptopp.so. # The library install was broken-out into its own recipe at GH #653. diff --git a/TestScripts/cryptest-cmake.sh b/TestScripts/cryptest-cmake.sh index 91f134c4..842a4c30 100755 --- a/TestScripts/cryptest-cmake.sh +++ b/TestScripts/cryptest-cmake.sh @@ -17,14 +17,11 @@ if ! wget --no-check-certificate https://github.com/noloader/cryptopp-cmake/blob [[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1 fi -# TODO: Remove this. It is for debugging changes before check-in -# cp ~/cryptopp-cmake/CMakeLists.txt $(pwd) - PWD_DIR=$(pwd) -rm -rf "$PWD_DIR/build" -mkdir -p "$PWD_DIR/build" -cd "$PWD_DIR/build" +rm -rf "$PWD_DIR/cmake_build" +mkdir -p "$PWD_DIR/cmake_build" +cd "$PWD_DIR/cmake_build" if ! cmake ../; then echo "cmake failed" @@ -48,5 +45,3 @@ fi # Return success [[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 0 || return 0 - -