add Makefile

This commit is contained in:
Benjamin Dauvergne 2021-12-10 10:35:24 +01:00
parent 87bbc5a14b
commit af2b1c8358
1 changed files with 38 additions and 0 deletions

38
Makefile Normal file
View File

@ -0,0 +1,38 @@
VERSION= 0.1# `git describe | sed 's/^v//; s/-/./g'`
CHANGELOG_VERSION = 0.1
NAME = godo.js
all:
DIST_FILES = dist/js/godo.js dist/js/godo.min.js dist/css/godo.css dist/js/godo.js.map dist/js/godo.min.js.map
clean:
rm -rf sdist
build:
npm install
npm run build
dist: clean build
-mkdir sdist
rm -rf sdist/$(NAME)-$(VERSION)
mkdir -p sdist/$(NAME)-$(VERSION)
for i in $(DIST_FILES); do \
cp -R "$$i" sdist/$(NAME)-$(VERSION); \
done
dist-bzip2: dist
-mkdir sdist
cd sdist && tar cfj ../sdist/$(NAME)-$(VERSION).tar.bz2 $(NAME)-$(VERSION)
orig: dist-bzip2
mv sdist/$(NAME)-$(VERSION).tar.bz2 ../$(NAME)_$(CHANGELOG_VERSION).orig.tar.bz2
version:
@(echo $(VERSION))
name:
@(echo $(NAME))
fullname:
@(echo $(NAME)-$(VERSION))