Details
-
Improvement
-
Resolution: Fixed
-
Major
-
Lustre 2.2.0
-
None
-
build
-
3
-
4649
Description
Makefile scriptlets run with "set -e" set. This causes the shell to exit
if any commands exit with a non-zero exit code. This technique is DEFEATED
if part of the shell script runs in a subshell. If using a subshell is
necessary, then the scriptlet needs to test exit code. However, the code
at issue here does not need a subshell. autoMakefile.am.toplevel needs
two fixes:
1. when testing BUILD_SERVER and BUILD_TESTS, when not defined, the default
should be to not insert the extra buildrpm options.
if [[ -n "$(BUILD_TESTS)" -a "$(BUILD_TESTS)" = false ]]; then \
RPMARGS="$$RPMARGS --define \"build_lustre_tests 0\""; \
fi; \
the build is constrained to GNU Make on a Linux platform wherein
this "[[" form of "test" is legal.
2. when building in subdirectories, there is no need for a subshell:
rpms:
for subdir in $(RPM_SUBDIRS) ; do \
echo "Making rpms in $$subdir"; \
cd $$subdir ; \
$(MAKE) $(AM_MAKEFLAGS) $@ ; \
cd - ; \
echo "Finished rpms in $$subdir"; \
done; \
$(MAKE) $(AM_MAKEFLAGS) rpms-realq
srpm:
for subdir in $(RPM_SUBDIRS) ; do \
echo "Making srpm in $$subdir"; \
cd $$subdir ; \
$(MAKE) $(AM_MAKEFLAGS) $@ ; \
cd - ; \
echo "Finished srpms in $$subdir"; \
done; \
$(MAKE) $(AM_MAKEFLAGS) srpm-real