Skip to content

Commit

Permalink
Correctly encode dependency on runtime/sak for StdlibModules
Browse files Browse the repository at this point in the history
  • Loading branch information
dra27 committed Aug 26, 2021
1 parent c50cf1a commit f7f1c9c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile
Expand Up @@ -825,16 +825,16 @@ clean::
# The standard library

.PHONY: library
library: ocamlc | $(SAK)
library: ocamlc
$(MAKE) -C stdlib $(BOOT_FLEXLINK_CMD) all

.PHONY: library-cross
library-cross: | $(SAK)
library-cross:
$(MAKE) -C stdlib \
$(BOOT_FLEXLINK_CMD) OCAMLRUN=../runtime/ocamlrun$(EXE) all

.PHONY: libraryopt
libraryopt: | $(SAK)
libraryopt:
$(MAKE) -C stdlib $(BOOT_FLEXLINK_CMD) allopt

partialclean::
Expand Down
10 changes: 10 additions & 0 deletions Makefile.common
Expand Up @@ -162,3 +162,13 @@ OCAMLYACCFLAGS ?=
$(OCAMLYACC) $(OCAMLYACCFLAGS) $<

SAK = $(ROOTDIR)/runtime/sak$(EXE)

# stdlib/StdlibModules cannot be include'd unless $(SAK) has been built. These
# two rules add that dependency. They have to be pattern rules since
# Makefile.common is included before default targets.
$(ROOTDIR)/%/sak$(EXE):
$(MAKE) -C $(ROOTDIR)/$* sak$(EXE)

ifneq "$(REQUIRES_CONFIGURATION)" ""
$(ROOTDIR)/%/StdlibModules: $(SAK) ;
endif

0 comments on commit f7f1c9c

Please sign in to comment.