Makefile updates
This commit is contained in:
parent
c02eb739aa
commit
1c0d5011c7
3 changed files with 69 additions and 10 deletions
28
cli/koji_cli/Makefile
Normal file
28
cli/koji_cli/Makefile
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
PYFILES = $(wildcard *.py)
|
||||
|
||||
PYTHON=python
|
||||
PACKAGE = $(shell basename `pwd`)
|
||||
PYVER := $(shell $(PYTHON) -c 'import sys; print("%.3s" % (sys.version))')
|
||||
PYSYSDIR := $(shell $(PYTHON) -c 'import sys; print(sys.prefix)')
|
||||
PYLIBDIR = $(PYSYSDIR)/lib/python$(PYVER)
|
||||
PKGDIR = $(PYLIBDIR)/site-packages/$(PACKAGE)
|
||||
|
||||
_default:
|
||||
@echo "nothing to make. try make install"
|
||||
|
||||
clean:
|
||||
rm -f *.o *.so *.pyc *~
|
||||
|
||||
install:
|
||||
@if [ "$(DESTDIR)" = "" ]; then \
|
||||
echo " "; \
|
||||
echo "ERROR: A destdir is required"; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
mkdir -p $(DESTDIR)/$(PKGDIR)
|
||||
for p in $(PYFILES) ; do \
|
||||
install -p -m 644 $$p $(DESTDIR)/$(PKGDIR)/$$p; \
|
||||
done
|
||||
|
||||
$(PYTHON) -c "import compileall; compileall.compile_dir('$(DESTDIR)/$(PKGDIR)', 1, '$(PYDIR)', 1)"
|
||||
Loading…
Add table
Add a link
Reference in a new issue