aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--Makefile20
-rw-r--r--build-data/packages/sample-plugin.mk1
-rw-r--r--build-root/Makefile3
-rwxr-xr-xbuild-root/bootstrap.sh15
-rw-r--r--build-root/build-config.mk1
-rw-r--r--src/suffix-rules.mk12
7 files changed, 11 insertions, 42 deletions
diff --git a/.gitignore b/.gitignore
index a5e4c14f03e..3846d25c327 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,7 +8,6 @@
/build-root/dpdk-includes/
/build-root/packages-vpp/
/build-root/path_setup
-/build-root/build-config.mk
/build-root/deb/debian/vpp-plugins/
/build-root/deb/.pybuild/
/build-root/*.deb
diff --git a/Makefile b/Makefile
index 9782a2dc70e..77919d73d82 100644
--- a/Makefile
+++ b/Makefile
@@ -249,26 +249,6 @@ else ifneq ("$(wildcard /etc/redhat-release)","")
fi ; \
exit 0
endif
- @echo "SOURCE_PATH = $(WS_ROOT)" > $(BR)/build-config.mk
- @echo "#!/bin/bash\n" > $(BR)/path_setup
- @echo 'export PATH=$(BR)/tools/ccache-bin:$$PATH' >> $(BR)/path_setup
- @echo 'export PATH=$(BR)/tools/bin:$$PATH' >> $(BR)/path_setup
- @echo 'export CCACHE_DIR=$(CCACHE_DIR)' >> $(BR)/path_setup
-
-ifeq ("$(wildcard /usr/bin/ccache )","")
- @echo "WARNING: Please install ccache AYEC and re-run this script"
-else
- @rm -rf $(BR)/tools/ccache-bin
- @mkdir -p $(BR)/tools/ccache-bin
- @ln -s /usr/bin/ccache $(BR)/tools/ccache-bin/gcc
- @ln -s /usr/bin/ccache $(BR)/tools/ccache-bin/g++
- @ln -s /usr/bin/ccache $(BR)/tools/ccache-bin/clang
- @ln -s /usr/bin/ccache $(BR)/tools/ccache-bin/clang++
- @mkdir -p $(BR)/tools/bin
- @rm -f $(BR)/tools/bin/vppapigen
- @ln -s $(WS_ROOT)/src/tools/vppapigen/vppapigen \
- $(BR)/tools/bin/vppapigen
-endif
@touch $@
bootstrap: $(BR)/.bootstrap.ok
diff --git a/build-data/packages/sample-plugin.mk b/build-data/packages/sample-plugin.mk
index e26ff9d7750..8aca9ea804c 100644
--- a/build-data/packages/sample-plugin.mk
+++ b/build-data/packages/sample-plugin.mk
@@ -16,3 +16,4 @@ sample-plugin_configure_subdir = examples/sample-plugin
sample-plugin_configure_depend = vpp-install
sample-plugin_CPPFLAGS = $(call installed_includes_fn, vpp)
sample-plugin_LDFLAGS = $(call installed_libs_fn, vpp)
+sample-plugin_PATH = $(call package_install_dir_fn,vpp)/bin
diff --git a/build-root/Makefile b/build-root/Makefile
index 9190803c3ab..9d8cffd69df 100644
--- a/build-root/Makefile
+++ b/build-root/Makefile
@@ -317,7 +317,8 @@ endif
BUILD_ENV = \
export CCACHE_DIR=$(CCACHE_DIR) ; \
- export PATH=$(TOOL_INSTALL_DIR)/ccache-bin:$(TOOL_INSTALL_DIR)/bin:$${PATH} ; \
+ export PATH=$(wildcard /usr/lib*/ccache):$(TOOL_INSTALL_DIR)/bin:$${PATH} ; \
+ $(if $(call configure_var_fn,PATH), export PATH=$${PATH}:$(call configure_var_fn,PATH);,) \
export PATH="`echo $${PATH} | sed -e s/[.]://`" ; \
$(if $(not_native),export CONFIG_SITE=$(MU_BUILD_ROOT_DIR)/config.site ;,) \
set -eu$(BUILD_DEBUG) ; \
diff --git a/build-root/bootstrap.sh b/build-root/bootstrap.sh
index c3b355b4f8c..ec4f6436fda 100755
--- a/build-root/bootstrap.sh
+++ b/build-root/bootstrap.sh
@@ -23,10 +23,7 @@ if [[ ! $CCACHE_DIR ]];then
fi
ADD_TO_PATH="$build_root/tools/ccache-bin:$build_root/tools/bin"
-# Construct build-config.mk
cd $build_root
-echo SOURCE_PATH = $wsroot > build-config.mk
-echo
echo Saving PATH settings in `pwd`/path_setup
echo Source this file later, as needed
cat >path_setup <<EOF
@@ -37,23 +34,13 @@ export CCACHE_DIR=$CCACHE_DIR
EOF
# regenerate tools/ccache-bin
-rm -rf tools/ccache-bin
-mkdir -p tools/ccache-bin tools/bin
+mkdir -p tools/bin
if [ ! -f /usr/bin/ccache ] ; then
echo CCACHE is required. Please install it!
exit 1
fi
-cd tools/ccache-bin
-for c in gcc g++ clang clang++
-do
- ln -s /usr/bin/ccache $c
-done
-cd ../
-ln -s $wsroot/src/tools/vppapigen/vppapigen \
- $build_root/tools/bin/vppapigen
-
cd $build_root
exit 0
diff --git a/build-root/build-config.mk b/build-root/build-config.mk
new file mode 100644
index 00000000000..63683e01295
--- /dev/null
+++ b/build-root/build-config.mk
@@ -0,0 +1 @@
+SOURCE_PATH = $(CURDIR)/..
diff --git a/src/suffix-rules.mk b/src/suffix-rules.mk
index 1e701651822..8b1ab83b28b 100644
--- a/src/suffix-rules.mk
+++ b/src/suffix-rules.mk
@@ -14,13 +14,13 @@
# Shared suffix rules
# Please do not set "SUFFIXES = .api.h .api" here
-VPPAPIGEN = vppapigen
+VPPAPIGEN = $(top_srcdir)/tools/vppapigen/vppapigen
%.api.h: %.api
- @echo " APIGEN " $@ ; \
- mkdir -p `dirname $@` ; \
+ @echo " APIGEN " $@ ; \
+ mkdir -p `dirname $@` ; \
$(VPPAPIGEN) --includedir $(top_srcdir) --input $< --output $@
-%.api.json: %.api
- @echo " JSON API" $@ ; \
- mkdir -p `dirname $@` ; \
+%.api.json: %.api
+ @echo " JSON API" $@ ; \
+ mkdir -p `dirname $@` ; \
$(VPPAPIGEN) --includedir $(top_srcdir) --input $< JSON --output $@