2013-08-29 15:21:13 +01:00
|
|
|
# CORE
|
|
|
|
# (c)2010-2012 the Boeing Company.
|
|
|
|
# See the LICENSE file included in this distribution.
|
|
|
|
#
|
|
|
|
# author: Jeff Ahrenholz <jeffrey.m.ahrenholz@boeing.com>
|
|
|
|
#
|
|
|
|
# Makefile for building netns components.
|
|
|
|
#
|
|
|
|
|
2018-03-13 23:20:50 +00:00
|
|
|
SETUPPY = setup.py
|
|
|
|
SETUPPYFLAGS = -v
|
2015-05-16 02:53:20 +01:00
|
|
|
|
2018-01-15 10:20:11 +00:00
|
|
|
if WANT_DOCS
|
2019-06-10 19:41:27 +01:00
|
|
|
DOCS = doc
|
|
|
|
endif
|
|
|
|
|
2019-03-26 15:58:29 +00:00
|
|
|
SUBDIRS = proto $(DOCS)
|
|
|
|
|
2018-03-15 18:30:11 +00:00
|
|
|
SCRIPT_FILES := $(notdir $(wildcard scripts/*))
|
2018-07-31 20:57:30 +01:00
|
|
|
MAN_FILES := $(notdir $(wildcard ../man/*.1))
|
2015-05-26 18:33:57 +01:00
|
|
|
|
2013-08-29 15:21:13 +01:00
|
|
|
# Python package build
|
|
|
|
noinst_SCRIPTS = build
|
|
|
|
build:
|
2015-05-26 18:33:57 +01:00
|
|
|
$(PYTHON) $(SETUPPY) $(SETUPPYFLAGS) build
|
2013-08-29 15:21:13 +01:00
|
|
|
|
|
|
|
# Python package install
|
|
|
|
install-exec-hook:
|
2018-03-13 23:20:50 +00:00
|
|
|
$(PYTHON) $(SETUPPY) $(SETUPPYFLAGS) install \
|
|
|
|
--root=/$(DESTDIR) \
|
|
|
|
--prefix=$(prefix) \
|
2019-10-17 22:52:31 +01:00
|
|
|
--install-lib=$(pythondir) \
|
2018-03-13 23:20:50 +00:00
|
|
|
--single-version-externally-managed
|
2013-08-29 15:21:13 +01:00
|
|
|
|
|
|
|
# Python package uninstall
|
|
|
|
uninstall-hook:
|
2018-03-13 23:20:50 +00:00
|
|
|
rm -rf $(DESTDIR)/etc/core
|
|
|
|
rm -rf $(DESTDIR)/$(datadir)/core
|
2018-03-22 06:07:34 +00:00
|
|
|
rm -f $(addprefix $(DESTDIR)/$(datarootdir)/man/man1/, $(MAN_FILES))
|
2018-03-13 23:20:50 +00:00
|
|
|
rm -f $(addprefix $(DESTDIR)/$(bindir)/,$(SCRIPT_FILES))
|
2019-10-17 22:52:31 +01:00
|
|
|
rm -rf $(DESTDIR)/$(pythondir)/core-$(PACKAGE_VERSION)-py$(PYTHON_VERSION).egg-info
|
|
|
|
rm -rf $(DESTDIR)/$(pythondir)/core
|
2013-08-29 15:21:13 +01:00
|
|
|
|
|
|
|
# Python package cleanup
|
|
|
|
clean-local:
|
|
|
|
-rm -rf build
|
|
|
|
|
|
|
|
# because we include entire directories with EXTRA_DIST, we need to clean up
|
|
|
|
# the source control files
|
|
|
|
dist-hook:
|
2018-03-14 17:43:25 +00:00
|
|
|
-rm -rf `find $(distdir)/ -name '*.pyc'`
|
2013-08-29 15:21:13 +01:00
|
|
|
|
2018-03-14 17:43:25 +00:00
|
|
|
distclean-local:
|
|
|
|
-rm -rf core.egg-info
|
2018-03-23 16:57:37 +00:00
|
|
|
|
2018-03-14 17:43:25 +00:00
|
|
|
|
|
|
|
DISTCLEANFILES = Makefile.in
|
2013-08-29 15:21:13 +01:00
|
|
|
|
|
|
|
# files to include with distribution tarball
|
2018-03-14 17:43:25 +00:00
|
|
|
EXTRA_DIST = $(SETUPPY) \
|
|
|
|
core \
|
|
|
|
data \
|
|
|
|
doc/conf.py.in \
|
|
|
|
examples \
|
2018-03-15 18:30:11 +00:00
|
|
|
scripts \
|
2018-03-14 17:43:25 +00:00
|
|
|
tests \
|
|
|
|
test.py \
|
|
|
|
setup.cfg \
|
2018-03-23 16:57:37 +00:00
|
|
|
requirements.txt
|