Permalink
Browse files

everything is changed. i've waited much too long to commit.

this is awful. i'm sorry for being so messy.
  • Loading branch information...
1 parent 0e9e927 commit 63a9cd389773b0d986184f5989eeceb299b55ecd @ry ry committed Apr 15, 2009
Showing with 1,759 additions and 496 deletions.
  1. +137 −0 configure
  2. +317 −0 js2c.py
  3. +218 −0 jsmin.py
  4. +153 −0 src/file.cc
  5. +8 −0 src/file.h
  6. +85 −0 src/main.js
  7. +425 −0 src/net.cc
  8. +8 −0 src/net.h
  9. +153 −143 src/node.cc
  10. +7 −0 src/node.h
  11. +0 −341 src/node_tcp.cc
  12. +0 −8 src/node_tcp.h
  13. +39 −0 src/process.cc
  14. +8 −0 src/process.h
  15. +165 −0 test/mjsunit.js
  16. +12 −0 test/test-test.js
  17. +24 −4 wscript
View
@@ -0,0 +1,137 @@
+#! /bin/sh
+
+# waf configure wrapper
+
+# Fancy colors used to beautify the output a bit.
+#
+if [ "$NOCOLOR" ] ; then
+ NORMAL=""
+ BOLD=""
+ RED=""
+ YELLOW=""
+ GREEN=""
+else
+ NORMAL='\\033[0m'
+ BOLD='\\033[01;1m'
+ RED='\\033[01;91m'
+ YELLOW='\\033[00;33m'
+ GREEN='\\033[01;92m'
+fi
+
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+EXIT_ERROR=2
+EXIT_BUG=10
+
+CUR_DIR=$PWD
+
+#possible relative path
+WORKINGDIR=`dirname $0`
+cd $WORKINGDIR
+#abs path
+WORKINGDIR=`pwd`
+cd $CUR_DIR
+
+# Checks for WAF. Honours $WAF if set. Stores path to 'waf' in $WAF.
+# Requires that $PYTHON is set.
+#
+checkWAF()
+{
+ printf "Checking for WAF\t\t\t: "
+ #installed miniwaf in sourcedir
+ if [ -z "$WAF" ] ; then
+ if [ -f "${WORKINGDIR}/waf" ] ; then
+ WAF="${WORKINGDIR}/waf"
+ if [ ! -x "$WAF" ] ; then
+ chmod +x $WAF
+ fi
+ fi
+ fi
+ if [ -z "$WAF" ] ; then
+ if [ -f "${WORKINGDIR}/waf-light" ] ; then
+ ${WORKINGDIR}/waf-light --make-waf
+ WAF="${WORKINGDIR}/waf"
+ fi
+ fi
+ #global installed waf with waf->waf.py link
+ if [ -z "$WAF" ] ; then
+ WAF=`which waf 2>/dev/null`
+ fi
+ # neither waf nor miniwaf could be found
+ if [ ! -x "$WAF" ] ; then
+ printf $RED"not found"$NORMAL"\n"
+ echo "Go to http://code.google.com/p/waf/"
+ echo "and download a waf version"
+ exit $EXIT_FAILURE
+ else
+ printf $GREEN"$WAF"$NORMAL"\n"
+ fi
+}
+
+# Generates a Makefile. Requires that $WAF is set.
+#
+generateMakefile()
+{
+ cat > Makefile << EOF
+#!/usr/bin/make -f
+# Waf Makefile wrapper
+WAF_HOME=$CUR_DIR
+
+all:
+ @$WAF build
+
+all-debug:
+ @$WAF -v build
+
+all-progress:
+ @$WAF -p build
+
+install:
+ if test -n "\$(DESTDIR)"; then \\
+ $WAF install --yes --destdir="\$(DESTDIR)" --prefix="$PREFIX"; \\
+ else \\
+ $WAF install --yes --prefix="$PREFIX"; \\
+ fi;
+
+uninstall:
+ @if test -n "\$(DESTDIR)"; then \\
+ $WAF uninstall --destdir="\$(DESTDIR)" --prefix="$PREFIX"; \\
+ else \\
+ $WAF uninstall --prefix="$PREFIX"; \\
+ fi;
+
+clean:
+ @$WAF clean
+
+distclean:
+ @$WAF distclean
+ @-rm -rf _build_
+ @-rm -f Makefile
+
+check:
+ @$WAF check
+
+dist:
+ @$WAF dist
+
+.PHONY: clean dist distclean check uninstall install all
+
+EOF
+}
+
+checkWAF
+
+PREFIX=/usr/local
+case $1 in
+ --prefix)
+ PREFIX=$2
+ ;;
+esac
+
+export PREFIX
+generateMakefile
+
+
+"${WAF}" configure --prefix "${PREFIX}"
+
+exit $?
Oops, something went wrong.

0 comments on commit 63a9cd3

Please sign in to comment.