Skip to content

Commit

Permalink
make install (examples work, but are not installed)
Browse files Browse the repository at this point in the history
  • Loading branch information
tahina-pro committed Apr 13, 2023
1 parent e81ea08 commit 11c6254
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 0 deletions.
31 changes: 31 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,34 @@ clean:
.PHONY: test
test: all
+$(MAKE) -C share/steel

ifeq ($(OS),Windows_NT)
STEEL_INSTALL_PREFIX=$(shell cygpath -m $(PREFIX))
else
STEEL_INSTALL_PREFIX=$(PREFIX)
endif
export STEEL_INSTALL_PREFIX

INSTALL := $(shell ginstall --version 2>/dev/null | cut -c -8 | head -n 1)
ifdef INSTALL
INSTALL := ginstall
else
INSTALL := install
endif
export INSTALL

.PHONY: install install-ocaml install-lib install-include install-share

install-ocaml:
cd src/ocaml && dune install --prefix=$(STEEL_INSTALL_PREFIX)

install-lib:
+$(MAKE) -C lib/steel install

install-include:
+$(MAKE) -C include/steel install

install-share:
+$(MAKE) -C share/steel install

install: install-ocaml install-lib install-include install-share
8 changes: 8 additions & 0 deletions include/steel/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
all:

.PHONY: install %.install

%.install: %
$(INSTALL) -m 644 -D $< $(STEEL_INSTALL_PREFIX)/include/steel/$<

install: $(addsuffix .install,$(wildcard *.h))
13 changes: 13 additions & 0 deletions lib/steel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,16 @@ clean:

%.fst-in %.fsti-in:
@echo $(FSTAR_OPTIONS)

.PHONY: install-steel install-pulse install
install: install-steel install-pulse

install-pulse:
+$(MAKE) -C pulse install

.PHONY: %.install

%.install: %
$(INSTALL) -m 644 -D $< $(STEEL_INSTALL_PREFIX)/lib/steel/$<

install-steel: $(addsuffix .install,$(wildcard *.fst *.fsti *.checked) libsteel.a)
10 changes: 10 additions & 0 deletions lib/steel/pulse/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,13 @@ clean:

%.fst-in %.fsti-in:
@echo $(FSTAR_OPTIONS)

.PHONY: install-pulse install
install: install-pulse

.PHONY: %.install

%.install: %
$(INSTALL) -m 644 -D $< $(STEEL_INSTALL_PREFIX)/lib/steel/pulse/$<

install-pulse: $(addsuffix .install,$(wildcard *.fst *.fsti *.checked))
7 changes: 7 additions & 0 deletions share/steel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,10 @@ $(TARGETS): %:
+$(MAKE) -C $@

.PHONY: all $(TARGETS)

.PHONY: install %.install

%.install: %
$(INSTALL) -m 644 -D $< $(STEEL_INSTALL_PREFIX)/share/steel/$<

install: $(addsuffix .install,Makefile.include)

0 comments on commit 11c6254

Please sign in to comment.