Add autotools-clean and cmake-clean rules to GNUmakefile

This commit is contained in:
Jeffrey Walton 2018-07-28 09:21:31 -04:00
parent a0ad5e815c
commit ef5a3d3905
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
3 changed files with 35 additions and 25 deletions

View File

@ -875,19 +875,26 @@ clean:
@-$(RM) -r *.dylib.dSYM/ @-$(RM) -r *.dylib.dSYM/
@-$(RM) -r cov-int/ @-$(RM) -r cov-int/
.PHONY: distclean .PHONY: autotools-clean
distclean: clean autotools-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) -f configure.ac configure configure.in Makefile.am Makefile.in Makefile @-$(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 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) -f stamp-h1 ar-lib *.m4 local.* lt*.sh missing libtool* libcryptopp.pc*
@-$(RM) -rf m4/ auto*.cache/ .deps/ .libs/ @-$(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) -r TestCoverage/
@-$(RM) cryptopp$(LIB_VER)\.* @-$(RM) cryptopp$(LIB_VER)\.* CryptoPPRef.zip
@-$(RM) CryptoPPRef.zip
# Install cryptest.exe, libcryptopp.a, libcryptopp.so and libcryptopp.pc. # Install cryptest.exe, libcryptopp.a, libcryptopp.so and libcryptopp.pc.
# The library install was broken-out into its own recipe at GH #653. # The library install was broken-out into its own recipe at GH #653.

View File

@ -387,10 +387,10 @@ lean: static dynamic cryptest.exe
.PHONY: clean .PHONY: clean
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.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) 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) *.la *.lo *.gcov *.gcno *.gcda *.stackdump core core-*
@-$(RM) /tmp/adhoc.exe @-$(RM) /tmp/adhoc.exe
@-$(RM) -r /tmp/cryptopp_test/ @-$(RM) -r /tmp/cryptopp_test/
@ -398,18 +398,26 @@ clean:
@-$(RM) -r *.dylib.dSYM/ @-$(RM) -r *.dylib.dSYM/
@-$(RM) -r cov-int/ @-$(RM) -r cov-int/
.PHONY: distclean .PHONY: autotools-clean
distclean: clean autotools-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/
@-$(RM) -f configure.ac configure configure.in Makefile.am Makefile.in Makefile @-$(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 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) -f stamp-h1 ar-lib *.m4 local.* lt*.sh missing libtool* libcryptopp.pc*
@-$(RM) -rf m4/ auto*.cache/ .deps/ .libs/ @-$(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) -r TestCoverage/
@-$(RM) cryptopp$(LIB_VER)\.* @-$(RM) cryptopp$(LIB_VER)\.* CryptoPPRef.zip
@-$(RM) CryptoPPRef.zip
# Install cryptest.exe, libcryptopp.a and libcryptopp.so. # Install cryptest.exe, libcryptopp.a and libcryptopp.so.
# The library install was broken-out into its own recipe at GH #653. # The library install was broken-out into its own recipe at GH #653.

View File

@ -17,14 +17,11 @@ if ! wget --no-check-certificate https://github.com/noloader/cryptopp-cmake/blob
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1 [[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
fi fi
# TODO: Remove this. It is for debugging changes before check-in
# cp ~/cryptopp-cmake/CMakeLists.txt $(pwd)
PWD_DIR=$(pwd) PWD_DIR=$(pwd)
rm -rf "$PWD_DIR/build" rm -rf "$PWD_DIR/cmake_build"
mkdir -p "$PWD_DIR/build" mkdir -p "$PWD_DIR/cmake_build"
cd "$PWD_DIR/build" cd "$PWD_DIR/cmake_build"
if ! cmake ../; then if ! cmake ../; then
echo "cmake failed" echo "cmake failed"
@ -48,5 +45,3 @@ fi
# Return success # Return success
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 0 || return 0 [[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 0 || return 0