GaBuZoMeu/Makefile

41 lines
1.2 KiB
Makefile
Raw Normal View History

2023-06-08 21:49:35 +02:00
GHC=ghc
#GHC_OPTS="-prof"
GHC_OPTS=
2023-06-08 21:49:35 +02:00
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=https://www.iana.org/assignments/language-subtag-registry
2023-06-08 21:49:35 +02:00
REGISTRYFILE=language-subtag-registry
2023-06-09 09:42:58 +02:00
ALL_PROGRAMS=check-wf check-valid tests-from-files display-tag registry2xml registry2txt registry2postgresql registry2sqlite registry2mulhtml check-registry
2023-06-08 21:49:35 +02:00
TARBALL=/tmp/gabuzomeu.tar
default: check-wf check-valid check-registry
all: ${ALL_PROGRAMS}
%: %.hs ${ALL_MODULES}
${GHC} ${GHC_OPTS} -o $@ --make $<
2023-06-08 21:49:35 +02:00
%: Registry/%.hs ${MODULES}
${GHC} ${GHC_OPTS} -o $@ --make $<
2023-06-08 21:49:35 +02:00
test: ${REGISTRYFILE} test-tags test-regs
2023-06-08 21:49:35 +02:00
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/*~