Added deps and .PHONY targets to Makefile 77/6777/5
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Sun, 28 Oct 2018 15:00:37 +0000 (16:00 +0100)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Tue, 6 Nov 2018 11:44:20 +0000 (12:44 +0100)
Change-Id: Id71e6a8fa0e33f3c5f94360a21ef8dc5632aee2f
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
Makefile

index 81858eb..0d12dc0 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -16,6 +16,7 @@
 
 # NOTE: pyang and pyangbind are required for build
 
+.PHONY: all clean package trees deps
 PYANG:= pyang
 PYBINDPLUGIN:=$(shell /usr/bin/env python3 -c \
                    'import pyangbind; import os; print("{}/plugin".format(os.path.dirname(pyangbind.__file__)))')
@@ -78,5 +79,14 @@ package:
        tox -e build3
        ./build-docs.sh
 
+deps:
+       $(Q)sudo apt-get -y install git make wget python python-pip debhelper dh-make tox python3 python3-pip maven
+       $(Q)sudo -H python3 -m pip install -U pip
+       $(Q)sudo -H python2 -m pip install -U pip
+       $(Q)sudo -H python3 -m pip install -U pyang pyangbind stdeb
+       $(Q)sudo -H python2 -m pip install -U pyang pyangbind stdeb
+       $(Q)mkdir -p ~/.m2
+       $(Q)cp -n ~/.m2/settings.xml{,.orig} ; wget -q -O - https://raw.githubusercontent.com/opendaylight/odlparent/master/settings.xml > ~/.m2/settings.xml
+
 clean:
        $(Q)rm -rf dist osm_im.egg-info deb deb_dist *.gz $(OUT_DIR) $(TREES_DIR)