From 861f28f37a2db115f598fc61553ac6e71853c495 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Sat, 3 Oct 2009 21:46:59 +0200 Subject: [PATCH] Don't unnecessarily output the makefile from the configure script. --- .gitignore | 1 - Makefile | 65 +++++++++++++++++++++++++ configure | 139 ----------------------------------------------------- 3 files changed, 65 insertions(+), 140 deletions(-) create mode 100644 Makefile diff --git a/.gitignore b/.gitignore index 8cbcd2177d..b9360130ef 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,6 @@ build .waf* tags .lock-wscript -Makefile *.pyc node node_g diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000..7e8c3be696 --- /dev/null +++ b/Makefile @@ -0,0 +1,65 @@ +#!/usr/bin/make -f + +all: + @tools/waf-light build + +all-debug: + @tools/waf-light -v build + +all-progress: + @tools/waf-light -p build + +install: + @tools/waf-light install + +uninstall: + @tools/waf-light uninstall + +test: all + python tools/test.py --mode=release + +test-all: all + python tools/test.py --mode=debug,release + +test-debug: all + python tools/test.py --mode=debug + +benchmark: all + build/default/node benchmark/run.js + +doc: doc/node.1 doc/api.html doc/index.html + +doc/api.html: doc/api.txt + asciidoc --unsafe \ + -a theme=pipe \ + -a toc \ + -a linkcss \ + -o doc/api.html doc/api.txt + +doc/api.xml: doc/api.txt + asciidoc -b docbook -d manpage -o doc/api.xml doc/api.txt + +doc/node.1: doc/api.xml + xsltproc --output doc/node.1 \ + --nonet /etc/asciidoc/docbook-xsl/manpage.xsl \ + doc/api.xml + +website-upload: doc + scp doc/* linode:~/tinyclouds/node/ + +clean: + @tools/waf-light clean + +distclean: + @tools/waf-light distclean + @-rm -rf _build_ + @-rm -f Makefile + @-rm -f *.pyc + +check: + @tools/waf-light check + +dist: + @tools/waf-light dist + +.PHONY: benchmark clean dist distclean check uninstall install all test test-all website-upload diff --git a/configure b/configure index 2bf7c21af3..2e4b18cf11 100755 --- a/configure +++ b/configure @@ -1,20 +1,5 @@ #! /bin/sh -# waf configure wrapper - -# Fancy colors used to beautify the output a bit. -# -NORMAL="" -BOLD="" -RED="" -YELLOW="" -GREEN="" - -EXIT_SUCCESS=0 -EXIT_FAILURE=1 -EXIT_ERROR=2 -EXIT_BUG=10 - CUR_DIR=$PWD #possible relative path @@ -26,130 +11,6 @@ cd $CUR_DIR WAF="${WORKINGDIR}/tools/waf-light" -# 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 --destdir="\$(DESTDIR)" ; \\ - else \\ - $WAF install ; \\ - fi; - -uninstall: - @if test -n "\$(DESTDIR)"; then \\ - $WAF uninstall --destdir="\$(DESTDIR)" ; \\ - else \\ - $WAF uninstall ; \\ - fi; - -test: all - python tools/test.py --mode=release - -test-all: all - python tools/test.py --mode=debug,release - -test-debug: all - python tools/test.py --mode=debug - -benchmark: all - build/default/node benchmark/run.js - -doc: doc/node.1 doc/api.html doc/index.html - -doc/api.html: doc/api.txt - asciidoc --unsafe \\ - -a theme=pipe \\ - -a toc \\ - -a linkcss \\ - -o doc/api.html doc/api.txt - -doc/api.xml: doc/api.txt - asciidoc -b docbook -d manpage -o doc/api.xml doc/api.txt - -doc/node.1: doc/api.xml - xsltproc --output doc/node.1 \\ - --nonet /etc/asciidoc/docbook-xsl/manpage.xsl \\ - doc/api.xml - -website-upload: doc - scp doc/* linode:~/tinyclouds/node/ - -clean: - @$WAF clean - -distclean: - @$WAF distclean - @-rm -rf _build_ - @-rm -f Makefile - @-rm -f *.pyc - -check: - @$WAF check - -dist: - @$WAF dist - -.PHONY: benchmark clean dist distclean check uninstall install all test test-all website-upload - -EOF -} - -checkWAF - -generateMakefile - "${WAF}" configure $* exit $?