Browse Source

Merge pull request #2166 from svaarala/remove-check-setup

Remove out-of-date checksetup Makefile target
pull/2167/head
Sami Vaarala 5 years ago
committed by GitHub
parent
commit
06846a6b17
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 43
      Makefile
  2. 1
      README.md
  3. 128
      util/check_setup.sh

43
Makefile

@ -213,17 +213,12 @@ MAND_BASE64 = dyA9IDgwOyBoID0gNDA7IGl0ZXIgPSAxMDA7IGZvciAoaSA9IDA7IGkgLSBoOyBpIC
RUNTESTSOPTS = --prep-test-path util/prep_test.py --minify-uglifyjs2 UglifyJS2/bin/uglifyjs --util-include-path tests/ecmascript --known-issues doc/testcase-known-issues.yaml
# Compile 'duk' only by default
.PHONY: all
all: checksetup duk
# Check setup and warn about missing tools, libraries, etc.
.PHONY: checksetup
checksetup:
@util/check_setup.sh
.PHONY: all
all: duk
# Clean targets: 'cleanall' also deletes downloaded third party packages
# which we don't want to delete by default with 'clean'.
.PHONY: clean
.PHONY: clean
clean:
@rm -f *.gcda
@rm -f *.su
@ -605,7 +600,7 @@ issuecount:
@echo "TODO: `grep TODO: src-input/*.c src-input/*.h src-input/*.in | wc -l | tr -d ' '`"
@echo "NOTE: `grep NOTE: src-input/*.c src-input/*.h src-input/*.in | wc -l | tr -d ' '`"
@echo "SCANBUILD: `grep SCANBUILD: src-input/*.c src-input/*.h src-input/*.in | wc -l | tr -d ' '`"
cloc: dist cloc-1.60.pl
cloc: dist cloc-1.60.pl
@echo "CLOC report on combined duktape.c source file"
@perl cloc-1.60.pl --quiet dist/src/duktape.c
.PHONY: gccpredefs
@ -637,16 +632,16 @@ releasetest: configuretest xmldoctest closuretest bluebirdtest luajstest jsinter
@echo "### Release tests successful!" # These tests now have output checks.
# Runtests-based ECMAScript and API tests.
.PHONY: runtestsdeps
runtestsdeps: runtests/node_modules UglifyJS2
.PHONY: runtestsdeps
runtestsdeps: runtests/node_modules UglifyJS2
runtests/node_modules:
@echo "Installing required NodeJS modules for runtests"
@cd runtests; npm install
.PHONY: ecmatest
.PHONY: ecmatest
ecmatest: runtestsdeps duk
@echo "### ecmatest"
"$(NODE)" runtests/runtests.js $(RUNTESTSOPTS) --run-duk --cmd-duk=$(shell pwd)/duk --num-threads 4 --log-file=/tmp/duk-test.log tests/ecmascript/
.PHONY: qecmatest
.PHONY: qecmatest
qecmatest: ecmatest
.PHONY: ecmatest-comparison
ecmatest-comparison: runtestsdeps duk
@ -654,7 +649,7 @@ ecmatest-comparison: runtestsdeps duk
"$(NODE)" runtests/runtests.js $(RUNTESTSOPTS) --run-duk --cmd-duk=$(shell pwd)/duk --report-diff-to-other --run-nodejs --run-rhino --num-threads 4 --log-file=/tmp/duk-test.log tests/ecmascript/
.PHONY: apiprep
apiprep: runtestsdeps libduktape.so.1.0.0
.PHONY: apitest
.PHONY: apitest
apitest: apiprep
@echo "### apitest"
"$(NODE)" runtests/runtests.js $(RUNTESTSOPTS) --num-threads 1 --log-file=/tmp/duk-api-test.log tests/api/
@ -675,7 +670,7 @@ dukwebtest: dukweb.js jquery-1.11.2.js
# Third party tests.
.PHONY: underscoretest
underscoretest: underscore duk
underscoretest: underscore duk
@echo "### underscoretest"
@echo "Run underscore tests with underscore-test-shim.js"
-util/underscore_test.sh ./duk underscore/test/arrays.js
@ -686,7 +681,7 @@ underscoretest: underscore duk
# speed test disabled, requires JSLitmus
#-util/underscore_test.sh ./duk underscore/test/speed.js
-util/underscore_test.sh ./duk underscore/test/utility.js
.PHONY: regfuzztest
.PHONY: regfuzztest
regfuzztest: regfuzz-0.1.tar.gz duk
@echo "### regfuzztest"
# Spidermonkey test is pretty close, just lacks 'arguments'
@ -981,13 +976,13 @@ references/ECMA-262\ 5.1\ edition\ June\ 2011.pdf:
references/ECMA-262.pdf:
$(WGET) "http://www.ecma-international.org/ecma-262/6.0/ECMA-262.pdf" -O "$@"
.PHONY: refs
refs: references/ECMA-262\ 5th\ edition\ December\ 2009.pdf \
refs: references/ECMA-262\ 5th\ edition\ December\ 2009.pdf \
references/ECMA-262\ 5.1\ edition\ June\ 2011.pdf \
references/ECMA-262.pdf
# Documentation.
.PHONY: doc
doc: $(patsubst %.txt,%.html,$(wildcard doc/*.txt))
.PHONY: doc
doc: $(patsubst %.txt,%.html,$(wildcard doc/*.txt))
doc/%.html: doc/%.txt
rst2html $< $@
@ -995,8 +990,8 @@ doc/%.html: doc/%.txt
dist:
@make codepolicycheck
$(PYTHON) util/dist.py
.PHONY: dist-src
dist-src: dist
.PHONY: dist-src
dist-src: dist
rm -rf duktape-$(DUK_VERSION_FORMATTED)
rm -rf duktape-$(DUK_VERSION_FORMATTED).tar*
mkdir duktape-$(DUK_VERSION_FORMATTED)
@ -1009,7 +1004,7 @@ dist-src: dist
rm -rf duktape-$(DUK_VERSION_FORMATTED)
# ISO target is useful with some system emulators with no network access.
.PHONY: dist-iso
dist-iso: dist-src
dist-iso: dist-src
mkisofs -input-charset utf-8 -o duktape-$(DUK_VERSION_FORMATTED)-$(BUILD_DATETIME)-$(GIT_INFO).iso duktape-$(DUK_VERSION_FORMATTED)-$(BUILD_DATETIME)-$(GIT_INFO).tar.gz
# Website targets.
@ -1024,8 +1019,8 @@ site: duktape-releases dukweb.js jquery-1.11.2.js lz-string
for i in site/*.html; do echo "tidy checking $$i"; tidy -q -e -xml -utf8 $$i; done
@rm -rf /tmp/site/
cp -r site /tmp/ # useful for quick preview
.PHONY: dist-site
dist-site: tidy-site site
.PHONY: dist-site
dist-site: tidy-site site
# When doing a final dist build, run html tidy
# Also pull binaries up-to-date
cd duktape-releases/; git pull --rebase # get binaries up-to-date

1
README.md

@ -83,6 +83,7 @@ For example, to enable fastint support (example for Linux):
You can also clone this repository, make modifications, and build a source
distributable on Linux, macOS, and Windows using `python util/dist.py`.
You'll need Python 2 and Python YAML binding.
Getting started: modifying and rebuilding the distributable
-----------------------------------------------------------

128
util/check_setup.sh

@ -1,128 +0,0 @@
#!/bin/sh
#
# Check prerequisites for using the Duktape makefile. Exit with an error
# and a useful error message for missing prerequisites.
#
ERRORS=0
WARNINGS=0
uname -a | grep -ni linux >/dev/null
RET=$?
if [ "x$RET" != "x0" ]; then
echo "*** Based on uname, you're not running on Linux. Duktape developer"
echo " makefile is intended for Linux only; YMMV on other platforms."
echo ""
sleep 1
fi
python -c 'import yaml' 2>/dev/null
if [ $? != 0 ]; then
echo "*** Missing Python yaml:"
echo " $ sudo apt-get install python-yaml"
echo ""
ERRORS=1
fi
NODEJS_VERSION=`nodejs -v 2>/dev/null`
if [ $? != 0 ]; then
echo "*** Missing NodeJS:"
echo " $ sudo apt-get install nodejs nodejs-legacy npm # may also be 'node'"
echo ""
ERRORS=1
fi
#echo "NodeJS version: $NODEJS_VERSION"
# some tools like uglifyjs require 'node', not 'nodejs'
NODE_VERSION=`node -v 2>/dev/null`
if [ $? != 0 ]; then
echo "*** Missing NodeJS legacy ('node' command):"
echo " $ sudo apt-get install nodejs-legacy"
echo ""
ERRORS=1
fi
#echo "NodeJS 'node' version: $NODE_VERSION"
GIT_VERSION=`git --version 2>/dev/null`
if [ $? != 0 ]; then
echo "*** Missing git:"
echo " $ sudo apt-get install git"
echo ""
ERRORS=1
fi
#echo "Git version: $GIT_VERSION"
UNZIP_VERSION=`unzip -v 2>/dev/null`
if [ $? != 0 ]; then
echo "*** Missing unzip:"
echo " $ sudo apt-get install unzip"
echo ""
ERRORS=1
fi
#echo "UNZIP_VERSION: $UNZIP_VERSION"
PERL_VERSION=`perl -version 2>/dev/null`
if [ $? != 0 ]; then
echo "*** Missing perl:"
echo " $ sudo apt-get install perl"
echo ""
ERRORS=1
fi
#echo "PERL_VERSION: $PERL_VERSION"
JAVA_VERSION=`java -version 2>&1`
if [ $? != 0 ]; then
echo "*** Missing java:"
echo " $ sudo apt-get install openjdk-7-jre"
echo ""
ERRORS=1
fi
#echo "JAVA_VERSION: $JAVA_VERSION"
CLANG_VERSION=`clang -v 2>&1`
if [ $? != 0 ]; then
echo "*** Missing clang (affects emscripten tests):"
echo " $ sudo apt-get install clang"
echo ""
WARNINGS=1
fi
LLVM_LINK_VERSION=`llvm-link --version 2>&1` # exit code will be 1
which llvm-link 2>/dev/null >/dev/null
if [ $? != 0 ]; then
echo "*** Missing llvm (affects emscripten tests):"
echo " $ sudo apt-get install llvm"
echo ""
WARNINGS=1
fi
python -c 'from bs4 import BeautifulSoup, Tag' 2>/dev/null
if [ $? != 0 ]; then
echo "*** Missing BeautifulSoup (affects website build)"
echo " $ sudo apt-get install python-bs4"
echo ""
WARNINGS=1
fi
SOURCE_HIGHLIGHT_VERSION=`source-highlight --version`
if [ $? != 0 ]; then
echo "*** Missing source-highlight (affects website build)"
echo " $ sudo apt-get install source-highlight"
echo ""
WARNINGS=1
fi
if [ "x$ERRORS" != "x0" ]; then
echo "*** Errors found in system setup, see error messages above!"
exit 1
fi
if [ "x$WARNINGS" != "x0" ]; then
echo "*** Warnings found in system setup, see warnings above"
exit 0
fi
# 'tidy' is intentionally not checked as it only relates to website development
# and is not mandatory to website build.
exit 0
Loading…
Cancel
Save