Add separate functions for each rule (autoconf, configure, build,
install, reinstall, clean, distclean). This is in preparation for
supporting open5gs (meson).
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.
* libgtnpnl is now developed at gerrit.osmocom.org
* 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
Allow calling gen_makefile.py with --jobs without any argument, and
behave the same as if --jobs was not passed. This fixes calling
gen_makefile.py initially without --jobs, and then running "make regen"
which will cause gen_makefile.py to get called with --jobs with no
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
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.
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
* .make.libosmocore.build target expects all proj_files to exist and
make: *** No rule to make target '../src/libosmocore/config.h', needed by '.make.libosmocore.build'. Stop.
Rename 3G+2G.deps to all.deps and remove the parameter from
gen_makefile.py. 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 ttcn3.sh, so it doesn't need to
write its custom .deps file anymore.
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).
Lately I'm seeing unecessary rebuilds because config.h.in 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 config.h.in.
The configure step naturally depends on Makefile.am and *.in files. However,
the automake process also generates Makefile.in 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).