Skip to content

Commit

Permalink
Add Makefile to build dist
Browse files Browse the repository at this point in the history
  • Loading branch information
jclark committed Jun 30, 2019
1 parent 2c6c73d commit 667d8b0
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions lang/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# This is intended to be run on POSIX with GNU Make
VERSION:=$(shell sed -n -e '/^<h1[ >]/s/.* \(20[12][0-9]R[0-9][0-9]*\)<.*/\1/p' spec.html)

DISTDIR=ballerina-lang-spec-$(VERSION)
ZIPFILE=$(DISTDIR).zip
DISTFILES=spec.html lib/versions.json \
lib/array.bal lib/decimal.bal lib/error.bal lib/float.bal lib/future.bal \
lib/int.bal lib/map.bal lib/object.bal lib/stream.bal lib/string.bal \
lib/table.bal lib/typedesc.bal lib/value.bal lib/xml.bal

$(ZIPFILE): $(DISTFILES)
test -d $(DISTDIR) || mkdir $(DISTDIR)
tar cf - $(DISTFILES) | (cd $(DISTDIR); tar xf -)
zip $(ZIPFILE) $(addprefix $(DISTDIR)/,$(DISTFILES))

clean: FORCE
-rm -fr $(DISTDIR) $(ZIPFILE)

FORCE:

0 comments on commit 667d8b0

Please sign in to comment.