You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
696 B
Makefile
25 lines
696 B
Makefile
default: help
|
|
|
|
PATCH = applyHarness.patch
|
|
CONTRACTS_DIR = ../contracts
|
|
MUNGED_DIR = munged
|
|
|
|
help:
|
|
@echo "usage:"
|
|
@echo " make clean: remove all generated files (those ignored by git)"
|
|
@echo " make $(MUNGED_DIR): create $(MUNGED_DIR) directory by applying the patch file to $(CONTRACTS_DIR)"
|
|
@echo " make record: record a new patch file capturing the differences between $(CONTRACTS_DIR) and $(MUNGED_DIR)"
|
|
|
|
munged: $(wildcard $(CONTRACTS_DIR)/*.sol) $(PATCH)
|
|
rm -rf $@
|
|
cp -r $(CONTRACTS_DIR) $@
|
|
patch -p0 -d $@ < $(PATCH)
|
|
|
|
record:
|
|
diff -ruN $(CONTRACTS_DIR) $(MUNGED_DIR) | sed 's+../contracts/++g' | sed 's+munged/++g' > $(PATCH)
|
|
|
|
clean:
|
|
git clean -fdX
|
|
touch $(PATCH)
|
|
|