Makefile 720 B

12345678910111213141516171819202122232425
  1. default: help
  2. PATCH = applyHarness.patch
  3. CONTRACTS_DIR = ../contracts
  4. MUNGED_DIR = munged
  5. help:
  6. @echo "usage:"
  7. @echo " make clean: remove all generated files (those ignored by git)"
  8. @echo " make $(MUNGED_DIR): create $(MUNGED_DIR) directory by applying the patch file to $(CONTRACTS_DIR)"
  9. @echo " make record: record a new patch file capturing the differences between $(CONTRACTS_DIR) and $(MUNGED_DIR)"
  10. munged: $(wildcard $(CONTRACTS_DIR)/*.sol) $(PATCH)
  11. rm -rf $@
  12. cp -r $(CONTRACTS_DIR) $@
  13. patch -p0 -d $@ < $(PATCH)
  14. record:
  15. diff -druN $(CONTRACTS_DIR) $(MUNGED_DIR) | sed 's+../contracts/++g' | sed 's+munged/++g' > $(PATCH)
  16. refresh: munged record
  17. clean:
  18. git clean -fdX
  19. touch $(PATCH)