Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions .gitHooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# availabilty of python
py=$(which py || which python || which python3)
if [[ -z $py ]]
then
then
echo "No python found"
exit 0
fi
Expand All @@ -15,22 +15,22 @@ cd $(git rev-parse --show-toplevel)
# path to sompy python scripts
sompy=$(pwd)/submodules/sompy/somutil

# files regarded as text files to be cleaned
txts=
# extensions of text files sorted by likeliness
xtxt="h cpp cmd py md lua"
# files to skip
skips="*/Makefile */*.make"

txts=()

for file in $(git diff-index --cached --name-only HEAD); do
if [[ -f $file ]]
then
for ext in $xtxt; do
if [[ $file == *.$ext ]]; then txts="$txts $file"; break; fi
if [ -f $file ]; then
ok=true
for s in $skips; do
if [[ $file == $s ]]; then ok=false; break; fi
done
if $ok; then txts+=($file); fi
fi
done

if [[ -n $txts ]]; then
echo cleaning text files
$py $sompy/cleanTxt.py -l $txts
fi
for file in $txts; do git add $file; done
echo txt: ${#txts[@]}
done=$($py $sompy/cleanTxt.py -le ${txts[@]})

for file in $done; do git add $file; done
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@ tmp/
stuff
*.cov
*.html
vs
lab.make

# temporary ignored
# Makefile
# *.make
*.sln
*.vcxproj
*.vcxproj.*
.vs
.vscode
.obsidian

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
2 changes: 1 addition & 1 deletion make/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Alternative GNU Make workspace makefile autogenerated by Premake
# GNU Make workspace makefile autogenerated by Premake

ifndef config
config=ci
Expand Down
9 changes: 5 additions & 4 deletions make/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ covbr2html/make$> make -j
````
- find binary in build folder
````shell
covbr2html/make$> cd ../build
covbr2html/make$> cd ../build/linux
covbr2html/build$> ls
````

Expand All @@ -20,10 +20,11 @@ covbr2html\make> premake5 vsNNNN
````
### build
````shell
covbr2html\make> msbuild -m covbr2html.sln
covbr2html\make> cd ../vs
covbr2html\vs> msbuild -m covbr2html.sln
````
- find binary in build folder
````shell
covbr2html\make> cd ../build
covbr2html\build> dir /B *.exe
covbr2html\vs> cd ../build/windows
covbr2html\build\windows> dir /B *.exe
````
13 changes: 11 additions & 2 deletions make/covbr2html.make
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Alternative GNU Make project makefile autogenerated by Premake
# GNU Make project makefile autogenerated by Premake

ifndef config
config=ci
Expand All @@ -18,8 +18,17 @@ endif
# Configurations
# #############################################

ifeq ($(origin CC), default)
CC = gcc
endif
ifeq ($(origin CXX), default)
CXX = g++
endif
ifeq ($(origin AR), default)
AR = ar
endif
RESCOMP = windres
TARGETDIR = ../build
TARGETDIR = ../build/linux
TARGET = $(TARGETDIR)/covbr2html
INCLUDES += -I../code -I../submodules/somcpp/include
FORCE_INCLUDE +=
Expand Down
147 changes: 0 additions & 147 deletions make/lab.make

This file was deleted.

6 changes: 3 additions & 3 deletions make/premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ somcpp = '../submodules/somcpp/'
somsrc = somcpp .. 'src/'

workspace 'covbr2html'

configurations { 'ci', 'trace_on', 'trace_all', 'glob_linux', 'glob_linux_trace_all' }
language 'C++'
targetdir '../build'
objdir '../build/%{_TARGET_OS}/%{cfg.name}'
targetdir '../build/%{_TARGET_OS}'
objdir '../build/%{_TARGET_OS}'
defines { 'NDEBUG' }
optimize 'Speed'
kind 'ConsoleApp'
Expand All @@ -23,6 +22,7 @@ workspace 'covbr2html'
warnings 'high'
buildoptions { buildoptions_vs }
defines { '_CRT_SECURE_NO_WARNINGS' }
location '../vs'

filter { 'action:gmake*' }
buildoptions { buildoptions_gcc }
Expand Down