osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-dev/+/40231?usp=email )
Change subject: gen_makefile: fix building open5gs ......................................................................
gen_makefile: fix building open5gs
Fix that gen_src_proj_copy() returns a relative path for projects where src_copy is not needed (either because the option is disabled or because the project doesn't use autotools, such as open5gs). This leads to generating the wrong build_to_src dir below, where os.path.relpath is getting called on the generated src_proj_copy:
build_to_src = os.path.relpath(src_proj_copy, build_proj)
Fix for:
$ ./testenv.py run hss --podman … ===== .make.open5gs.configure
chmod -R ug+w open5gs rm -rf open5gs mkdir -p open5gs cd open5gs; CFLAGS=-g meson setup ../../../../../../../code/osmo-dev/src/open5gs . \ --prefix /home/user/.cache/osmo-ttcn3-testenv/podman/usr
ERROR: Neither directory contains a build file meson.build. make: *** [Makefile:4501: .make.open5gs.configure] Error 1
Fixes: 9cf2b98e ("gen_makefile: add --autoreconf-in-src-copy arg") Change-Id: I6da15a0d825d06a20fe435e3545fa92a27c80cb9 --- M gen_makefile.py 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: pespin: Looks good to me, but someone else must approve osmith: Looks good to me, approved; Verified laforge: Looks good to me, but someone else must approve
diff --git a/gen_makefile.py b/gen_makefile.py index 548137d..c6e4a0b 100755 --- a/gen_makefile.py +++ b/gen_makefile.py @@ -437,7 +437,7 @@
def gen_src_proj_copy(src_proj, make_dir, proj): if not is_src_copy_needed(proj): - return src_proj + return os.path.join(make_dir, src_proj) return os.path.join(make_dir, "src_copy", proj)
def gen_make(proj, deps, configure_opts, jobs, make_dir, src_dir, build_dir, url, push_url, sudo_make_install, no_ldconfig, ldconfig_without_sudo, make_check):