Skip to content

Commit

Permalink
.NOTPARALLEL with prerequisites needs recent GNU Make
Browse files Browse the repository at this point in the history
GNU Make prior to 4.4 just ignores the prerequisites, and runs
everything in serial.
  • Loading branch information
nobu committed Sep 21, 2023
1 parent 7e350f5 commit 2b41df2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 0 additions & 1 deletion common.mk
Expand Up @@ -1289,7 +1289,6 @@ $(REVISION_H)$(yes_baseruby:yes=~disabled~):
# $(MKFILES): $(REVISION_H)

ripper_srcs: $(RIPPER_SRCS)
.NOTPARALLEL: ripper_srcs

$(RIPPER_SRCS): $(srcdir)/parse.y $(srcdir)/defs/id.def
$(RIPPER_SRCS): $(srcdir)/ext/ripper/tools/preproc.rb $(srcdir)/ext/ripper/tools/dsl.rb
Expand Down
8 changes: 7 additions & 1 deletion defs/gmake.mk
Expand Up @@ -518,7 +518,13 @@ matz: up
tags:
$(MAKE) GIT="$(GIT)" -C "$(srcdir)" -f defs/tags.mk

ifeq ($(DOT_WAIT),)

# ripper_srcs makes all sources at once. invoking this target multiple
# times in parallel means all sources will be built for the number of
# sources times respectively.
ifneq ($(DOT_WAIT),)
.NOTPARALLEL: ripper_srcs
else
ripper_src =
$(foreach r,$(RIPPER_SRCS),$(eval $(value r): | $(value ripper_src))\
$(eval ripper_src := $(value r)))
Expand Down

0 comments on commit 2b41df2

Please sign in to comment.