summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2025-03-05 02:14:59 -0600
committerGitHub <noreply@github.com>2025-03-05 02:14:59 -0600
commit67a4363ed91e3f68e12428526e311b71f532285a (patch)
treeb5b50f09e839c4fa6634e719c94d1f3a8ebda72c /Makefile
parent99d929d18d7380cdf906ac2126ad8587059450fe (diff)
parent731195c7adb21208767199f5487dfdf29ce09380 (diff)
downloadvyos-1x-67a4363ed91e3f68e12428526e311b71f532285a.tar.gz
vyos-1x-67a4363ed91e3f68e12428526e311b71f532285a.zip
Merge pull request #4378 from jestabro/libvyosconfig-build
T5400: Move libvyosconfig build out of the Docker image
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 13 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index b5d114e59..e194b6d2c 100644
--- a/Makefile
+++ b/Makefile
@@ -8,6 +8,7 @@ CFLAGS :=
BUILD_ARCH := $(shell dpkg-architecture -q DEB_BUILD_ARCH)
J2LINT := $(shell command -v j2lint 2> /dev/null)
PYLINT_FILES := $(shell git ls-files *.py src/migration-scripts)
+LIBVYOSCONFIG_BUILD_PATH := /tmp/libvyosconfig/_build/libvyosconfig.so
config_xml_src = $(wildcard interface-definitions/*.xml.in)
config_xml_obj = $(config_xml_src:.xml.in=.xml)
@@ -19,9 +20,19 @@ op_xml_obj = $(op_xml_src:.xml.in=.xml)
mkdir -p $(BUILD_DIR)/$(dir $@)
$(CURDIR)/scripts/transclude-template $< > $(BUILD_DIR)/$@
+.PHONY: libvyosconfig
+.ONESHELL:
+libvyosconfig:
+ if ! [ -f $(LIBVYOSCONFIG_BUILD_PATH) ]; then
+ git clone https://github.com/vyos/libvyosconfig.git /tmp/libvyosconfig || exit 1
+ cd /tmp/libvyosconfig && \
+ git checkout 677d1e2bf8109b9fd4da60e20376f992b747e384 || exit 1
+ ./build.sh
+ fi
+
.PHONY: interface_definitions
.ONESHELL:
-interface_definitions: $(config_xml_obj)
+interface_definitions: $(config_xml_obj) libvyosconfig
mkdir -p $(TMPL_DIR)
$(CURDIR)/scripts/override-default $(BUILD_DIR)/interface-definitions
@@ -75,7 +86,7 @@ vyshim:
$(MAKE) -C $(SHIM_DIR)
.PHONY: all
-all: clean interface_definitions op_mode_definitions test j2lint vyshim generate-configd-include-json
+all: clean libvyosconfig interface_definitions op_mode_definitions test j2lint vyshim generate-configd-include-json
.PHONY: clean
clean: