Skip to content

[redhat] Makefile

Ben Crocker requested to merge bcrocker/kernel-ark:0120-Makefile into os-build

Consolidate rpmbuild commands into a new target, do-rpmbuild,
and invoke it from dist-all-rpms, dist-srpm, etc. via, e.g.,

dist-srpm: RPMBUILDOPTS=--nodeps -bs
dist-srpm: dist-sources do-rpmbuild

This works for all the targets that invoke rpmbuild EXCEPT
dist-kernel-%, which we rewrite:

dist-kernel-%: dist-sources
RPMBUILDOPTS="--target $(MACH) --with $* --without vdso_install --without perf --without tools -bb" make do-rpmbuild

i.e., setting RPMBUILDOPTS and then invoking make again.

The cost of the dist-kernel-% rewrite is an extra trip through the Makefile,
and the extra prologue (4 lines) and epilogue (1 line) output that goes with it.

The newly rewritten dist-* targets require some ordering constraints,
which are not a bad idea even in the absence of these modifications,
and which can be accomplished by moving

setup-source, dist-configs-check

FROM dist-sources TO sources-rh, thus making sure that
setup-source and dist-configs-check get made strictly before
sources-rh.

With these ordering constraints in place, commands like the following
work as expected:

% make -j 64 dist-rpms

Edited by Ben Crocker

Merge request reports