<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>doc/common.xsl</filename>
    </added>
    <added>
      <filename>doc/manpage.xsl</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -3,5 +3,8 @@ build
 tags
 .lock-wscript
 *.pyc
+doc/api.xml
+doc/api.html
+doc/node.1
 node
 node_g</diff>
      <filename>.gitignore</filename>
    </modified>
    <modified>
      <diff>@@ -14,10 +14,10 @@ install:
 
 uninstall:
 	@tools/waf-light uninstall
- 
+
 test: all
 	python tools/test.py --mode=release
-  
+
 test-all: all
 	python tools/test.py --mode=debug,release
 
@@ -40,26 +40,34 @@ 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
+	xsltproc --output doc/node.1 --nonet doc/manpage.xsl doc/api.xml
 
 website-upload: doc
 	scp doc/* linode:~/tinyclouds/node/
 
 clean:
+	@-rm doc/node.1 doc/api.xml doc/api.html
 	@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
+VERSION=$(shell git-describe)
+TARNAME=node-$(VERSION)
+
+dist: doc/node.1 doc/api.html
+	git-archive --prefix=$(TARNAME)/ HEAD &gt; $(TARNAME).tar
+	mkdir -p $(TARNAME)/doc
+	cp doc/node.1 $(TARNAME)/doc/node.1
+	cp doc/api.html $(TARNAME)/doc/api.html
+	tar rf $(TARNAME).tar   \
+		$(TARNAME)/doc/node.1 \
+		$(TARNAME)/doc/api.html
+	rm -r $(TARNAME)
+	gzip -f -9 $(TARNAME).tar
 
 .PHONY: benchmark clean dist distclean check uninstall install all test test-all website-upload</diff>
      <filename>Makefile</filename>
    </modified>
    <modified>
      <diff>@@ -180,7 +180,7 @@ def build_udns(bld):
     #debug.target = join(debug_dir, static_lib)
     bld.env_of_name('debug')[&quot;STATICLIB_UDNS&quot;] = &quot;udns&quot;
     bld.env_of_name('debug')[&quot;LIBPATH_UDNS&quot;] = debug_dir
-  bld.install_files('${PREFIX}/include/node/', 'deps/udns/udns.h');
+  bld.install_files('${PREFIX}/include/node/', 'deps/udns/udns.h')
 
 # XXX Remove this when v8 defaults x86_64 to native builds
 def GuessArchitecture():
@@ -237,7 +237,7 @@ def build_v8(bld):
     v8_debug.rule = v8rule % (v8dir_tgt, scons, &quot;debug&quot;, arch)
     v8_debug.target = join(&quot;deps/v8&quot;, bld.env[&quot;staticlib_PATTERN&quot;] % &quot;v8_g&quot;)
 
-  bld.install_files('${PREFIX}/include/node/', 'deps/v8/include/v8*');
+  bld.install_files('${PREFIX}/include/node/', 'deps/v8/include/v8*')
 
 def build(bld):
   bld.add_subdirs('deps/libeio deps/libev')
@@ -255,7 +255,7 @@ def build(bld):
   evcom.install_path = None
   if bld.env[&quot;USE_DEBUG&quot;]:
     evcom.clone(&quot;debug&quot;)
-  bld.install_files('${PREFIX}/include/node/', 'deps/evcom/evcom.h');
+  bld.install_files('${PREFIX}/include/node/', 'deps/evcom/evcom.h')
 
   ### http_parser
   http_parser = bld.new_task_gen(&quot;cc&quot;, &quot;staticlib&quot;)
@@ -338,7 +338,7 @@ def build(bld):
         , 'VERSION'   : VERSION
         , 'PREFIX'    : program.env[&quot;PREFIX&quot;]
         }
-    return x;
+    return x
 
   # process file.pc.in -&gt; file.pc
   pkgconfig = bld.new_task_gen('subst', before=&quot;cxx&quot;)
@@ -369,12 +369,17 @@ def build(bld):
     src/object_wrap.h
     src/events.h
     src/net.h
-  &quot;&quot;&quot;);
-  bld.install_files('${PREFIX}/share/man/man1/', 'doc/node.1');
-  bld.install_files('${PREFIX}/bin/', 'bin/*', chmod=0755);
+  &quot;&quot;&quot;)
+
+  # Only install the man page if it exists. 
+  # Do 'make doc install' to build and install it.
+  if os.path.exists('doc/node.1'):
+    bld.install_files('${PREFIX}/share/man/man1/', 'doc/node.1')
+
+  bld.install_files('${PREFIX}/bin/', 'bin/*', chmod=0755)
 
   # Why am I using two lines? Because WAF SUCKS.
-  bld.install_files('${PREFIX}/lib/node/wafadmin', 'tools/wafadmin/*.py');
-  bld.install_files('${PREFIX}/lib/node/wafadmin/Tools', 'tools/wafadmin/Tools/*.py');
+  bld.install_files('${PREFIX}/lib/node/wafadmin', 'tools/wafadmin/*.py')
+  bld.install_files('${PREFIX}/lib/node/wafadmin/Tools', 'tools/wafadmin/Tools/*.py')
 
-  bld.install_files('${PREFIX}/lib/node/libraries/', 'lib/*.js');
+  bld.install_files('${PREFIX}/lib/node/libraries/', 'lib/*.js')</diff>
      <filename>wscript</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>doc/api.html</filename>
    </removed>
    <removed>
      <filename>doc/api.xml</filename>
    </removed>
    <removed>
      <filename>doc/node.1</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>861f28f37a2db115f598fc61553ac6e71853c495</id>
    </parent>
  </parents>
  <author>
    <name>Ryan Dahl</name>
    <email>ry@tinyclouds.org</email>
  </author>
  <url>http://github.com/ry/node/commit/bf0d278a4501b03e74d9e02309d667af2182c2a3</url>
  <id>bf0d278a4501b03e74d9e02309d667af2182c2a3</id>
  <committed-date>2009-10-03T13:48:33-07:00</committed-date>
  <authored-date>2009-10-03T13:42:03-07:00</authored-date>
  <message>Improve &quot;make dist&quot; remove generated doc from repo.</message>
  <tree>8d0aeae2f99060aea5566a310fbaa535bc5d98bf</tree>
  <committer>
    <name>Ryan Dahl</name>
    <email>ry@tinyclouds.org</email>
  </committer>
</commit>
