Makefile 696 B

123456789101112131415161718192021222324
  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 -ruN $(CONTRACTS_DIR) $(MUNGED_DIR) | sed 's+../contracts/++g' | sed 's+munged/++g' > $(PATCH)
  16. clean:
  17. git clean -fdX
  18. touch $(PATCH)