coqbooks/Makefile

27 lines
655 B
Makefile
Raw Normal View History

2023-01-04 11:04:31 -05:00
# Generate HTMLs from the Coq source files
# Directory containing source (Coq) files
source := ./src
# Directory containing pdf files
output := ./html
# All Coq files in src/ are considered sources
sources := $(wildcard $(source)/*.v)
# Convert the list of source files (Coq files in directory .)
# into a list of output files (HTMLs in directory ./html).
objects := $(patsubst %.v,%.html,$(subst $(source),$(output),$(sources)))
all: $(objects)
# Recipe for converting a Coq file into HTML using coqdoc
$(output)/%.html: $(source)/%.v
coqc $<
coqdoc --html --no-index -d ./html/ $<
.PHONY : clean
clean:
rm -f $(output)/*.html $(output)/*.css