Branch: Tag:

2019-05-05

2019-05-05 09:30:09 by Marcus Comstedt <marcus@mc.pp.se>

Build: Fix use of MAKE_PARALLEL

MAKE_PARALLEL is now compatible with jobserver mode. To make a
parallel build using the top level makefile, run e.g.

make MAKE_PARALLEL=-j20 all run_hilfe

The targets will be built with -j20, but each target will be finished
before the next is started.

When running make in the build directory, MAKE_PARALLEL is not
meaningful. Just run "make -j20" directly (and don't specify more
than one target).

88:   # -O should work with all compilers   OPTIMIZE=@OPTIMIZE@    - # Set to a flag for parallelizing make, e.g. -j2. It's given to make - # at the level where it's most effective. - MAKE_PARALLEL= -  +    # Preprocessor flags.   PREFLAGS=-DPIKE_SRC_ROOT="$(BASEDIR)" -I. -I$(SRCDIR) $(DEFINES)   
362:   # Only want tpike to exist for use with $(RUNPIKE) in the modules. We   # don't want to require it actually being up-to-date.   tpike@EXEEXT@: master-stamp -  $(MAKE) $(MAKE_FLAGS) $(MAKE_PARALLEL) tpike-real +  $(MAKE) $(MAKE_FLAGS) tpike-real      # If we build without dynamic modules then tpike is built first with   # all modules under modules/ linked into it, then tpike is used for
1127:    :; \    else \    if [ -x $(TMP_BUILDDIR)/pike ]; then :; \ -  else $(MAKE) $(MAKE_FLAGS) $(MAKE_PARALLEL) pike@EXEEXT@; \ +  else $(MAKE) $(MAKE_FLAGS) pike@EXEEXT@; \    fi; \    ( cd post_modules && { \    rm -f remake; \
1146:    @MODULE_BUILD_TYPE=static; \    export MODULE_BUILD_TYPE; \    ( cd modules && ( rm remake >/dev/null 2>&1 || : ) && \ -  ( $(MAKE) $(MAKE_PARALLEL) $(MAKE_FLAGS) || \ -  ( test -f remake && $(MAKE) $(MAKE_PARALLEL) $(MAKE_FLAGS) ) ) \ +  ( $(MAKE) $(MAKE_FLAGS) || \ +  ( test -f remake && $(MAKE) $(MAKE_FLAGS) ) ) \    ) || exit $$?    @touch static-modules-stamp   
1155:    @MODULE_BUILD_TYPE=dynamic; \    export MODULE_BUILD_TYPE; \    ( cd modules && ( rm remake >/dev/null 2>&1 || : ) && \ -  ( $(MAKE) $(MAKE_PARALLEL) $(MAKE_FLAGS) || \ -  ( test -f remake && $(MAKE) $(MAKE_PARALLEL) $(MAKE_FLAGS) ) ) \ +  ( $(MAKE) $(MAKE_FLAGS) || \ +  ( test -f remake && $(MAKE) $(MAKE_FLAGS) ) ) \    ) || exit $$?    @touch dynamic-modules-stamp   
1186:    @MODULE_BUILD_TYPE=@POST_MODULE_BUILD_TYPE@; \    export MODULE_BUILD_TYPE; \    ( cd post_modules && ( rm remake >/dev/null 2>&1 || : ) && \ -  ( $(MAKE) $(MAKE_PARALLEL) $(MAKE_FLAGS) || \ -  ( test -f remake && $(MAKE) $(MAKE_PARALLEL) $(MAKE_FLAGS) ) ) \ +  ( $(MAKE) $(MAKE_FLAGS) || \ +  ( test -f remake && $(MAKE) $(MAKE_FLAGS) ) ) \    ) || exit $$?    @touch post-modules-stamp