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 5ed73d0
Show file tree
Hide file tree
Showing 2 changed files with 11 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
8 changes: 8 additions & 0 deletions Makefile.common
Expand Up @@ -162,3 +162,11 @@ 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)

$(ROOTDIR)/%/StdlibModules: $(SAK) ;

0 comments on commit 5ed73d0

Please sign in to comment.