Fix parallel make srpm
When building srpm using make -j, each of the recursive makes invoked to
build srpm-{dkms,kmod,utils} will build the dist target. This is both
unnecessary, and also has a very good chance of breaking when they race
trying to build gitrev.
Fix this by make dist a prerequisite of srpm-{dkms,kmod,utils} instead
of srpm-common, so that it will be done once before invoking the
recursive makes.
Also, gitrev is not really required for make dist, so instead of adding
it to BUILT_SOURCES, just add it as a prerequisite of the all target.
Mark the individual package targets as PHONY.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Closes #10564
2020-07-13 21:24:07 +00:00
|
|
|
PHONY += tgz tgz-kmod tgz-utils tgz-local
|
|
|
|
|
2010-08-26 18:22:58 +00:00
|
|
|
tgz-local:
|
|
|
|
@(if test "${HAVE_ALIEN}" = "no"; then \
|
|
|
|
echo -e "\n" \
|
|
|
|
"*** Required util ${ALIEN} missing. Please install the\n" \
|
2018-02-15 20:58:23 +00:00
|
|
|
"*** package for your distribution which provides ${ALIEN},\n" \
|
2010-08-26 18:22:58 +00:00
|
|
|
"*** re-run configure, and try again.\n"; \
|
2018-02-15 20:58:23 +00:00
|
|
|
exit 1; \
|
2010-08-26 18:22:58 +00:00
|
|
|
fi)
|
|
|
|
|
2013-02-17 20:10:17 +00:00
|
|
|
tgz-kmod: tgz-local rpm-kmod
|
|
|
|
name=${PACKAGE}; \
|
|
|
|
version=${VERSION}-${RELEASE}; \
|
|
|
|
arch=`$(RPM) -qp $${name}-kmod-$${version}.src.rpm --qf %{arch} | tail -1`; \
|
|
|
|
pkg1=kmod-$${name}*$${version}.$${arch}.rpm; \
|
|
|
|
fakeroot $(ALIEN) --scripts --to-tgz $$pkg1; \
|
|
|
|
$(RM) $$pkg1
|
2010-08-26 18:22:58 +00:00
|
|
|
|
|
|
|
tgz-utils: tgz-local rpm-utils
|
|
|
|
name=${PACKAGE}; \
|
2013-02-17 20:10:17 +00:00
|
|
|
version=${VERSION}-${RELEASE}; \
|
2011-06-16 19:14:33 +00:00
|
|
|
arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \
|
2010-08-26 18:22:58 +00:00
|
|
|
pkg1=$${name}-$${version}.$${arch}.rpm; \
|
|
|
|
pkg2=$${name}-devel-$${version}.$${arch}.rpm; \
|
|
|
|
pkg3=$${name}-test-$${version}.$${arch}.rpm; \
|
|
|
|
fakeroot $(ALIEN) --scripts --to-tgz $$pkg1 $$pkg2 $$pkg3; \
|
|
|
|
$(RM) $$pkg1 $$pkg2 $$pkg3
|
|
|
|
|
2013-02-17 20:10:17 +00:00
|
|
|
tgz: tgz-kmod tgz-utils
|