1. Stefan Saasen
  2. stash-commit-graph-reader

Commits

Stefan Saasen  committed fd4586f

Make: Add make rule to create a distribution file

  • Participants
  • Parent commits 3b8e413
  • Branches master

Comments (0)

Files changed (1)

File Makefile

View file
  • Ignore whitespace
-.phony: all clean
+.phony: all clean dist
 
 NAME="stash-commit-graph-reader"
+VERSION="0.2"
+BINARY="${NAME}-${VERSION}.tar.gz"
 
 all: 
 	ghc -Wall -Werror --make -O2 ${NAME}.hs
 	strip ${NAME}
 	upx ${NAME}
 
+dist: all
+	mkdir -p dist/${NAME}/bin
+	cp ${NAME} dist/${NAME}/bin
+	tar -C dist -czf ${BINARY} ${NAME}
+	sha1sum ${BINARY}
+
 clean:
 	rm -f ${NAME}.{hi,o}
 	rm -f ${NAME}
+	rm -rf dist
+	rm -f ${NAME}*.tar.gz