Advertisement
kosx

WEB-API Makefile

Dec 27th, 2020
786
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 1.25 KB | None | 0 0
  1. BUILDDIR      = _build
  2. STATICDIR     = _static
  3. DOWNLOADDIR   = _download
  4. NAME          = WebAssembly
  5.  
  6. .PHONY: all
  7. all:
  8.     mkdir -p $(BUILDDIR)/html
  9.     bikeshed spec index.bs $(BUILDDIR)/html/index.html
  10.     @echo "Build finished. The HTML pages are in `pwd`/$(BUILDDIR)/html."
  11.  
  12. .PHONY: publish
  13. publish:
  14.     (cd ..; make publish-web-api)
  15.  
  16. .PHONY: clean
  17. clean:
  18.     rm -rf $(BUILDDIR)
  19.     rm -rf $(STATICDIR)
  20.  
  21. .PHONY: diff
  22. diff: all
  23.     @echo "Downloading the old single-file html spec..."
  24.     curl `grep "^TR" index.bs | cut -d' ' -f2` -o $(BUILDDIR)/html/old.html
  25.     @echo "Done."
  26.     @echo "Diffing new against old..."
  27.     perl ../util/htmldiff.pl $(BUILDDIR)/html/old.html $(BUILDDIR)/html/index.html $(BUILDDIR)/html/diff.html
  28.     @echo "Done. The diff is at $(BUILDDIR)/html/diff.html"
  29.  
  30. .PHONY: WD-tar
  31. WD-tar:
  32.     bikeshed echidna --just-tar index.bs $(BUILDDIR)/html/index.html
  33.     mv test.tar $(BUILDDIR)/WD.tar
  34.     @echo "Built $(BUILDDIR)/WD.tar."
  35.  
  36. .PHONY: WD-echidna
  37. WD-echidna:
  38.     @if [ -z $(W3C_USERNAME) ] || \
  39.         [ -z $(W3C_PASSWORD) ] || \
  40.             [ -z $(DECISION_URL) ] ; then \
  41.         echo "Must provide W3C_USERNAME, W3C_PASSWORD, and DECISION_URL environment variables"; \
  42.         exit 1; \
  43.     fi
  44.     bikeshed echidna index.bs --u $(W3C_USERNAME) --p $(W3C_PASSWORD) --d $(DECISION_URL)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement