summaryrefslogtreecommitdiff
path: root/Makefile
blob: 4bc23d0facbc842d0d562c10cc943aca91c2287c (plain)
  1. infiles := $(wildcard data/*.ttl data/*/*.ttl)
  2. turtlefiles := $(infiles:data/%.ttl=build/%/index.ttl)
  3. textfiles = $(turtlefiles:%.ttl=%.txt)
  4. rdfxmlfiles = $(turtlefiles:%.ttl=%.rdf)
  5. getbase = $(shell perl -ne '/^\@base\s+<(http.+)>/ and print $$1 and exit;' "$1")
  6. all: $(textfiles) $(rdfxmlfiles)
  7. clean:
  8. rm -rf build
  9. $(turtlefiles): build/%/index.ttl : data/%.ttl
  10. mkdir -p $(dir $@)
  11. cp $< $@
  12. # $(eval base = $(call getbase, $<))
  13. # rapper $(base:%=-I "%") -i turtle -o turtle "$<" > "$@"
  14. # perl -i -pe 's/ {4}/\t/g' "$@"
  15. $(textfiles): %.txt : %.ttl
  16. ln -s $(notdir $<) $@
  17. $(rdfxmlfiles): %.rdf : %.ttl
  18. $(eval base = $(call getbase, $<))
  19. rapper $(base:%=-I "%") -i turtle -o rdfxml-abbrev "$<" > "$@"