GaBuZoMeu/Makefile

39 lines
1.1 KiB
Makefile
Raw Normal View History

2023-06-08 21:49:35 +02:00
GHC=ghc
MODULES=Grammar.hs Types.hs
REGISTRY_MODULES=Registry/Grammar.hs Registry/Types.hs Registry/Registry.hs Registry/Utils.hs
TESTS=broken-tags.txt well-formed-tags.txt
ALL_MODULES=${MODULES}
REGISTRY=http://www.iana.org/assignments/language-subtag-registry
REGISTRYFILE=language-subtag-registry
ALL_PROGRAMS=check-wf check-valid tests-from-files display-tag registry2xml registry2txt registry2postgresql check-registry
TARBALL=/tmp/gabuzomeu.tar
default: check-wf check-valid check-registry
all: ${ALL_PROGRAMS}
%: %.hs ${ALL_MODULES}
${GHC} -o $@ --make $<
%: Registry/%.hs ${MODULES}
${GHC} -o $@ --make $<
test: test-tags test-regs
test-tags: tests-from-files ${ALL_MODULES} ${TESTS}
./$<
test-regs: test-registries ${ALL_MODULES} ${REGISTRY_MODULES} ${TESTS}
./$<
${REGISTRYFILE}: check-registry
wget -O $@ ${REGISTRY}
./check-registry ${REGISTRYFILE}
touch ${REGISTRYFILE}
dist: clean
(cd ..; tar cvf ${TARBALL} --exclude hnop --exclude ltr*.txt GaBuZoMeu && gzip --best --force --verbose ${TARBALL})
clean:
rm -f list-grandfathered-tags ${REGISTRYFILE} ${ALL_PROGRAMS} \#*\# *~ *.o *.hi *~ Registry/*.o Registry/*.hi Registry/*~