Makefile 648 Bytes
Newer Older
1 2
# Do things in edx-platform

Ned Batchelder committed
3 4 5
# Careful with mktemp syntax: it has to work on Mac and Ubuntu, which have differences.
PRIVATE_FILES := $(shell mktemp -u /tmp/private_files.XXXXXX)

6 7
clean:
	# Remove all the git-ignored stuff, but save and restore things marked
Ned Batchelder committed
8 9
	# by start-noclean/end-noclean. Include Makefile in the tarball so that
	# there's always at least one file even if there are no private files.
10
	sed -n -e '/start-noclean/,/end-noclean/p' < .gitignore > /tmp/private-files
Ned Batchelder committed
11 12 13 14
	-tar cf $(PRIVATE_FILES) Makefile `git ls-files --exclude-from=/tmp/private-files --ignored --others`
	-git clean -fdX
	tar xf $(PRIVATE_FILES)
	rm $(PRIVATE_FILES)