Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
*.log
*.lpo
*~
log-lp.txt
log-lsp.txt
*.lpo
lpo.mk
32 changes: 21 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
SRC := $(wildcard *.lp)
OBJ := $(SRC:%.lp=%.lpo)
MAKEFLAGS += -r -k -j$(shell nproc)

default: $(OBJ)
LPO_MK := lpo.mk

$(OBJ)&: $(SRC)
lambdapi check -c $^
EXCLUDE := _opam
EXCEPT := $(EXCLUDE:%=-path ./% -prune -o)

clean:
rm -f $(OBJ)
LP := $(shell find . $(EXCEPT) -type f -name '*.lp' -print)

.PHONY: default
default: $(LP:%=%o)

%.lpo: %.lp
@echo lambdapi check $< ...
@lambdapi check -c -v 0 $<

install: $(OBJ)
lambdapi install lambdapi.pkg $(SRC) $(OBJ)
include $(LPO_MK)

uninstall:
lambdapi uninstall lambdapi.pkg
$(LPO_MK): $(LP)
@echo create/update $@ ...
lambdapi depend $(LP) > $@

.PHONY: clean
clean:
-find . $(EXCEPT) -type f -name '*.lpo' -delete
-rm $(LPO_MK)
Loading