Makefile 959 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. # Andreas Abel, 2021-01-04
  2. # - 2021-02-12 AA: check for plan.json
  3. #
  4. # Generate license-report for Agda using cabal-plan.
  5. .PHONY: default
  6. default: index.html
  7. # Install the cabal-plan tool.
  8. .PHONY: install
  9. install:
  10. cabal install -f license-report cabal-plan
  11. cabal install pandoc
  12. # PHONY goal in order to rebuild the report on every invokation of `make`.
  13. .PHONY: index.md
  14. index.md : ../../dist-newstyle/cache/plan.json
  15. cabal-plan license-report Agda:exe:agda > $@
  16. %.html : %.md
  17. pandoc -s -t html -o $@ $<
  18. # If there is no cabal build plan, create one using `cabal configure`.
  19. #
  20. # Caveat: does not check that build plan is up-to-date!
  21. # Reason: we do not want to accidentially
  22. .PHONY: configure
  23. configure: ../../dist-newstyle/cache/plan.json
  24. ../../dist-newstyle/cache/plan.json :
  25. cd ../..; cabal v2-configure $(CABAL_FLAGS)
  26. CABAL_FLAGS = \
  27. --enable-tests \
  28. --enable-benchmarks \
  29. --enable-documentation \
  30. -fenable-cluster-counting \
  31. # EOF