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
|
|
|
|
SUBDIRS = doc
|
|
|
|
endif
|
|
|
|
|
2018-03-13 23:20:50 +00:00
|
|
|
SCRIPT_FILES := $(notdir $(wildcard sbin/*))
|
|
|
|
MAN_FILES := $(notdir $(wildcard ../doc/man/*.1))
|
2015-05-26 18:33:57 +01:00
|
|
|
|
2018-03-13 23:20:50 +00:00
|
|
|
LOGROTATE_DIR = $(DESTDIR)/$(sysconfdir)/logrotate.d
|
2015-12-29 18:50:28 +00:00
|
|
|
LOGROTATE_FILE = data/core-daemon.logrotate
|
|
|
|
|
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) \
|
|
|
|
--install-lib=$(pythondir) \
|
|
|
|
--single-version-externally-managed
|
2013-08-29 15:21:13 +01:00
|
|
|
|
2018-03-13 23:20:50 +00:00
|
|
|
#install-data-local:
|
|
|
|
# $(MKDIR_P) $(DESTDIR)$(LOGROTATE_DIR)
|
|
|
|
# $(INSTALL_DATA) $(LOGROTATE_FILE) \
|
|
|
|
# $(DESTDIR)$(LOGROTATE_DIR)/`basename $(LOGROTATE_FILE) .logrotate`
|
2015-12-29 18:50:28 +00:00
|
|
|
|
2018-03-13 23:20:50 +00:00
|
|
|
#uninstall-local:
|
|
|
|
# rm -f $(DESTDIR)$(LOGROTATE_DIR)/`basename $(LOGROTATE_FILE) .logrotate`
|
2015-12-29 18:50:28 +00:00
|
|
|
|
2013-08-29 15:21:13 +01:00
|
|
|
# Python package uninstall
|
2018-03-13 23:20:50 +00:00
|
|
|
#rmdir -p $(LOGROTATE_DIR) || true
|
2013-08-29 15:21:13 +01:00
|
|
|
uninstall-hook:
|
2018-03-13 23:20:50 +00:00
|
|
|
rm -rf $(DESTDIR)/etc/core
|
|
|
|
rm -rf $(DESTDIR)/$(datadir)/core
|
|
|
|
rm -f $(addprefix $(DESTDIR)/$(datadir)/man/man1/, $(MAN_FILES))
|
|
|
|
rm -f $(addprefix $(DESTDIR)/$(bindir)/,$(SCRIPT_FILES))
|
|
|
|
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-13 23:20:50 +00:00
|
|
|
rm -rf `find $(distdir)/ -name '*.pyc'`
|
2013-08-29 15:21:13 +01:00
|
|
|
|
2018-01-15 10:20:11 +00:00
|
|
|
DISTCLEANFILES = Makefile.in core/*.pyc MANIFEST
|
2013-08-29 15:21:13 +01:00
|
|
|
|
|
|
|
# files to include with distribution tarball
|
2018-03-14 16:04:01 +00:00
|
|
|
EXTRA_DIST = $(SETUPPY) core doc $(LOGROTATE_FILE)
|