X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FRO.git;a=blobdiff_plain;f=Makefile;h=90ee12c34c187d84e4a4b6cf68ce1ae314b4cc2e;hp=41b265a7e65a5a5310d3a60c6b6e32421faac2c4;hb=4327690ae33f666e701b46645a7429c3370ddbb9;hpb=6df137c25d9e3d4ee3037df15c1c140660fbd9b3 diff --git a/Makefile b/Makefile index 41b265a7..90ee12c3 100644 --- a/Makefile +++ b/Makefile @@ -1,78 +1,24 @@ -SHELL := /bin/bash -all: package install - -clean_deb: - rm -rf .build - -clean: - rm -rf build - find osm_ro -name '*.pyc' -delete - find osm_ro -name '*.pyo' -delete -prepare: - pip install --user --upgrade setuptools - mkdir -p build/ - VER1=$(shell git describe | sed -e 's/^v//' |cut -d- -f1); \ - VER2=$(shell git describe | cut -d- -f2); \ - VER3=$(shell git describe | cut -d- -f3); \ - echo "$$VER1.dev$$VER2+$$VER3" > build/RO_VERSION - cp MANIFEST.in build/ - cp requirements.txt build/ - cp README.rst build/ - cp setup.py build/ - cp stdeb.cfg build/ - cp -r osm_ro build/ - cp openmano build/ - cp openmanod build/ - cp -r vnfs build/osm_ro - cp -r scenarios build/osm_ro - cp -r instance-scenarios build/osm_ro - cp -r scripts build/osm_ro - cp -r database_utils build/osm_ro - -connectors: prepare - # python-novaclient is required for that - rm -f build/osm_ro/openmanolinkervimconn.py - cd build/osm_ro; for i in `ls vimconn_*.py |sed "s/\.py//"` ; do echo "import $$i" >> openmanolinkervimconn.py; done - python build/osm_ro/openmanolinkervimconn.py - rm -f build/osm_ro/openmanolinkervimconn.py - -build: clean connectors prepare - python -m py_compile build/osm_ro/*.py - -pip: prepare - cd build && ./setup.py sdist - -package: clean clean_deb prepare - #apt-get install -y python-stdeb - cd build && python setup.py --command-packages=stdeb.command sdist_dsc --with-python2=True - cd build && cp osm_ro/scripts/python-osm-ro.postinst deb_dist/osm-ro*/debian/ - cd build/deb_dist/osm-ro* && dpkg-buildpackage -rfakeroot -uc -us - mkdir -p .build - cp build/deb_dist/python-*.deb .build/ - -snap: - echo "Nothing to be done yet" - -install: - DEBIAN_FRONTEND=noninteractive apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get install -y python-pip && \ - pip install --upgrade pip && \ - dpkg -i .build/*.deb - -develop: prepare - #pip install -r requirements.txt - cd build && ./setup.py develop - -test: - ./test/basictest.sh --force --insert-bashrc --install-openvim --init-openvim - -build-docker-from-source: - docker build -t osm/openmano -f docker/Dockerfile-local . - -run-docker: - docker-compose -f docker/openmano-compose.yml up - -stop-docker: - docker-compose -f docker/openmano-compose.yml down - +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +SUBDIRS := $(wildcard */Makefile) + +all: clean package +clean: $(SUBDIRS) +package: $(SUBDIRS) + +$(SUBDIRS): + $(MAKE) -C $(@:Makefile=) $(MAKECMDGOALS) + +.PHONY: all $(SUBDIRS)