Skip to content

Commit ed28061

Browse files
committed
Do not let files depend on a phony target
1 parent 543e3a1 commit ed28061

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

common.mk

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -861,7 +861,10 @@ clean-platform distclean-platform realclean-platform:
861861

862862
RUBYSPEC_CAPIEXT = spec/ruby/optional/capi/ext
863863
RUBYSPEC_CAPIEXT_SRCDIR = $(srcdir)/$(RUBYSPEC_CAPIEXT)
864-
RUBYSPEC_CAPIEXT_DEPS = $(RUBYSPEC_CAPIEXT_SRCDIR)/rubyspec.h $(RUBY_H_INCLUDES) $(LIBRUBY) build-ext
864+
RUBYSPEC_CAPIEXT_DEPS = $(RUBYSPEC_CAPIEXT_SRCDIR)/rubyspec.h $(RUBY_H_INCLUDES) $(LIBRUBY)
865+
866+
rubyspec-capiext: build-ext $(DOT_WAIT)
867+
# make-dependent rules should be included after this and built after build-ext.
865868

866869
clean-spec: PHONY
867870
-$(Q) $(RM) $(RUBYSPEC_CAPIEXT)/*.$(OBJEXT) $(RUBYSPEC_CAPIEXT)/*.$(DLEXT)

defs/gmake.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,8 @@ update-deps:
506506

507507
# order-only-prerequisites doesn't work for $(RUBYSPEC_CAPIEXT)
508508
# because the same named directory exists in the source tree.
509-
$(RUBYSPEC_CAPIEXT)/%.$(DLEXT): $(srcdir)/$(RUBYSPEC_CAPIEXT)/%.c $(RUBYSPEC_CAPIEXT_DEPS)
509+
$(RUBYSPEC_CAPIEXT)/%.$(DLEXT): $(srcdir)/$(RUBYSPEC_CAPIEXT)/%.c $(RUBYSPEC_CAPIEXT_DEPS) \
510+
| build-ext
510511
$(ECHO) building $@
511512
$(Q) $(MAKEDIRS) $(@D)
512513
$(Q) $(DLDSHARED) -L. $(XDLDFLAGS) $(XLDFLAGS) $(LDFLAGS) $(INCFLAGS) $(CPPFLAGS) $(OUTFLAG)$@ $< $(LIBRUBYARG)

0 commit comments

Comments
 (0)