summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-11-21 23:15:26 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-11-21 23:17:48 +0900
commitece917bab38248e1fd1974e597d66df8e33d862e (patch)
treefbe5715f0a7cb8d6dfe31b4ab97f3180b4f5eed6
parenta6db9e8d7bfbaa6b2880e06b68c60821217b2395 (diff)
Added rubyspec-capiext target
This target builds extensions for rubyspec optional C-API tests.
-rw-r--r--defs/gmake.mk10
1 files changed, 10 insertions, 0 deletions
diff --git a/defs/gmake.mk b/defs/gmake.mk
index 31af44a..ec9575a 100644
--- a/defs/gmake.mk
+++ b/defs/gmake.mk
@@ -383,3 +383,13 @@ update-deps:
$(RMDIR) $(dir $(deps_dir))
git --git-dir=$(GIT_DIR) merge --no-edit --ff-only $(update_deps)
git --git-dir=$(GIT_DIR) branch --delete $(update_deps)
+
+# order-only-prerequisites doesn't work for $(RUBYSPEC_CAPIEXT)
+# because the same named directory exists in the source tree.
+$(RUBYSPEC_CAPIEXT)/%.$(DLEXT): $(srcdir)/$(RUBYSPEC_CAPIEXT)/%.c $(srcdir)/$(RUBYSPEC_CAPIEXT)/rubyspec.h $(RUBY_H_INCLUDES)
+ $(ECHO) building $@
+ $(Q) $(MAKEDIRS) $(@D)
+ $(Q) $(DLDSHARED) $(DLDFLAGS) $(ARCH_FLAG) $(CFLAGS) $(INCFLAGS) $(CPPFLAGS) $(OUTFLAG)$@ $<
+ $(Q) $(RMALL) $@.*
+rubyspec-capiext: $(patsubst %.c,$(RUBYSPEC_CAPIEXT)/%.$(DLEXT),$(notdir $(wildcard $(srcdir)/$(RUBYSPEC_CAPIEXT)/*.c)))
+ @ $(NULLCMD)