src/Makefile - lemplate

  1. .PHONY: fetch runtime

  2. .DELETE_ON_ERROR: $(RUNTIME_MODULE) $(RUNTIME_COMPACT_MODULE)

  3. JEMPLATE_SCRIPT=../bin/lemplate
  4. JEMPLATE_STANDALONE_SCRIPT=../lemplate
  5. GRAMMAR_MODULE=../lib/Lemplate/Grammar.pm
  6. RUNTIME_MODULE=../lib/Lemplate/Runtime.pm
  7. RUNTIME_COMPACT_MODULE=../lib/Lemplate/Runtime/Compact.pm
  8. JEMPLATE_MODULES=$(GRAMMAR_MODULE) $(RUNTIME_MODULE) $(RUNTIME_COMPACT_MODULE)

  9. all: $(JEMPLATE_STANDALONE_SCRIPT)

  10. $(JEMPLATE_STANDALONE_SCRIPT): $(JEMPLATE_MODULES) _force
  11.    ./bin/make-standalone-script $(JEMPLATE_SCRIPT) > $@
  12.    chmod +x $@

  13. $(GRAMMAR_MODULE): parser _force
  14.    (cd parser; ./yc)
  15.    mv parser/Grammar.pm $@
  16.    rm parser/Parser.output

  17. $(RUNTIME_MODULE): lib/Lemplate/Runtime.pm _force
  18.    bin/tpage $< > $@

  19. $(RUNTIME_COMPACT_MODULE): lib/Lemplate/Runtime/Compact.pm _force
  20.    bin/tpage $< > $@

  21. _force: