[ovs-dev] [PATCH] Fix submodule build when using build directory.

Mark Michelson mmichels at redhat.com
Thu Feb 11 18:02:44 UTC 2021


The initial addition of OVS as a submodule made the assumption that the
build is being performed from the OVN source directory. However, some
devs create a separate build directory for OVN. This means the search
for the OVS source will fail.

This fixes the problem by explicitly stating that he ovs submodule is
located in the ovn source directory.

Signed-off-by: Mark Michelson <mmichels at redhat.com>
---
 Makefile.am  | 2 +-
 acinclude.m4 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 50376a1b6..80247b62d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -159,7 +159,7 @@ noinst_HEADERS += $(EXTRA_DIST)
 
 ro_c = echo '/* -*- mode: c; buffer-read-only: t -*- */'
 ro_shell = printf '\043 Generated automatically -- do not modify!    -*- buffer-read-only: t -*-\n'
-submodules = $(shell grep 'path =' .gitmodules | sed -E 's/[\t ]*path =\s*(.*)/\1/g' | xargs)
+submodules = $(shell grep 'path =' $(srcdir)/.gitmodules | sed -E 's/[\t ]*path =\s*(.*)/\1/g' | xargs)
 
 SUFFIXES += .in
 .in:
diff --git a/acinclude.m4 b/acinclude.m4
index 2f8755961..2ca15cb33 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -338,7 +338,7 @@ AC_DEFUN([OVN_CHECK_OVS], [
       AC_ERROR([$OVSDIR is not an OVS source directory])
     fi
   else
-    OVSDIR=`pwd`/ovs
+    OVSDIR=$srcdir/ovs
   fi
 
   AC_MSG_RESULT([$OVSDIR])
-- 
2.29.2



More information about the dev mailing list