summaryrefslogtreecommitdiff
path: root/Makefile
blob: 4eaab0ea36153face62c96affe5f8824daed672f (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 -fs $(notdir $<) $@
  17. $(rdfxmlfiles): %.rdf : %.ttl
  18. $(eval base = $(call getbase, $<))
  19. rapper $(base:%=-I "%") -i turtle -o rdfxml-abbrev "$<" > "$@"