Updated makefile trim and convert rules

Whitespace check-in
pull/242/merge
Jeffrey Walton 2017-05-26 10:08:44 -04:00
parent 4f5dd74286
commit 84e6961457
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
6 changed files with 170 additions and 170 deletions

View File

@ -34,9 +34,9 @@ test_script:
- cmd: >- - cmd: >-
msbuild /t:CopyCryptestToRoot cryptest.vcxproj msbuild /t:CopyCryptestToRoot cryptest.vcxproj
cryptest.exe v cryptest.exe v
cryptest.exe tv all cryptest.exe tv all
# Right now, we have a few failures that we don't know how to workaround. # Right now, we have a few failures that we don't know how to workaround.

View File

@ -1,64 +1,64 @@
language: cpp language: cpp
os: os:
- linux - linux
- osx - osx
dist: trusty dist: trusty
sudo: false sudo: false
# OS X only supports one image. Use the latest. # OS X only supports one image. Use the latest.
osx_image: xcode8.2 osx_image: xcode8.2
git: git:
depth: 3 depth: 3
compiler: compiler:
- clang - clang
- gcc - gcc
env: env:
global: global:
- BUILD_JOBS=2 - BUILD_JOBS=2
matrix: matrix:
- BUILD_MODE="shared" - BUILD_MODE="shared"
- BUILD_MODE="static" - BUILD_MODE="static"
- BUILD_MODE="no-asm" - BUILD_MODE="no-asm"
- BUILD_MODE="asan" - BUILD_MODE="asan"
- BUILD_MODE="ubsan" - BUILD_MODE="ubsan"
- BUILD_MODE="valgrind" - BUILD_MODE="valgrind"
exclude: exclude:
# Skip GCC on OS X entirely # Skip GCC on OS X entirely
- os: osx - os: osx
compiler: gcc compiler: gcc
# The sanitizer builds under Clang run the tests very # The sanitizer builds under Clang run the tests very
# slowly and cause CI timeouts. # slowly and cause CI timeouts.
- compiler: clang - compiler: clang
env: BUILD_MODE="asan" env: BUILD_MODE="asan"
- compiler: clang - compiler: clang
env: BUILD_MODE="ubsan" env: BUILD_MODE="ubsan"
- compiler: clang - compiler: clang
env: BUILD_MODE="valgrind" env: BUILD_MODE="valgrind"
script: script:
- make clean &>/dev/null && make - make clean &>/dev/null && make
- ./cryptest.exe v && ./cryptest.exe tv all - ./cryptest.exe v && ./cryptest.exe tv all
# whitelist branches to avoid testing feature branches twice # whitelist branches to avoid testing feature branches twice
branches: branches:
only: only:
- master - master
addons: addons:
sonarqube: true sonarqube: true
coverity_scan: coverity_scan:
project: project:
name: "cryptopp" name: "cryptopp"
build_command: "make -j 2" build_command: "make -j 2"
#notifications: #notifications:
# email: jdoe@example.com # email: jdoe@example.com

View File

@ -725,22 +725,22 @@ endif
.PHONY: trim .PHONY: trim
trim: trim:
ifneq ($(IS_DARWIN),0) ifneq ($(IS_DARWIN),0)
sed -i '' -e's/[[:space:]]*$$//' *.sh *.h *.cpp *.asm *.s *.sln *.vcxproj *.filters GNUmakefile GNUmakefile-cross sed -i '' -e's/[[:space:]]*$$//' *.sh .*.yml *.h *.cpp *.asm *.s *.sln *.vcxproj *.filters GNUmakefile GNUmakefile-cross
sed -i '' -e's/[[:space:]]*$$//' TestData/*.dat TestVectors/*.txt TestScripts/*.sh sed -i '' -e's/[[:space:]]*$$//' TestData/*.dat TestVectors/*.txt TestScripts/*.*
make convert make convert
else else
sed -i -e's/[[:space:]]*$$//' *.sh *.h *.cpp *.asm *.s *.sln *.vcxproj *.filters GNUmakefile GNUmakefile-cross sed -i -e's/[[:space:]]*$$//' *.sh .*.yml *.h *.cpp *.asm *.s *.sln *.vcxproj *.filters GNUmakefile GNUmakefile-cross
sed -i -e's/[[:space:]]*$$//' TestData/*.dat TestVectors/*.txt TestScripts/*.sh sed -i -e's/[[:space:]]*$$//' TestData/*.dat TestVectors/*.txt TestScripts/*.*
make convert make convert
endif endif
.PHONY: convert .PHONY: convert
convert: convert:
@-$(CHMOD) 0700 TestVectors/ TestData/ TestScripts/ @-$(CHMOD) 0700 TestVectors/ TestData/ TestScripts/
@-$(CHMOD) 0600 $(TEXT_FILES) *.asm *.s *.zip *.cmake TestVectors/*.txt TestData/*.dat @-$(CHMOD) 0600 $(TEXT_FILES) .*.yml *.asm *.s *.zip *.cmake TestVectors/*.txt TestData/*.dat TestScripts/*.*
@-$(CHMOD) 0700 $(EXEC_FILES) *.sh *.cmd TestScripts/*.sh TestScripts/*.pl TestScripts/*.cmd @-$(CHMOD) 0700 $(EXEC_FILES) *.sh *.cmd TestScripts/*.sh TestScripts/*.pl TestScripts/*.cmd
@-$(CHMOD) 0700 *.cmd *.sh GNUmakefile GNUmakefile-cross TestScripts/*.sh TestScripts/*.pl @-$(CHMOD) 0700 *.cmd *.sh GNUmakefile GNUmakefile-cross TestScripts/*.sh TestScripts/*.pl
-unix2dos --keepdate --quiet $(TEXT_FILES) *.asm *.cmd *.cmake TestScripts/*.pl TestScripts/*.cmd -unix2dos --keepdate --quiet $(TEXT_FILES) .*.yml *.asm *.cmd *.cmake TestScripts/*.*
-dos2unix --keepdate --quiet GNUmakefile GNUmakefile-cross *.s *.sh TestScripts/*.sh -dos2unix --keepdate --quiet GNUmakefile GNUmakefile-cross *.s *.sh TestScripts/*.sh
ifneq ($(IS_DARWIN),0) ifneq ($(IS_DARWIN),0)
@-xattr -c * @-xattr -c *

View File

@ -1,32 +1,32 @@
# coverity-linux.txt - Scan build submission instructions for Unix and Linux. # coverity-linux.txt - Scan build submission instructions for Unix and Linux.
# Written and placed in public domain by Jeffrey Walton and Uri Blumenthal. # Written and placed in public domain by Jeffrey Walton and Uri Blumenthal.
# Copyright assigned to Crypto++ project. # Copyright assigned to Crypto++ project.
# #
# The following are copy/paste instructions for invoking cov-build, building the library and submitting the artifacts for a scan. # The following are copy/paste instructions for invoking cov-build, building the library and submitting the artifacts for a scan.
# #
# For more information see http://cryptopp.com/wiki/Coverity_Scan. # For more information see http://cryptopp.com/wiki/Coverity_Scan.
################################################################## ##################################################################
reset reset
make distclean &>/dev/null make distclean &>/dev/null
# Usually we test with these flags # Usually we test with these flags
# CXXFLAGS="-DNDEBUG -g3 -O2" # CXXFLAGS="-DNDEBUG -g3 -O2"
# Testing for Issue 302 (http://github.com/weidai11/cryptopp/issues/302) # Testing for Issue 302 (http://github.com/weidai11/cryptopp/issues/302)
CXXFLAGS="-DNDEBUG -g2 -O3 -march=i686 -msse -msse2 -msse3 -mssse3 -mno-aes" cov-build --dir cov-int make -j 2 CXXFLAGS="-DNDEBUG -g2 -O3 -march=i686 -msse -msse2 -msse3 -mssse3 -mno-aes" cov-build --dir cov-int make -j 2
tar czvf cryptopp.tgz cov-int tar czvf cryptopp.tgz cov-int
CRYPTOPP_COVERITY_TOKEN=XXXXXXXXXXXXXXXX CRYPTOPP_COVERITY_TOKEN=XXXXXXXXXXXXXXXX
COVERITY_SCAN_NAME="Rijndael-AliasedTable-SSE2-Linux-i686" COVERITY_SCAN_NAME="Rijndael-AliasedTable-SSE2-Linux-i686"
curl curl
--form token="$CRYPTOPP_COVERITY_TOKEN" \ --form token="$CRYPTOPP_COVERITY_TOKEN" \
--form email=webmaster@cryptopp.com \ --form email=webmaster@cryptopp.com \
--form file=@cryptopp.tgz \ --form file=@cryptopp.tgz \
--form version="$COVERITY_SCAN_NAME" \ --form version="$COVERITY_SCAN_NAME" \
--form description="$COVERITY_SCAN_NAME" \ --form description="$COVERITY_SCAN_NAME" \
https://scan.coverity.com/builds?project=Cryptopp https://scan.coverity.com/builds?project=Cryptopp

View File

@ -1,36 +1,36 @@
# coverity-linux.txt - Scan build submission instructions for Unix and Linux. # coverity-linux.txt - Scan build submission instructions for Unix and Linux.
# Written and placed in public domain by Jeffrey Walton and Uri Blumenthal. # Written and placed in public domain by Jeffrey Walton and Uri Blumenthal.
# Copyright assigned to Crypto++ project. # Copyright assigned to Crypto++ project.
# #
# The following are copy/paste instructions for invoking cov-build, building the library and submitting the artifacts for a scan. # The following are copy/paste instructions for invoking cov-build, building the library and submitting the artifacts for a scan.
# #
# For more information see http://cryptopp.com/wiki/Coverity_Scan. # For more information see http://cryptopp.com/wiki/Coverity_Scan.
################################################################## ##################################################################
reset reset
make distclean &>/dev/null make distclean &>/dev/null
# Usually we test with these flags # Usually we test with these flags
CXXFLAGS="-DNDEBUG -g3 -O2" cov-build --dir cov-int make -j 2 CXXFLAGS="-DNDEBUG -g3 -O2" cov-build --dir cov-int make -j 2
# Sometimes we need these flags (add COVERITY_UNSUPPORTED) # Sometimes we need these flags (add COVERITY_UNSUPPORTED)
# COVERITY_UNSUPPORTED=1 CXXFLAGS="-DNDEBUG -g3 -O2" cov-build --dir cov-int make -j 2 # COVERITY_UNSUPPORTED=1 CXXFLAGS="-DNDEBUG -g3 -O2" cov-build --dir cov-int make -j 2
# Sometimes we need these flags (alternate compile, C++11) # Sometimes we need these flags (alternate compile, C++11)
# CXX=/opt/local/bin/clang++-mp-3.7 COVERITY_UNSUPPORTED=1 CXXFLAGS="-DNDEBUG -g3 -O2 -std=c++11" cov-build --dir cov-int make -j 2 # CXX=/opt/local/bin/clang++-mp-3.7 COVERITY_UNSUPPORTED=1 CXXFLAGS="-DNDEBUG -g3 -O2 -std=c++11" cov-build --dir cov-int make -j 2
tar czvf cryptopp.tgz cov-int tar czvf cryptopp.tgz cov-int
CRYPTOPP_COVERITY_TOKEN=XXXXXXXXXXXXXXXX CRYPTOPP_COVERITY_TOKEN=XXXXXXXXXXXXXXXX
COVERITY_SCAN_NAME="Cryptopp-MacOSX-x86_64" COVERITY_SCAN_NAME="Cryptopp-MacOSX-x86_64"
curl curl
--form token="$CRYPTOPP_COVERITY_TOKEN" \ --form token="$CRYPTOPP_COVERITY_TOKEN" \
--form email=webmaster@cryptopp.com \ --form email=webmaster@cryptopp.com \
--form file=@cryptopp.tgz \ --form file=@cryptopp.tgz \
--form version="$COVERITY_SCAN_NAME" \ --form version="$COVERITY_SCAN_NAME" \
--form description="$COVERITY_SCAN_NAME" \ --form description="$COVERITY_SCAN_NAME" \
https://scan.coverity.com/builds?project=Cryptopp https://scan.coverity.com/builds?project=Cryptopp

View File

@ -1,30 +1,30 @@
REM coverity-windows.txt - Scan build submission instructions for Windows using cryptest.nmake. REM coverity-windows.txt - Scan build submission instructions for Windows using cryptest.nmake.
REM Written and placed in public domain by Jeffrey Walton and Uri Blumenthal. REM Written and placed in public domain by Jeffrey Walton and Uri Blumenthal.
REM Copyright assigned to Crypto++ project. REM Copyright assigned to Crypto++ project.
REM REM
REM The following are copy/paste instructions for invoking cov-build, building the library and REM The following are copy/paste instructions for invoking cov-build, building the library and
REM submitting the artifacts for a scan. Also see http://cryptopp.com/wiki/Coverity_Scan. REM submitting the artifacts for a scan. Also see http://cryptopp.com/wiki/Coverity_Scan.
REM ################################################################ REM ################################################################
cls cls
del /f cryptopp.zip del /f cryptopp.zip
rmdir /q /s cov-int rmdir /q /s cov-int
nmake /f cryptest.nmake clean nmake /f cryptest.nmake clean
REM Uncomment CXXFLAGS in makefile. Pay attention to X86, X64 or ARM REM Uncomment CXXFLAGS in makefile. Pay attention to X86, X64 or ARM
cov-build.exe --dir cov-int nmake /f cryptest.nmake cov-build.exe --dir cov-int nmake /f cryptest.nmake
7z.exe a -r -tzip -mx=9 cryptopp.zip cov-int 7z.exe a -r -tzip -mx=9 cryptopp.zip cov-int
set CRYPTOPP_COVERITY_TOKEN=XXXXXXXXXXXXXXXX set CRYPTOPP_COVERITY_TOKEN=XXXXXXXXXXXXXXXX
set COVERITY_SCAN_NAME=Rijndael-AliasedTable-SSE2-Windows-X64 set COVERITY_SCAN_NAME=Rijndael-AliasedTable-SSE2-Windows-X64
curl.exe ^ curl.exe ^
--form token="%CRYPTOPP_COVERITY_TOKEN%" ^ --form token="%CRYPTOPP_COVERITY_TOKEN%" ^
--form email=webmaster@cryptopp.com ^ --form email=webmaster@cryptopp.com ^
--form file=@cryptopp.zip ^ --form file=@cryptopp.zip ^
--form version="%COVERITY_SCAN_NAME%" ^ --form version="%COVERITY_SCAN_NAME%" ^
--form description="%COVERITY_SCAN_NAME%" ^ --form description="%COVERITY_SCAN_NAME%" ^
https://scan.coverity.com/builds?project=Cryptopp https://scan.coverity.com/builds?project=Cryptopp