diff options
author | Damjan Marion <damarion@cisco.com> | 2017-01-10 10:39:21 +0100 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2017-01-10 09:40:45 +0000 |
commit | 6bbf83a01b813b3d50b27ab9001d25cae5c4592a (patch) | |
tree | 0d7c64c55966b1f32ad166768aa5eedff7fbe4fb | |
parent | 842b9c59cc21b3e2917aaa25069fb15addf976f1 (diff) |
Revert "vppctl: bash completion for vppctl commands"
This patch is causing build failures
This reverts commit d995c757f05f78aa759b0a65c0a7e38088e690a9.
Change-Id: I0c8d5a4208135d77aaa3a6a470d26140f7b74733
Signed-off-by: Damjan Marion <damarion@cisco.com>
-rw-r--r-- | Makefile | 46 | ||||
-rw-r--r-- | build-data/platforms.mk | 8 | ||||
-rw-r--r-- | build-root/Makefile | 3 | ||||
-rw-r--r-- | build-root/rpm/vpp.spec | 6 | ||||
-rw-r--r-- | doxygen/Makefile | 25 | ||||
-rwxr-xr-x | src/scripts/vppctl_completion | 30 |
6 files changed, 25 insertions, 93 deletions
@@ -32,8 +32,8 @@ endif DEB_DEPENDS = curl build-essential autoconf automake bison libssl-dev ccache DEB_DEPENDS += debhelper dkms git libtool libganglia1-dev libapr1-dev dh-systemd -DEB_DEPENDS += libconfuse-dev git-review exuberant-ctags cscope pkg-config doxygen graphviz -DEB_DEPENDS += python-dev python-virtualenv python-pip python-pyparsing python-jinja2 lcov chrpath autoconf +DEB_DEPENDS += libconfuse-dev git-review exuberant-ctags cscope pkg-config +DEB_DEPENDS += python-dev python-virtualenv python-pip lcov chrpath autoconf ifeq ($(OS_VERSION_ID),14.04) DEB_DEPENDS += openjdk-8-jdk-headless else @@ -41,9 +41,9 @@ else endif RPM_DEPENDS_GROUPS = 'Development Tools' -RPM_DEPENDS = redhat-lsb glibc-static java-1.8.0-openjdk-devel yum-utils doxygen graphviz +RPM_DEPENDS = redhat-lsb glibc-static java-1.8.0-openjdk-devel yum-utils RPM_DEPENDS += openssl-devel https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm apr-devel -RPM_DEPENDS += python-devel python-virtualenv pyparsing python-jinja2 lcov chrpath +RPM_DEPENDS += python-devel python-virtualenv lcov chrpath EPEL_DEPENDS = libconfuse-devel ganglia-devel ifneq ($(wildcard $(STARTUP_DIR)/startup.conf),) @@ -183,35 +183,6 @@ distversion: $(BR)/scripts/.version $(BR)/scripts/verdist ${BR} ${prefix}-$(shell $(BR)/scripts/version rpm-version) ${verstring} mv $(verstring).tar.gz $(BR)/rpm -deb-depends-check: -ifeq ($(OS_ID),ubuntu) - @MISSING=$$(apt-get install -y -qq -s $(DEB_DEPENDS) | grep "^Inst ") ; \ - if [ -n "$$MISSING" ] ; then \ - echo "\nPlease install missing packages: \n$$MISSING\n" ; \ - echo "by executing \"make install-dep\"\n" ; \ - exit 1 ; \ - fi; \ - exit 0 -endif - -rpm-depends-check: -ifeq ($(OS_ID),centos) - @RPM_DEPENDS_ARRAY=($(RPM_DEPENDS)) ; \ - for i in "$${!RPM_DEPENDS_ARRAY[@]}"; do \ - if ! yum list installed "$${RPM_DEPENDS_ARRAY[$$i]}" >/dev/null 2>&1; then \ - if ! [[ "$${RPM_DEPENDS_ARRAY[$$i]}" == *"://"* ]] ; then \ - MISSING="$$MISSING $${RPM_DEPENDS_ARRAY[$$i]}" ; \ - fi; \ - fi; \ - done; \ - if [ -n "$$MISSING" ] ; then \ - echo "\nPlease install missing packages: \n$$MISSING\n" ; \ - echo "by executing \"make install-dep\"\n" ; \ - exit 1 ; \ - fi; \ - exit 0 -endif - build: $(BR)/.bootstrap.ok $(call make,$(PLATFORM)_debug,vpp-install) @@ -315,10 +286,10 @@ build-vat: run-vat: @sudo $(BR)/install-$(PLATFORM)_debug-native/vpp/bin/vpp_api_test -pkg-deb: deb-depends-check doxygen-siphon-list +pkg-deb: $(call make,$(PLATFORM),install-deb) -pkg-rpm: dist rpm-depends-check doxygen-siphon-list +pkg-rpm: dist $(call make,$(PLATFORM),install-rpm) ctags: ctags.files @@ -350,7 +321,7 @@ endef .PHONY: bootstrap-doxygen doxygen wipe-doxygen -bootstrap-doxygen: deb-depends-check rpm-depends-check +bootstrap-doxygen: $(call make-doxy) doxygen: @@ -359,9 +330,6 @@ doxygen: wipe-doxygen: $(call make-doxy) -doxygen-siphon-list: - $(call make-doxy) - define banner @echo "========================================================================" @echo " $(1)" diff --git a/build-data/platforms.mk b/build-data/platforms.mk index 111a45dc..e192155b 100644 --- a/build-data/platforms.mk +++ b/build-data/platforms.mk @@ -73,14 +73,6 @@ install-deb: $(patsubst %,%-find-source,$(ROOT_PACKAGES)) \ : and sysctl config ; \ echo ../../src/vpp/conf/80-vpp.conf /etc/sysctl.d \ - >> deb/debian/vpp.install ; \ - \ - : bash completion for vppctl ; \ - echo ../../src/scripts/vppctl_completion /etc/bash_completion.d \ - >> deb/debian/vpp.install ; \ - \ - : move dictionary of vppctl commands ; \ - echo ../docs/siphon_docs/clicmd.itemlist /usr/share/vpp \ >> deb/debian/vpp.install ; \ \ : dev package needs a couple of additions ; \ diff --git a/build-root/Makefile b/build-root/Makefile index 9fe03d66..6e26e90e 100644 --- a/build-root/Makefile +++ b/build-root/Makefile @@ -1141,8 +1141,7 @@ package_wipe_script = \ @message=$(if $(is_build_tool),"Wiping build $(PACKAGE)","Wiping build/install $(PACKAGE)") ; \ $(call build_msg_fn,$$message) ; \ $(BUILD_ENV) ; \ - rm -rf $(if $(is_build_tool),$(PACKAGE_BUILD_DIR),$(PACKAGE_INSTALL_DIR) $(PACKAGE_BUILD_DIR)); \ - rm -f $(MU_BUILD_ROOT_DIR)/docs/siphon_docs/clicmd.itemlist + rm -rf $(if $(is_build_tool),$(PACKAGE_BUILD_DIR),$(PACKAGE_INSTALL_DIR) $(PACKAGE_BUILD_DIR)) .PHONY: %-wipe %-wipe: diff --git a/build-root/rpm/vpp.spec b/build-root/rpm/vpp.spec index 07ea2c34..c3c0d927 100644 --- a/build-root/rpm/vpp.spec +++ b/build-root/rpm/vpp.spec @@ -129,8 +129,6 @@ install -p -m 644 %{_mu_build_dir}/../src/vpp/conf/80-vpp.conf %{buildroot}/etc/ # libraries # mkdir -p -m755 %{buildroot}%{_libdir} -mkdir -p -m755 %{buildroot}/usr/share/vpp -mkdir -p -m755 %{buildroot}/etc/bash_completion.d for file in $(find %{_mu_build_dir}/%{_vpp_install_dir}/*/lib* -type f -name '*.so.*.*.*' -print ) do install -p -m 755 $file %{buildroot}%{_libdir} @@ -147,8 +145,6 @@ for file in $(find %{_mu_build_dir}/%{_vpp_install_dir}/vpp/share/vpp/api -type do install -p -m 644 $file %{buildroot}/usr/share/vpp/api done -install -p -m 644 %{_mu_build_dir}/../src/scripts/vppctl_completion %{buildroot}/etc/bash_completion.d -install -p -m 644 %{_mu_build_dir}/docs/siphon_docs/clicmd.itemlist %{buildroot}/usr/share/vpp # Lua bindings mkdir -p -m755 %{buildroot}/usr/share/doc/vpp/examples/lua/examples/cli @@ -277,8 +273,6 @@ fi %exclude %{_libdir}/vpp_api_test_plugins %{_libdir}/* /usr/share/vpp/api/* -/etc/bash_completion.d/vppctl_completion -/usr/share/vpp/clicmd.itemlist %files api-lua %defattr(644,root,root) diff --git a/doxygen/Makefile b/doxygen/Makefile index 18086626..face5b44 100644 --- a/doxygen/Makefile +++ b/doxygen/Makefile @@ -33,6 +33,8 @@ endif OS_ID ?= $(shell grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g') # Package dependencies +DOC_DEB_DEPENDS = doxygen graphviz python-pyparsing python-jinja2 +DOC_RPM_DEPENDS = doxygen graphviz pyparsing python-jinja2 DOC_MAC_BIN_DEPENDS = doxygen dot git DOC_MAC_PY_DEPENDS = pyparsing jinja2 @@ -127,11 +129,22 @@ SIPHON_DOCS = $(addprefix $(SIPHON_OUTPUT)/,$(addsuffix .md,$(SIPHONS))) SIPHON_ITEMLIST = $(addprefix $(SIPHON_OUTPUT)/,$(addsuffix .itemlist,$(filter clicmd,$(SIPHONS)))) $(BR)/.doxygen-bootstrap.ok: Makefile + @echo "Checking whether dependencies for Doxygen are installed..." ifeq ($(OS_ID),ubuntu) + @set -e; inst=; \ + for i in $(DOC_DEB_DEPENDS); do \ + dpkg-query --show $$i >/dev/null 2>&1 || inst="$$inst $$i"; \ + done; \ + if [ "$$inst" ]; then \ + sudo apt-get update; \ + sudo apt-get $(CONFIRM) $(FORCE) install $$inst; \ + fi @if [ ! -s /usr/lib/graphviz/config6a ]; then \ - echo "Rebuilding system Graphviz configuration."; \ + echo "Rebuidlding system Graphviz configuration."; \ sudo dot -c; \ fi +else ifneq ("$(wildcard /etc/redhat-release)","") + @sudo yum install $(CONFIRM) $(DOC_RPM_DEPENDS) else ifeq ($(OS_ID),darwin) @set -e; \ for bin in $(DOC_MAC_BIN_DEPENDS); do \ @@ -174,7 +187,8 @@ $(BR)/.doxygen-siphon.dep: Makefile \ # Generate .siphon files that contain fragments of source file that # relate to the siphons we support. .NOTPARALLEL: $(SIPHON_FILES) -$(SIPHON_FILES):$(DOXY_DIR)/siphon-generate \ +$(SIPHON_FILES): $(BR)/.doxygen-bootstrap.ok \ + $(DOXY_DIR)/siphon-generate \ $(addprefix,$(WSROOT),$(DOXY_INPUT)) \ $(wildcard $(DOXY_DIR)/siphon/*.py) @echo "Validating source tree..." @@ -232,12 +246,7 @@ $(eval $(call siphon-process,itemlist,itemlist)) # This target can be used just to generate the siphoned things .PHONY: doxygen-siphon -doxygen-siphon: $(SIPHON_DOCS) - -# This target is used generate list of cli commands for use with -# the bash completion element for vppctl -.PHONY: doxygen-siphon-list -doxygen-siphon-list: $(SIPHON_ITEMLIST) +doxygen-siphon: $(SIPHON_DOCS) $(SIPHON_ITEMLIST) # Generate the doxygen docs .PHONY: doxygen diff --git a/src/scripts/vppctl_completion b/src/scripts/vppctl_completion deleted file mode 100755 index 7e60249f..00000000 --- a/src/scripts/vppctl_completion +++ /dev/null @@ -1,30 +0,0 @@ -#Copyright 2016 Intel Corporation -# -#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. - -_vppctl() -{ - local cur prev num opts - COMPREPLY=( $(compgen -f ${cur}) ) - cur="${COMP_WORDS[COMP_CWORD]}" - prev="${COMP_WORDS[@]:1}" - num="$((${#COMP_WORDS[@]}-1))" - - VPP_CMD_LIST="$(cat /usr/share/vpp/clicmd.itemlist)" - - opts="$(awk -v prev="^$prev" -v num=$num '{if($0 ~ prev) print $num}' <<< "${VPP_CMD_LIST}")" - - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - -} -complete -F _vppctl vppctl |