Tweaked makefile recipes to use variables for CP, MV, MKDIR, etc. Added Cmake artifacts to distclean rule

pull/91/head
Jeffrey Walton 2015-12-26 06:45:59 -05:00
parent ca7394540b
commit 79882d4c7d
4 changed files with 206 additions and 200 deletions

View File

@ -138,7 +138,7 @@ ALWAYS_DETAILED_SEC = NO
# operators of the base classes will not be shown. # operators of the base classes will not be shown.
# The default value is: NO. # The default value is: NO.
INLINE_INHERITED_MEMB = YES INLINE_INHERITED_MEMB = NO
# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path # If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path
# before files name in the file list and in the header files. If set to NO the # before files name in the file list and in the header files. If set to NO the

View File

@ -16,6 +16,7 @@ ARFLAGS ?= -cr # ar needs the dash on OpenBSD
RANLIB ?= ranlib RANLIB ?= ranlib
CP ?= cp CP ?= cp
MV ?= mv
CHMOD ?= chmod CHMOD ?= chmod
MKDIR ?= mkdir MKDIR ?= mkdir
EGREP ?= egrep EGREP ?= egrep
@ -339,7 +340,7 @@ endif
docs html: docs html:
-$(RM) -r $(DOXYGEN_DIRECTORY)/ $(DOCUMENT_DIRECTORY)/ html-docs/ -$(RM) -r $(DOXYGEN_DIRECTORY)/ $(DOCUMENT_DIRECTORY)/ html-docs/
doxygen Doxyfile -d CRYPTOPP_DOXYGEN_PROCESSING doxygen Doxyfile -d CRYPTOPP_DOXYGEN_PROCESSING
mv $(DOXYGEN_DIRECTORY)/ $(DOCUMENT_DIRECTORY)/ $(MV) $(DOXYGEN_DIRECTORY)/ $(DOCUMENT_DIRECTORY)/
-$(RM) CryptoPPRef.zip -$(RM) CryptoPPRef.zip
zip -9 CryptoPPRef.zip -x ".*" -x "*/.*" -r $(DOCUMENT_DIRECTORY)/ zip -9 CryptoPPRef.zip -x ".*" -x "*/.*" -r $(DOCUMENT_DIRECTORY)/
@ -363,7 +364,12 @@ endif
.PHONY: distclean .PHONY: distclean
distclean: clean distclean: clean
-$(RM) adhoc.cpp adhoc.cpp.copied GNUmakefile.deps benchmarks.html cryptest.txt cryptest-*.txt *.o *.ii *.s *~ -$(RM) adhoc.cpp adhoc.cpp.copied GNUmakefile.deps benchmarks.html cryptest.txt cryptest-*.txt
-$(RM) CMakeCache.txt Makefile CTestTestfile.cmake cmake_install.cmake cryptopp-config-version.cmake
-$(RM) *.o *.ii *.s *~
ifneq ($(wildcard CMakeFiles/),)
-$(RM) -r CMakeFiles/
endif
ifneq ($(wildcard cryptopp$(LIB_VER)\.*),) ifneq ($(wildcard cryptopp$(LIB_VER)\.*),)
-$(RM) cryptopp$(LIB_VER)\.* -$(RM) cryptopp$(LIB_VER)\.*
endif endif
@ -461,7 +467,7 @@ dlltest.exe: cryptopp.dll $(DLLTESTOBJS)
$(CXX) -o $@ $(CXXFLAGS) $(DLLTESTOBJS) -L. -lcryptopp.dll $(LDFLAGS) $(LDLIBS) $(CXX) -o $@ $(CXXFLAGS) $(DLLTESTOBJS) -L. -lcryptopp.dll $(LDFLAGS) $(LDLIBS)
# This recipe prepares the distro files # This recipe prepares the distro files
TEXT_FILES := *.h *.cpp adhoc.cpp.proto License.txt Readme.txt Install.txt Filelist.txt config.recommend Doxyfile cryptest* cryptlib* dlltest* cryptdll* *.sln *.vcproj *.dsw *.dsp cryptopp.rc TestVectors/*.txt TestData/*.dat TEXT_FILES := *.h *.cpp adhoc.cpp.proto License.txt Readme.txt Install.txt Filelist.txt CMakeLists.txt config.recommend Doxyfile cryptest* cryptlib* dlltest* cryptdll* *.sln *.vcproj *.dsw *.dsp cryptopp.rc TestVectors/*.txt TestData/*.dat
EXEC_FILES := GNUmakefile GNUmakefile-cross TestData/ TestVectors/ EXEC_FILES := GNUmakefile GNUmakefile-cross TestData/ TestVectors/
ifeq ($(wildcard Filelist.txt),Filelist.txt) ifeq ($(wildcard Filelist.txt),Filelist.txt)
@ -470,11 +476,11 @@ endif
.PHONY: convert .PHONY: convert
convert: convert:
-chmod 0700 TestVectors/ TestData/ -$(CHMOD) 0700 TestVectors/ TestData/
-chmod 0600 $(TEXT_FILES) *.asm *.S *.zip -$(CHMOD) 0600 $(TEXT_FILES) *.asm *.S *.zip *.cmake
-chmod 0700 $(EXEC_FILES) *.sh *.cmd -$(CHMOD) 0700 $(EXEC_FILES) *.sh *.cmd
-chmod 0700 *.cmd *.sh GNUmakefile GNUmakefile-cross -$(CHMOD) 0700 *.cmd *.sh GNUmakefile GNUmakefile-cross
-unix2dos --keepdate --quiet $(TEXT_FILES) *.asm *.cmd -unix2dos --keepdate --quiet $(TEXT_FILES) *.asm *.cmd *.cmake
-dos2unix --keepdate --quiet GNUmakefile GNUmakefile-cross *.S *.sh -dos2unix --keepdate --quiet GNUmakefile GNUmakefile-cross *.S *.sh
ifneq ($(IS_DARWIN),0) ifneq ($(IS_DARWIN),0)
-xattr -c * -xattr -c *
@ -487,15 +493,15 @@ zip dist: | distclean convert
.PHONY: iso .PHONY: iso
iso: | zip iso: | zip
ifneq ($(IS_DARWIN),0) ifneq ($(IS_DARWIN),0)
mkdir -p $(PWD)/cryptopp$(LIB_VER) $(MKDIR) -p $(PWD)/cryptopp$(LIB_VER)
cp cryptopp$(LIB_VER).zip $(PWD)/cryptopp$(LIB_VER) $(CP) cryptopp$(LIB_VER).zip $(PWD)/cryptopp$(LIB_VER)
hdiutil makehybrid -iso -joliet -o cryptopp$(LIB_VER).iso $(PWD)/cryptopp$(LIB_VER) hdiutil makehybrid -iso -joliet -o cryptopp$(LIB_VER).iso $(PWD)/cryptopp$(LIB_VER)
-rm -rf $(PWD)/cryptopp$(LIB_VER) -$(RM) -r $(PWD)/cryptopp$(LIB_VER)
else ifneq ($(IS_LINUX),0) else ifneq ($(IS_LINUX),0)
mkdir -p $(PWD)/cryptopp$(LIB_VER) $(MKDIR) -p $(PWD)/cryptopp$(LIB_VER)
cp cryptopp$(LIB_VER).zip $(PWD)/cryptopp$(LIB_VER) $(CP) cryptopp$(LIB_VER).zip $(PWD)/cryptopp$(LIB_VER)
genisoimage -q -o cryptopp$(LIB_VER).iso $(PWD)/cryptopp$(LIB_VER) genisoimage -q -o cryptopp$(LIB_VER).iso $(PWD)/cryptopp$(LIB_VER)
-rm -rf $(PWD)/cryptopp$(LIB_VER) -$(RM) -r $(PWD)/cryptopp$(LIB_VER)
endif endif
.PHONY: bench benchmark benchmarks .PHONY: bench benchmark benchmarks