Commit 5b3839ec authored by Paal Kvamme's avatar Paal Kvamme
Browse files

Fix parallel builds for OpenZGY/C++ and disable parallel for all other targets.

parent 51387de3
......@@ -31,6 +31,23 @@ MY_OVERRIDES += $(if $(SDAPI_INTERNAL),SD_ZIPFILE=$(BUILDROOT)/seismic-service-b
.PHONY: python native wrapper build clean clobber docker-build docker-buildtest docker-test docker noop doxygen
# This Makefile does not support parallel execution with -j N.
#
# Make would conclude that it may choose to build native, sdglue,
# wrapper, and python in parallel. But the "wrapper" target will build
# (but not test) the "native" library using a recursive make. While
# the "native" target does a similar recursive build, with tests.
# There are probably others. It is possible to restructure the rules
# so Make knows about those dependencies. But that is hardly useful
# because most rules in this file would end up being serialized
# anyway.
#
# The next declaration causes any "-j N" option to be ingored in this
# Makefile but it will still be honored by recursive makes. Unless
# those sub-makefiles choose to do the same.
.NOTPARALLEL:
all: native sdglue wrapper python
noop:
......
......@@ -18,6 +18,12 @@
SELF := $(lastword $(MAKEFILE_LIST))
include ../../scripts/Make.defs
# This Makefile does not support parallel execution with -j N.
# There is practically nothing at this level that can be done
# in parallel. For that reason, no effort has been make to ensure
# that the rules are correct as far as parallelization goes.
.NOTPARALLEL:
.PHONY: all
all: build test
......
......@@ -17,6 +17,15 @@
# PLATFORM CONFIG (consumed) MYPLATFORM MYCONFIG (produced)
include ../../scripts/Make.defs
# Uncomment to disable parallel execution with -j N.
# The dependencies might not be 100% correct. My excuse for not fixing
# this properly is that the test target, which just runs a single
# executable, takes much longer than the compliation anyway. The
# automated build pipeline should not use -j. Developers building
# locally can do so at their own risk. Your mileage may vary regarding
# whether the -j option really does speed things up.
#.NOTPARALLEL:
.PHONY: all all-no-doxygen
all: build doxygen doxyint test
all-no-doxygen: build test
......@@ -236,6 +245,7 @@ clobber: clean
# The automatic dependency generator doesn't catch SDAPI / ZFP header files.
$(OBJ_DIR)/impl/file_sd.o: $(SD_SENTINEL)
$(OBJ_DIR)/test/test_file.o: $(SD_SENTINEL)
$(OBJ_DIR)/test/test_sdutils.o: $(SD_SENTINEL)
$(OBJ_DIR)/impl/compress_zfp.o: $(ZFP_SENTINEL)
# Note: If gcc finds that foo.o depends on inc.h, I will make foo.o, */foo.o
......
......@@ -39,6 +39,14 @@ DOX_TMP = $(BUILDROOT)/build/temp/pure/doxygen
.PHONY: all all-no-doxygen build venv vtest coverage vcoverage init data clean clobber install vinstall deploy push help-push
# This Makefile does not support parallel execution with -j N.
# There is not much at this level that can be done in parallel.
# For that reason, no effort has been make to ensure that the
# rules are correct as far as parallelization goes.
# A future enhancement would be to restructure the "test" rule
# so the tests, if nothing else, might be run in parallel.
.NOTPARALLEL:
# Note that I might not need to build and install in order to test.
# Just invoke the vtest target only.
......
......@@ -21,6 +21,11 @@ RUNARGS += -v $(WORKAREA):/home/me/sdapi:ro
#RUNARGS += -v $(WORKAREA2):/home/me/seismic-store-sdutil:ro
RUNARGS += -v $(CWD)/build.sh:/home/me/build.sh
# This Makefile does not support parallel execution with -j N
# The only really time consuming part is to build the Azure
# prerequisites, and the task for that will enable parallel itself.
.NOTPARALLEL:
all:
@echo "Remember to update the paths at the top of this Makefile."
@echo
......
......@@ -23,6 +23,12 @@ MYWHEEL = $(BUILDROOT)/build/deploy/wrapper/$(MYPLATFORM)/$(MYNAME)-*.whl
MYSTAMP = $(BUILDROOT)/build/deploy/wrapper/$(MYPLATFORM)/$(MYNAME).timestamp
DSO = build/lib.linux-x86_64-*/openzgycpp.cpython-*.so
# This Makefile does not support parallel execution with -j N.
# There is practically nothing at this level that can be done
# in parallel. For that reason, no effort has been make to ensure
# that the rules are correct as far as parallelization goes.
.NOTPARALLEL:
all: clean build test
# Only for HAVE_SD and HAVE_ZFP variables.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment