about summary refs log blame commit diff stats
path: root/LICENSE
blob: ec27f618489481e0490f4078a962236eff3c5168 (plain) (tree)
1
                                    

















                                                                               
Copyright (c) 2018-2019 Drew DeVault

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
s="c"># You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. NAME = ranger VERSION = $(shell grep -m 1 -o '[0-9][0-9.]\+' README) SNAPSHOT_NAME ?= $(NAME)-$(VERSION)-$(shell git rev-parse HEAD | cut -b 1-8).tar.gz # Find suitable python version (need python >= 2.6 or 3.1): PYTHON ?= $(shell python -c 'import sys; sys.exit(sys.version < "2.6")' && \ which python || which python3.1 || which python3 || which python2.6) SETUPOPTS ?= '--record=install_log.txt' DOCDIR ?= doc/pydoc DESTDIR ?= / PYOPTIMIZE ?= 1 BMCOUNT ?= 5 # how often to run the benchmarks? CWD = $(shell pwd) default: compile @echo 'Run `make options` for a list of all options' options: help @echo @echo 'Options:' @echo 'PYTHON = $(PYTHON)' @echo 'PYOPTIMIZE = $(PYOPTIMIZE)' @echo 'DOCDIR = $(DOCDIR)' help: @echo 'make install: Install $(NAME)' @echo 'make doc: Create the pydoc documentation' @echo 'make clean: Remove the compiled files (*.pyc, *.pyo)' @echo 'make cleandoc: Remove the pydoc documentation' @echo 'make snapshot: Create a tar.gz of the current git revision' @echo 'make test: Run all unittests.' install: $(PYTHON) setup.py install $(SETUPOPTS) \ '--root=$(DESTDIR)' --optimize=$(PYOPTIMIZE) compile: clean PYTHONOPTIMIZE=$(PYOPTIMIZE) $(PYTHON) -m compileall -q ranger clean: find . -regex .\*.py[co]\$$ -exec rm -f -- {} \; doc: cleandoc mkdir -p $(DOCDIR) cd $(DOCDIR); \ $(PYTHON) -c 'import pydoc, sys; \ sys.path[0] = "$(CWD)"; \ pydoc.writedocs("$(CWD)")' find . -name \*.html -exec sed -i 's|'$(CWD)'|../..|g' -- {} \; cleandoc: test -d $(DOCDIR) && rm -f -- $(DOCDIR)/*.html || true test: @$(PYTHON) test/all_tests.py 1 bm: @$(PYTHON) test/all_benchmarks.py $(BMCOUNT) snapshot: git archive --prefix='$(NAME)-$(VERSION)/' --format=tar HEAD | gzip > $(SNAPSHOT_NAME) .PHONY: default options compile clean doc cleandoc test bm snapshot install