Commit Graph

60 Commits (master)

Author SHA1 Message Date
Oliver Smith 7c8e69da79 ttcn3: add ggsn-ogs
Change-Id: Id84047e56a6c07fbf0984eb6aedcecd4d7f3ae97
2023-11-22 12:52:46 +01:00
Oliver Smith 45f8c39c96 Support building open5gs
Change-Id: Id145443ff53f13740167e9dde6417b7e915b8399
2023-11-22 11:43:24 +01:00
Oliver Smith 59dbd1c75f gen_makefile: split gen_make into more functions
Add separate functions for each rule (autoconf, configure, build,
install, reinstall, clean, distclean). This is in preparation for
supporting open5gs (meson).

Change-Id: Id7acfec7f5dd0d3d1a080b3c9d15005e51863e66
2023-11-22 11:43:24 +01:00
Oliver Smith 9d83a72e85 gen_makefile: don't shell out to nproc
Use python's multiprocessing.cpu_count() instead of "$(nproc)". The
latter didn't work properly in Makefiles, the right syntax would have
been "$(shell nproc)". Make didn't complain about it and assumed that we
want to use all CPUs with an empty argument "-j ", but meson doesn't
accept this syntax.

Change-Id: I58ca082339f3aff813f587f4c2be9c0951b9b2dd
2023-11-22 11:43:11 +01:00
Oliver Smith 8590b898e9 gen_makefile: update URL code for netfilter urls
* libgtnpnl is now developed at
* use https:// instead of git:// for libnftnl, nftables
* read the urls from a new all.urls file
* don't set a push URL pointing to gerrit for projects that have
  different URLs

Change-Id: I5522c9fcc594d296c581ba59c0beb4882e2d976e
2023-11-22 11:43:10 +01:00
Oliver Smith f81707454b Update URLs: ->
Change-Id: Iba2ab71c06e413da4cb82fb1b85b4658d6773743
2023-09-29 12:55:58 +02:00
Oliver Smith ef49dd53e8 all.deps: add osmo-remsim and simtrace2
Change-Id: I58324ad5ed6c77a53e697d5b4b07ff9353859556
2023-07-14 08:32:53 +00:00
Vadim Yanitskiy 6f84a084cd clone repos with --recurse-submodules
Change-Id: Ie305422145aff257eeb6f13d82d6a978d6c2849a
2022-12-23 23:21:39 +07:00
Oliver Smith 51b8061749 set nargs=? for --jobs
Allow calling with --jobs without any argument, and
behave the same as if --jobs was not passed. This fixes calling initially without --jobs, and then running "make regen"
which will cause to get called with --jobs with no
2022-08-17 12:05:53 +02:00
Vadim Yanitskiy 3a4e919239 add missing --jobs to target 'regen'
Change-Id: I68adde5c3ea602d6dbbfb26e07ce44247cad89f9
2022-08-15 21:00:57 +07:00
Vadim Yanitskiy e9ebdc83c4 use --long params for target 'regen'
This way the resulting Makefile is easier to read and understand,
no need to lookup short params in help of

Change-Id: Iba7f148fb1880af2f05cf3ca74cfb0737befeea0
2022-08-15 21:00:53 +07:00
Vadim Yanitskiy e6d3620ff0 use s#git://#https://# in git clone base URL
Unencrypted git:// protocol offers no integrity or authentication,
making it subject to tampering.  Use https:// instead.

Using https:// is also required for some new repositories (like
libosmo-gprs.git), which are intentionally unavailable over git://.

Change-Id: I503f0e1b5258102d771597f1b5b753f670832fcb
2022-08-15 19:18:24 +07:00
Neels Hofmeyr 179d9519ad adjust clone url for nftables
Change-Id: I5052819a56ec9b856739b6529d49947bf83849e6
2022-06-17 16:57:08 +02:00
Neels Hofmeyr fbd4b5b3e7 more deps and opts around osmo-upf and PFCP
Change-Id: I3606597392aee73ae3d9692152bf646803a80858
2022-06-17 16:53:52 +02:00
Vadim Yanitskiy 722ca6d26f use '$(nproc)' for '--jobs' by default
Change-Id: I769f032ebf197bac34468683526acf6614e74692
2022-04-19 20:34:53 +03:00
Xilokar a1cf1cdc67 fix non absolute path
Renamming the make_to_src_proj variable to src_proj in commit
 93bd52300e leads to the build_to_src variable
being the result of a double call to os.path.relpath(), breaking builds when using
non absolute path for make_dir

Change-Id: I2dfc26da94434558b202475af636ce336349bba9
2022-03-22 09:59:25 +01:00
Oliver Smith 5452c6e901 make: add convenience target cn-bsc-nat
Change-Id: Ia2bdc8df3cbe9de305aba4f7592a2362f3802303
2022-02-25 12:55:21 +01:00
Oliver Smith 5705a69c16 make: add support for "virtphy" from osmocom-bb
Change-Id: Id4e7a9d948332c03d56e2637badeef78c78e5aa7
2022-02-25 12:55:21 +01:00
Oliver Smith 93bd52300e make: add support for "mobile" from osmocom-bb
Allow building and installing the "mobile" application from
osmocom-bb.git's src/host/layer23 dir.

Change-Id: Ic75cca703e317eaee593b4d6c78784309c056f17
2022-02-25 12:55:21 +01:00
Oliver Smith 107f35d3da follow symlinks with find
Prepare for the next patch, with which {src_proj} may be a subdir in

Change-Id: Ie15e74e61b16cef5e189e4e2a272b7d2061547c6
2022-02-25 12:55:21 +01:00
Oliver Smith ca0d2900be mark convenience targets as phony
Change-Id: Idd7e485e17b178f1bf6feef5d30db57e6467267e
2022-02-25 12:55:21 +01:00
Oliver Smith 84df01adb8 fix find errors
Don't print find errors if not all dirs were cloned. Found this also
while running osmo-dev on a fresh install.

Change-Id: I7955fedc96484e5703073b63906a03477452db6e
2021-12-10 17:22:58 +01:00
Oliver Smith adfa0c0cf1 add --auto-distclean
Add a new option that avoids stopping the build with:
  configure: error: source directory already configured; run "make distclean" there first

I run into this frequently, when e.g. running './configure; make release'
inside Osmocom repositories and then attempting to build them with
osmo-dev. It is annoying as it does not fail immediatelly, and I need to
manually go to the source directories where it failed, run 'make
distclean' and then attempt to build again. Then it may fail on another
directory with the same problem.

Check for config.status, as that is also what ./configure checks for
before printing the error.

Change-Id: Iac71333e8c5da8dee4e8f34e2af8db12d2c08021
2021-11-12 15:51:38 +01:00
Oliver Smith f7f8c96e7b proj_files: ignore config.h
Do not consider config.h inside the source tree as modified source file.
This file gets generated when running ./configure to build in-tree,
whereas osmo-dev always builds out-of-tree.

Having config.h inside proj_files causes problems with the next patch,
where conflicting in-tree builds will be automatically be cleaned with
"make distclean". For example:
* "make libosmocore" runs with a previously configured in-tree build
* proj_files contains config.h.
* Before attempting to build libosmocore out-of-tree, with the next
  patch, "make distclean" gets executed.
* config.h is now removed
* target expects all proj_files to exist and
   fails with:
   make: *** No rule to make target '../src/libosmocore/config.h', needed by ''.  Stop.

Change-Id: I10d970f2cadacb5071dcde975c76b15404038a3c
2021-11-12 15:51:38 +01:00
Neels Hofmeyr 2325e2e3a9 gen_makefile: add 'CFLAGS=-g' option --build-debug 2021-10-23 20:45:12 +02:00
Oliver Smith 505f60de3d reformat find cmds in Makefile
Change-Id: Ic2fad22fdbf0fec4abfaeae60b4ebd74563a9392
2021-10-11 08:11:58 +02:00
Oliver Smith 0a4d8ea698 drop argument for deps file
Rename 3G+2G.deps to all.deps and remove the parameter from Create new Makefile targets for the various use cases,
usually we build either 'cn-bsc' or 'usrp'. The next patch will add more
projects to all.deps.

This change brings the Makefile logic closer to how it is actually used,
one build directory that is building most Osmocom projects. New projects
can be added to all.deps on demand, but then we have it in the
repository and not just a local change that we add temporarily to the
3G+2G.deps file when we need to build a specific project.

Extend all.deps with projects needed by, so it doesn't need to
write its custom .deps file anymore.

Change-Id: I6394882f67eecda3d2c03a97d3119657f7d3873f
2021-09-21 16:52:02 +02:00
Oliver Smith c47eafbe0a add --docker-cmd argument
To be used by to run the actual build inside docker.
runs the programs built by osmo-dev inside docker with the exact
configs that we use on, 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
2021-08-13 09:17:39 +02:00
Oliver Smith b3ae4b60ff regen: put args in own lines
Make it easier to adjust opts before running 'make regen'.

Change-Id: I3c537ca9cd876e62547efca1ea40f31e90d8761e
2021-02-01 14:45:22 +01:00
Vadim Yanitskiy d9cdec6afb fix echo: add -e to enable backslash escapes
I guess it's enabled by default in some distributions like Debian,
but at least for Arch Linux it needs to be enabled using '-e'.

Change-Id: Ie9c0657c9decb83bf8531ce1a0e97c27ee7008bb
2020-09-16 01:19:25 +00:00
Neels Hofmeyr 0ec459258a don't trigger rebuild on
Lately I'm seeing unecessary rebuilds because is newer than the
./configure file. The rule to trigger on *.in files is intended for "manual"
.in files, not those from autoconf/automake. Exclude
2019-07-12 01:22:50 +02:00
Neels Hofmeyr 44543a98b0 gen_makefile: fix deps: add *.map (for e.g.
Change-Id: I7bc2b5889213a1c635d039d4c6b577f6b4766d7f
2019-03-10 21:08:46 +01:00
Neels Hofmeyr a4fefee68d gen_makefile: add *.tpl to dependency file list
libosmocore has some *.tpl files to generate source files. Add *.tpl to

Change-Id: Id12fa34e58ef223820528c47e23f9d4bdb2dd3bc
2019-02-12 15:08:30 +01:00
Neels Hofmeyr 6257d9ec79 gen_makefile: fix dependency file list
The configure step naturally depends on and *.in files. However,
the automake process also generates files: exclude those from *.in.

This fixes spurious unnecessary rebuilds: especially when libosmocore had
modifications, it often rebuilt *twice* after this (causing all of the other
source trees to rebuild as well).

Change-Id: Ia6f48ac9a8b300440d23c9b495fb39b5e40b59d8
2019-02-12 15:08:22 +01:00
Oliver Smith 5c882f66e9 detect changes in cpp files
Properly rebuild when cpp files (e.g. from osmo-trx) have been changed.

Change-Id: I9382d984fa1988eefbb6be3e45d88b2f1f5b598a
2018-10-31 14:13:34 +01:00
Neels Hofmeyr a007eaa405 gen_makefile: add ALL config opts keyword 2018-09-04 14:37:38 +02:00
Neels Hofmeyr 6d16ae9bad gen_makefile: mark project name as phony target 2018-09-04 14:37:38 +02:00
Neels Hofmeyr f6078c49c0 gen_makefile: add --no-make-check 2018-09-04 14:37:38 +02:00
Neels Hofmeyr 7bd5c31c4e sync before touching .make.* files 2018-07-26 16:43:01 +02:00
Neels Hofmeyr 2e65707b57 libsmpp34 can build in parallel now 2018-05-29 12:24:34 +02:00
Neels Hofmeyr 1fa9b2989e rm .version with -f 2018-04-23 17:04:25 +02:00
Neels Hofmeyr 4d38c1e77b add reinstall 2018-04-23 17:04:15 +02:00
Neels Hofmeyr 29fde6ff8e gen_makefile: accomodate openbsc's extra subdir 2018-04-01 15:57:02 +02:00
Neels Hofmeyr 972c2945e2 gen_makefile: fix empty push-url for 'make regen' 2018-03-16 03:49:58 +01:00
Neels Hofmeyr 1b0d34f77a produced Makfile: add all_debug target to see rebuild reasons 2018-03-16 03:46:08 +01:00
Neels Hofmeyr 28d4be5520 gen_makefile: add --push-url option 2018-03-16 03:44:07 +01:00
Neels Hofmeyr 2535a26046 gen_makefile: add example to end of --help 2018-01-16 16:34:32 +01:00
Neels Hofmeyr 367cb97e2a gen_makefile: be less aggressive on rebuilding everything on edits
Change-Id: Ie740eee5374e258e721da109eca8f0444eb3ebc3
2017-12-15 04:01:13 +01:00
Neels Hofmeyr 461c3bdc1d call 'sudo ldconfig' by default, allow configuring 'sudo make install'
Add options to decide whether ldconfig should be called or not, whether with
sudo or not, and also whether to call 'make install' with sudo or not.

Change-Id: I0771c78159edfa312aa320f18d9f6346c3b8adba
2017-12-06 00:32:15 +01:00
Neels Hofmeyr bffdc30b74 set default URL to
Change-Id: If0d46feb7f76d59c4e37fa63a894081f5f9210ad
2017-12-06 00:31:49 +01:00