You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

72 lines
2.1 KiB

#
# Makefile for creating distributables and Duktape website
#
# When creating actual distributables, always clean first.
#
# Scrape version from the public header; convert from e.g. 10203 -> '1.2.3'
DUK_VERSION=$(shell cat src/duktape.h | grep define | grep DUK_VERSION | tr -s ' ' ' ' | cut -d ' ' -f 3)
DUK_MAJOR=$(shell echo "$(DUK_VERSION) / 10000" | bc)
DUK_MINOR=$(shell echo "$(DUK_VERSION) % 10000 / 100" | bc)
DUK_PATCH=$(shell echo "$(DUK_VERSION) % 100" | bc)
VERSION=$(DUK_MAJOR).$(DUK_MINOR).$(DUK_PATCH)
DISTSRCSEP = dist/src-separate
DISTSRCCOM = dist/src
DISTCMD = dist/examples/cmdline
clean:
-@rm -rf dist/
-@rm -rf full/
-@rm -rf site/
-@rm -rf duktape-$(VERSION)/
-@rm -f duktape-$(VERSION).tar*
-@rm -f duktape-$(VERSION).iso
-@rm -rf duktape-full-$(VERSION)/
-@rm -f duktape-full-$(VERSION).tar*
-@rm -rf duktape-site-$(VERSION)/
-@rm -f duktape-site-$(VERSION).tar*
# Source distributable for end users
dist:
sh make_dist.sh
dist-src: dist
rm -rf duktape-$(VERSION)
rm -rf duktape-$(VERSION).tar*
mkdir duktape-$(VERSION)
cp -r dist/* duktape-$(VERSION)/
tar cvfj duktape-$(VERSION).tar.bz2 duktape-$(VERSION)/
tar cvf duktape-$(VERSION).tar duktape-$(VERSION)/
xz -z -e -9 duktape-$(VERSION).tar
mkisofs -o duktape-$(VERSION).iso duktape-$(VERSION).tar.bz2
# Full distributable
full:
sh make_full.sh
dist-full: full
rm -rf duktape-full-$(VERSION)
rm -rf duktape-full-$(VERSION).tar*
mkdir duktape-full-$(VERSION)
cp -r full/* duktape-full-$(VERSION)/
tar cvfj duktape-full-$(VERSION).tar.bz2 duktape-full-$(VERSION)/
tar cvf duktape-full-$(VERSION).tar duktape-full-$(VERSION)/
xz -z -e -9 duktape-full-$(VERSION).tar
mkisofs -o duktape-full-$(VERSION).iso duktape-full-$(VERSION).tar.bz2
# Website
site:
rm -rf site
mkdir site
cd website/; python buildsite.py ../site/
-@rm -rf /tmp/site/
cp -r site /tmp/ # FIXME
dist-site: site
rm -rf duktape-site-$(VERSION)
rm -rf duktape-site-$(VERSION).tar*
mkdir duktape-site-$(VERSION)
cp -r site/* duktape-site-$(VERSION)/
tar cvf duktape-site-$(VERSION).tar duktape-site-$(VERSION)/
xz -z -e -9 duktape-site-$(VERSION).tar