# Your GF_LIB_PATH must be set in order for this build script to work .PHONY: all index clean GF_alltenses=$(GF_LIB_PATH)/alltenses GF=gf GFDOC=gfdoc ROOT=../.. S=$(ROOT)/src CONFIG=$(ROOT)/languages.csv # List of languages extracted from languages.csv, with 'Synopsis' column == y LANGS=$(shell cat $(CONFIG) | cut -d',' -f1,10 | grep ',y' | cut -d',' -f1) # This list was constructed by observing what files MkSynopsis.hs reads SRC_FILES=$(S)/abstract/Common.gf $(S)/abstract/Cat.gf $(S)/api/Constructors.gf $(S)/abstract/Structural.gf $(patsubst %,$S/*/Paradigms%.gf,$(LANGS)) EXAMPLES_OUT=$(patsubst %,api-examples-%.txt,$(LANGS)) INCLUDES=intro.txt categories-intro.txt categories-imagemap.html categories.png additional.txt browse.txt example.txt TMP=tmp.html TEMPLATE=template.html all: index index: index.html index.txt: MkSynopsis.hs MkExxTable.hs $(INCLUDES) $(EXAMPLES_OUT) $(SRC_FILES) runghc -i$(ROOT) MkSynopsis.hs index.html: index.txt $(TEMPLATE) txt2tags --target=html --no-headers --quiet --toc --outfile=$@ --infile=$< pandoc \ --from=html \ --to=html5 \ --standalone \ --template=$(TEMPLATE) \ --css="synopsis.css" \ --metadata='title:"GF Resource Grammar Library: Synopsis"' \ --variable='rel-root:$(ROOT)/..' \ --output=$(TMP) \ $@ mv $(TMP) $@ sed -i.bak "s/