mirror of https://github.com/svaarala/duktape.git
Sami Vaarala
11 years ago
3 changed files with 52 additions and 204 deletions
@ -1,72 +0,0 @@ |
|||
#
|
|||
# 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 |
@ -1,115 +0,0 @@ |
|||
#!/bin/sh |
|||
# |
|||
# Create full distributable. Full distributable needs the ability to make |
|||
# an end-user distribute because e.g. testcases need to be run against such |
|||
# a distributable source. This awkwardness can be removed once a public |
|||
# repo exists. |
|||
# |
|||
|
|||
FULL=`pwd`/full |
|||
|
|||
rm -rf $FULL |
|||
mkdir $FULL |
|||
mkdir $FULL/src |
|||
mkdir $FULL/doc |
|||
mkdir $FULL/licenses |
|||
mkdir $FULL/runtests |
|||
mkdir $FULL/examples |
|||
mkdir $FULL/examples/hello |
|||
mkdir $FULL/examples/cmdline |
|||
mkdir $FULL/examples/guide |
|||
mkdir $FULL/examples/coffee |
|||
mkdir $FULL/ecmascript-testcases |
|||
mkdir $FULL/api-testcases |
|||
|
|||
for i in src/*.c src/*.h src/*.py src/*.txt; do |
|||
cp --parents $i $FULL/ |
|||
done |
|||
|
|||
for i in \ |
|||
doc/rst-conventions.txt \ |
|||
doc/json.txt \ |
|||
doc/datetime.txt \ |
|||
doc/number-conversion.txt \ |
|||
doc/regexp.txt \ |
|||
doc/sorting.txt \ |
|||
doc/uri.txt \ |
|||
doc/testcases.txt \ |
|||
doc/code-issues.txt \ |
|||
doc/unicode-support.txt \ |
|||
doc/identifier-handling.txt \ |
|||
doc/function-objects.txt \ |
|||
doc/error-objects.txt \ |
|||
doc/arguments-object.txt \ |
|||
doc/memory-management.txt \ |
|||
doc/hobject-design.txt \ |
|||
doc/hobject-algorithms.txt \ |
|||
doc/hobject-enumeration.txt \ |
|||
; do |
|||
cp --parents $i $FULL/ |
|||
done |
|||
|
|||
for i in \ |
|||
licenses/murmurhash2.txt \ |
|||
; do |
|||
cp --parents $i $FULL/ |
|||
done |
|||
|
|||
for i in \ |
|||
runtests/runtests.js \ |
|||
runtests/package.json \ |
|||
runtests/api_testcase_main.c \ |
|||
; do |
|||
cp --parents $i $FULL/ |
|||
done |
|||
|
|||
for i in \ |
|||
examples/cmdline/duk_cmdline.c \ |
|||
examples/cmdline/duk_ncurses.c \ |
|||
examples/cmdline/duk_socket.c \ |
|||
examples/cmdline/duk_fileio.c \ |
|||
examples/hello/hello.c \ |
|||
examples/guide/fib.js \ |
|||
examples/guide/process.js \ |
|||
examples/guide/processlines.c \ |
|||
examples/guide/prime.js \ |
|||
examples/guide/primecheck.c \ |
|||
examples/guide/uppercase.c \ |
|||
examples/coffee/Makefile \ |
|||
examples/coffee/mandel.coffee \ |
|||
examples/coffee/hello.coffee \ |
|||
examples/coffee/globals.coffee \ |
|||
examples/Makefile.cmdline \ |
|||
examples/Makefile.example \ |
|||
; do |
|||
cp --parents $i $FULL/ |
|||
done |
|||
|
|||
for i in ecmascript-testcases/*.js; do |
|||
cp $i $FULL/ecmascript-testcases/ |
|||
done |
|||
|
|||
for i in api-testcases/*.c; do |
|||
cp $i $FULL/api-testcases/ |
|||
done |
|||
|
|||
for i in \ |
|||
misc/clang_aliasing.c \ |
|||
misc/c_overflow_test.py \ |
|||
misc/tcc_zerosign1.c \ |
|||
misc/tcc_zerosign2.c; do |
|||
cp --parents $i $FULL/ |
|||
done |
|||
|
|||
for i in \ |
|||
README.txt.dist \ |
|||
README.txt.full \ |
|||
LICENSE.txt \ |
|||
RELEASES.txt \ |
|||
Makefile \ |
|||
make_dist.sh \ |
|||
combine_src.py \ |
|||
; do |
|||
cp $i $FULL/ |
|||
done |
|||
|
Loading…
Reference in new issue