This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
osmith gerrit-no-reply at lists.osmocom.orgosmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-dev/+/25189 )
Change subject: gen_makefile.py: add --docker-cmd argument
......................................................................
gen_makefile.py: add --docker-cmd argument
To be used by ttcn3.sh to run the actual build inside docker. ttcn3.sh
runs the programs built by osmo-dev inside docker with the exact
configs that we use on jenkins.osmocom.org, but so far it builds the
component outside of docker. But building inside docker is necessary to
avoid incompatibilities between the host system and the docker
containers (e.g. different glibc).
Change-Id: Ibd20f0e0e2a5105085066a9f04b5868c68691024
---
M gen_makefile.py
1 file changed, 9 insertions(+), 4 deletions(-)
Approvals:
osmith: Verified
neels: Looks good to me, approved
diff --git a/gen_makefile.py b/gen_makefile.py
index ad42978..81d41e7 100755
--- a/gen_makefile.py
+++ b/gen_makefile.py
@@ -107,6 +107,9 @@
default=True, action='store_false',
help='''do not 'make check', just 'make' to build.''')
+parser.add_argument('--docker-cmd',
+ help='''prefix configure/make/make install calls with this command (used by ttcn3.sh)''')
+
args = parser.parse_args()
class listdict(dict):
@@ -189,19 +192,19 @@
-chmod -R ug+w {build_proj}
-rm -rf {build_proj}
mkdir -p {build_proj}
- cd {build_proj}; {build_to_src}/configure {configure_opts}
+ cd {build_proj}; {docker_cmd}{build_to_src}/configure {configure_opts}
sync
touch $@
.make.{proj}.build: .make.{proj}.configure $({proj}_files)
@echo -e "\n\n\n===== $@\n"
- $(MAKE) -C {build_proj} -j {jobs} {check}
+ {docker_cmd}$(MAKE) -C {build_proj} -j {jobs} {check}
sync
touch $@
.make.{proj}.install: .make.{proj}.build
@echo -e "\n\n\n===== $@\n"
- {sudo_make_install}$(MAKE) -C {build_proj} install
+ {docker_cmd}{sudo_make_install}$(MAKE) -C {build_proj} install
{no_ldconfig}{sudo_ldconfig}ldconfig
sync
touch $@
@@ -235,6 +238,7 @@
no_ldconfig='#' if no_ldconfig else '',
sudo_ldconfig='' if ldconfig_without_sudo else 'sudo ',
check='check' if make_check else '',
+ docker_cmd=f'{args.docker_cmd} ' if args.docker_cmd else '',
)
@@ -283,7 +287,7 @@
-o {makefile} \
-s {src_dir} \
-b {build_dir} \
- -u "{url}"{push_url}{sudo_make_install}{no_ldconfig}{ldconfig_without_sudo}{make_check}
+ -u "{url}"{push_url}{sudo_make_install}{no_ldconfig}{ldconfig_without_sudo}{make_check}{docker_cmd}
'''.format(
script=os.path.relpath(sys.argv[0], make_dir),
@@ -299,6 +303,7 @@
no_ldconfig=' \\\n\t\t-L' if args.no_ldconfig else '',
ldconfig_without_sudo=' \\\n\t\t--ldconfig-without-sudo' if args.ldconfig_without_sudo else '',
make_check='' if args.make_check else " \\\n\t\t--no-make-check",
+ docker_cmd=f' \\\n\t\t--docker-cmd "{args.docker_cmd}"' if args.docker_cmd else ''
))
# convenience target: clone all repositories first
--
To view, visit https://gerrit.osmocom.org/c/osmo-dev/+/25189
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-Change-Id: Ibd20f0e0e2a5105085066a9f04b5868c68691024
Gerrit-Change-Number: 25189
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210813/362600ec/attachment.htm>