feat(build): compile HoTT library when building
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
359bfe93d5
commit
f7317a7139
4 changed files with 11 additions and 3 deletions
|
@ -7,10 +7,10 @@ DEPS = make.deps
|
|||
all: $(OLEAN_FILES) $(DEPS)
|
||||
|
||||
%.olean: %.lean
|
||||
$(LEAN) $< -o $@
|
||||
$(LEAN) $(LEAN_OPTIONS) $< -o $@
|
||||
|
||||
%.olean: %.lua
|
||||
$(LEAN) $< -o $@
|
||||
$(LEAN) $(LEAN_OPTIONS) $< -o $@
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
|
|
1
library/hott/Makefile
Normal file
1
library/hott/Makefile
Normal file
|
@ -0,0 +1 @@
|
|||
include ../Makefile.common
|
|
@ -139,7 +139,7 @@ inductive product (A : Type) (B : Type) : Type :=
|
|||
|
||||
infixr `∧`:30 := product
|
||||
|
||||
notation `(` h `,` t:(foldr `,` (e r, pair e r) h) `)` := t
|
||||
notation `(` h `,` t:(foldl `,` (e r, pair r e) h) `)` := t
|
||||
|
||||
definition pr1 {A : Type} {B : Type} (p : A ∧ B) : A
|
||||
:= product_rec (λ a b, a) p
|
||||
|
|
|
@ -275,4 +275,11 @@ if((${CYGWIN} EQUAL "1") OR (NOT (${CMAKE_SYSTEM_NAME} MATCHES "Windows")))
|
|||
DEPENDS ${CMAKE_BINARY_DIR}/shell/lean
|
||||
WORKING_DIRECTORY ${LEAN_SOURCE_DIR}/../library/standard
|
||||
)
|
||||
|
||||
add_custom_target(
|
||||
hott_lib ALL
|
||||
COMMAND make LEAN="${CMAKE_BINARY_DIR}/shell/lean" LEAN_OPTIONS="--hott"
|
||||
DEPENDS ${CMAKE_BINARY_DIR}/shell/lean
|
||||
WORKING_DIRECTORY ${LEAN_SOURCE_DIR}/../library/hott
|
||||
)
|
||||
endif()
|
||||
|
|
Loading…
Reference in a new issue