Makefile: add 'discard' target, to discard changes to checked-in generated files.

This is useful to avoid conflicts when merging / rebasing / doing 'git stash pop'.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
Daira Hopwood 2020-07-05 17:12:07 +01:00
parent 9acf1b6667
commit bbb2bac1ac
1 changed files with 4 additions and 1 deletions

View File

@ -2,7 +2,7 @@
# sudo apt-get install python3-pip pandoc perl sed
# sudo pip3 install rst2html5
.PHONY: all all-zips release protocol
.PHONY: all all-zips release protocol discard
all-zips: .Makefile.uptodate
find . -name 'zip-*.rst' -o -name 'zip-*.md' |sort >.zipfilelist.new
diff .zipfilelist.current .zipfilelist.new || cp -f .zipfilelist.new .zipfilelist.current
@ -18,6 +18,9 @@ release:
protocol:
$(MAKE) -C protocol
discard:
git checkout -- '*.html' 'protocol/*.pdf'
.Makefile.uptodate: Makefile
$(MAKE) clean
touch .Makefile.uptodate