mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-29 09:58:54 -06:00
Enough dependencies have been added so that * If nothing has changed, MkSynopsis.hs will not be run, so synopisis.html will not be needlessly regenerated. * You can use 'make -j' to build examples for different languages in parallel. Hopefully 'make synopsis' produces the exact same result as before, but if it turns out that some dependencies are missing and something is not rebuilt despite of changes, 'make clean' can be used to force a full rebuild.
50 lines
1.4 KiB
Makefile
50 lines
1.4 KiB
Makefile
.PHONY: abstract synopsis index status
|
|
|
|
all: synopsis
|
|
|
|
GF_alltenses=$(GF_LIB_PATH)/alltenses
|
|
GF=gf
|
|
GFDOC=gfdoc
|
|
|
|
index:
|
|
txt2tags -thtml index.txt
|
|
status:
|
|
txt2tags -thtml status.txt
|
|
|
|
synopsis: synopsis.html
|
|
|
|
S=../src
|
|
|
|
# List of languages extracted from MkSynopsis.hs
|
|
LANGS=Afr Bul Cat Chi Dan Dut Eng Est Eus Fin Fre Ger Gre Hin Ice Ita Jpn Lav Mlt Mon Nep Nor Nno Pes Pnb Pol Ron Rus Snd Spa Swe Tha Urd
|
|
|
|
# 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))
|
|
|
|
synopsis.html: $(EXAMPLES_OUT) $(SRC_FILES)
|
|
runghc MkSynopsis.hs >out
|
|
|
|
categories-imagemap.html: categories.dot
|
|
dot -Tcmapx $^ > $@
|
|
|
|
abstract:
|
|
$(GFDOC) -txthtml $S/abstract/*.gf
|
|
mv $S/abstract/*.html abstract
|
|
|
|
|
|
api-examples.gfs: api-examples.txt
|
|
runghc MkExx.hs < $< > $@
|
|
|
|
|
|
# Since .gfo files aren't self-contained, the dependencies given here are
|
|
# incomplete. But I am thinking that the Try%.gfo file will always be newer
|
|
# than any other files it depends on, so the rule will trigger when
|
|
# needed anyway. //TH 2018-10-22
|
|
api-examples-%.txt: $(GF_alltenses)/Try%.gfo api-examples.gfs
|
|
GF_LIB_PATH=$(GF_LIB_PATH) $(GF) -retain -s $< <api-examples.gfs >$@
|
|
|
|
clean:
|
|
rm -rf out synopsis.txt api-examples.gfs $(EXAMPLES_OUT)
|