Skip to content

Commit

Permalink
update Dockerfile and fix root build error (see MLton#601)
Browse files Browse the repository at this point in the history
  • Loading branch information
shwestrick committed Jan 14, 2025
1 parent 7481f4b commit f17e726
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ RUN apt-get update -qq \
&& apt-get install -qq git build-essential libgmp-dev mlton mlton-tools vim \
&& git clone https://github.com/mlton/mlton.git /root/mlton \
&& cd /root/mlton \
&& git checkout on-20210117-release \
&& git checkout on-20241230-release \
&& make

ENV PATH /root/mlton/build/bin:$PATH
ENV PATH=/root/mlton/build/bin:$PATH

# Copy the current directory (MPL source root) to a location within the container & move there
COPY . /root/mpl
WORKDIR /root/mpl

# Build from source, install, and make examples
RUN make && make install && cd examples && make

ENV PATH=/root/mpl/build/bin:$PATH
10 changes: 5 additions & 5 deletions mlton/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ front-end/%.lex.sml: front-end/%.lex
$(SED) -e 's/in Vector.fromList(List.map g/in Vector.fromList(Pervasive.List.map g/' $<.sml.in > $<.sml
$(RM) $<.sml.in
$(CP) $<.sml $<.sml.boot
$(CHMOD) -w $<.*
$(CHMOD) a-w $<.*
else
front-end/%.lex.sml: front-end/%.lex.sml.boot
$(RM) $@
$(CP) $< $@
$(CHMOD) -w $@
$(CHMOD) a-w $@
endif

ifeq (true,$(call HAVE_CMD,$(RUN_MLYACC)))
Expand All @@ -131,16 +131,16 @@ front-end/%.grm.sig front-end/%.grm.sml: front-end/%.grm
$(SED) -e 's/in Array.fromList(List.map actionRowLookUp actionRowNumbers)/in Array.fromList(Pervasive.List.map actionRowLookUp actionRowNumbers)/' $<.sml.in > $<.sml
$(RM) $<.sml.in
$(CP) $<.sml $<.sml.boot
$(CHMOD) -w $<.*
$(CHMOD) a-w $<.*
else
front-end/%.grm.sig: front-end/%.grm.sig.boot
$(RM) $@
$(CP) $< $@
$(CHMOD) -w $@
$(CHMOD) a-w $@
front-end/%.grm.sml: front-end/%.grm.sml.boot
$(RM) $@
$(CP) $< $@
$(CHMOD) -w $@
$(CHMOD) a-w $@
endif

mlton-stubs.mlb: $(shell $(MLBDEPS) ../lib/stubs/mlton-stubs/sources.mlb | $(GREP) 'mlb$$' | $(GREP) -v '$$(SML_LIB)') $(shell $(MLBDEPS) mlton.mlb | $(GREP) 'mlb$$' | $(GREP) -v '$$(SML_LIB)')
Expand Down

0 comments on commit f17e726

Please sign in to comment.