Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mentat-test
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
713
Mentat
mentat-test
Commits
357464b9
Commit
357464b9
authored
7 years ago
by
Jan Mach
Browse files
Options
Downloads
Patches
Plain Diff
Refactoring: Renamed master makefile to support automated build system.
(Redmine issue:
#3387
)
parent
8c6542f4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
MMakefile
+29
-20
29 additions, 20 deletions
MMakefile
with
29 additions
and
20 deletions
Makefile
→
M
Makefile
+
29
−
20
View file @
357464b9
...
@@ -13,64 +13,73 @@ DIR_LIB = lib
...
@@ -13,64 +13,73 @@ DIR_LIB = lib
BIN_FILES := $(wildcard bin/mentat-*.py)
BIN_FILES := $(wildcard bin/mentat-*.py)
all: help
all: help
check: pyflakes pylint test
check: pyflakes pylint test
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
help:
help:
$(info List of possible make targets:)
$(info List of possible make targets:)
$(info )
$(info )
$(
info
*
all:
alias
for
help
, you have to pick a target
[
default]
)
$(info * all: alias for help, you have to pick a target [default])
$(
info
*
help
: print this
help
and
exit
)
$(info * help: print this help and exit)
$(
info
*
docs: generate all
local
project documentation
)
$(info * docs: generate all local project documentation)
$(
info - docs-sphinx
)
$(info = docs-sync)
$(
info
*
pyflakes: check
source
code with pyflakes
)
$(info = docs-sphinx)
$(
info - pyflakes-bin
)
$(info * check: perform extensive code checking)
$(
info
*
pylint: check
source
code with pylint
)
$(info = pyflakes: check source code with pyflakes)
$(
info - pylint-bin
)
$(info - pyflakes-bin)
$(
info
*
test
: run unit tests with nosetest
)
$(info = pylint: check source code with pylint)
$(info - pylint-bin)
$(info = test: run unit tests with nosetest)
$(info )
$(info )
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
docs: docs-sync docs-sphinx
docs: docs-sync docs-sphinx
# Synchronize directory contents
docs-sync: FORCE
docs-sync: FORCE
$(
info Sync
ing documentation
source
code
)
echo "*** Synchroniz
ing documentation source code
from submodules ***"
rsync -r --progress --archive --update --delete --force ./submodules/pyzenkit/doc/_doclib/api_*.rst ./doc/sphinx/_doclib/
rsync -r --progress --archive --update --delete --force ./submodules/pyzenkit/doc/_doclib/api_*.rst ./doc/sphinx/_doclib/
rsync -r --progress --archive --update --delete --force ./submodules/pyzenkit/doc/_doclib/_inc*.rst ./doc/sphinx/_doclib/
rsync -r --progress --archive --update --delete --force ./submodules/pyzenkit/doc/_doclib/_inc*.rst ./doc/sphinx/_doclib/
rsync -r --progress --archive --update --delete --force ./submodules/pynspect/doc/_doclib/api_*.rst ./doc/sphinx/_doclib/
rsync -r --progress --archive --update --delete --force ./submodules/pynspect/doc/_doclib/api_*.rst ./doc/sphinx/_doclib/
#find ./ -type f -name *.pyc -exec rm -f {} \;
#find ./ -type f -name *.pyc -exec rm -f {} \;
docs-sphinx
:
docs-sphinx: FORCE
echo "*** Generating project documentation ***"
#cd $(DIR_DOC)/sphinx && make clean
#cd $(DIR_DOC)/sphinx && make clean
#cd $(DIR_DOC)/sphinx && make apidoc
#cd $(DIR_DOC)/sphinx && make apidoc
cd $(DIR_DOC)/sphinx && make html
cd $(DIR_DOC)/sphinx && make html
echo
"Generated local project documentation"
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
pyflakes: pyflakes-bin
pyflakes: pyflakes-bin
pyflakes-bin: $(DIR_BIN)/mentat-*.py
pyflakes-bin: $(DIR_BIN)/mentat-*.py
echo "*** Checking code with pyflakes ***"
PYTHONPATH=$(DIR_LIB) python3 -m pyflakes $(DIR_BIN)/mentat-*.py
PYTHONPATH=$(DIR_LIB) python3 -m pyflakes $(DIR_BIN)/mentat-*.py
#-------------------------------------------------------------------------------
pylint: pylint-bin
pylint: pylint-bin
pylint-bin: $(DIR_BIN)/mentat-*.py
pylint-bin: $(DIR_BIN)/mentat-*.py
# Run pylint for each binary file separatelly
echo "*** Checking code with pylint ***"
for
fln
in
$(
BIN_FILES
);
do
\
PYTHONPATH=$(DIR_LIB) python3 -m pylint --rcfile .pylintrc-bin $(DIR_BIN)
PYTHONPATH
=
$(
DIR_LIB
)
python3
-m
pylint
$$
fln
--rcfile
.pylintrc-bin
;
\
done
#-------------------------------------------------------------------------------
test:
test:
echo "*** Checking code with nosetests ***"
nosetests $(DIR_LIB)
nosetests $(DIR_LIB)
#-------------------------------------------------------------------------------
# Empty rule as dependency wil force make to always perform target
# Empty rule as dependency wil force make to always perform target
# Source: https://www.gnu.org/software/make/manual/html_node/Force-Targets.html
# Source: https://www.gnu.org/software/make/manual/html_node/Force-Targets.html
FORCE:
FORCE:
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment