···15141514# (without the extension, which is added by the macro)
15151515define COMPILE_C_FILE
15161516ifeq "$(COMPUTE_DEPS)" "true"
15171517-ifneq "$(1)" "%"
15171517+ifneq "$(if $(3),%,$(1))" "%"
15181518# -MG would ensure that the dependencies are generated even if the files listed
15191519# in $$(runtime_BUILT_HEADERS) haven't been assembled yet. However,
15201520# this goes subtly wrong if the user has the headers installed,
···15561556$(foreach runtime_OBJECT_TYPE,$(subst %,,$(runtime_OBJECT_TYPES)), \
15571557 $(eval \
15581558 runtime/dynlink$(runtime_OBJECT_TYPE).$(O): $(ROOTDIR)/Makefile.config))
15591559+15601560+$(eval $(call COMPILE_C_FILE,yacc/%,yacc/%,no-deps))
1559156115601562## Compilation of runtime assembly files
15611563···22762278endif
2277227922782280# Check that the stack limit is reasonable (Unix-only)
22812281+$(eval $(call COMPILE_C_FILE,tools/checkstack,tools/checkstack,no-deps))
22792282.PHONY: checkstack
22802283ifeq "$(UNIX_OR_WIN32)" "unix"
22812284checkstack: tools/checkstack$(EXE)
+3-6
Makefile.common
···537537538538# The rule to compile C files
539539540540-# This rule is similar to GNU make's implicit rule, except that it is more
541541-# general (it supports both .o and .obj)
540540+# Cancel GNU Make's implicit C compilation rule
541541+%.o: %.c
542542543543+# These are still here as they are shared with otherlibs/
543544ifeq "$(COMPUTE_DEPS)" "true"
544545RUNTIME_HEADERS :=
545546REQUIRED_HEADERS :=
···548549 $(wildcard $(ROOTDIR)/runtime/caml/*.h)
549550REQUIRED_HEADERS := $(RUNTIME_HEADERS) $(wildcard *.h)
550551endif
551551-552552-%.$(O): %.c $(REQUIRED_HEADERS)
553553- $(V_CC)$(CC) $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) $(CPPFLAGS) \
554554- $(OUTPUTOBJ)$@ -c $<
555552556553$(DEPDIR):
557554 $(MKDIR) $@
+4
stdlib/Makefile
···22222323include $(ROOTDIR)/Makefile.common
24242525+%.$(O): %.c $(REQUIRED_HEADERS)
2626+ $(V_CC)$(CC) $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) $(CPPFLAGS) \
2727+ $(OUTPUTOBJ)$@ -c $<
2828+2529# There are three ways the Standard Library is compiled in bytecode:
2630# 1. During coldstart
2731# - using ../boot/ocamlc which runs on ../boot/ocamlrun