Improve "make dist" remove generated doc from repo.

This commit is contained in:
Ryan Dahl 2009-10-03 22:42:03 +02:00
parent 861f28f37a
commit bf0d278a45
8 changed files with 124 additions and 6469 deletions

3
.gitignore vendored
View File

@ -3,5 +3,8 @@ build
tags tags
.lock-wscript .lock-wscript
*.pyc *.pyc
doc/api.xml
doc/api.html
doc/node.1
node node
node_g node_g

View File

@ -40,26 +40,34 @@ doc/api.xml: doc/api.txt
asciidoc -b docbook -d manpage -o doc/api.xml doc/api.txt asciidoc -b docbook -d manpage -o doc/api.xml doc/api.txt
doc/node.1: doc/api.xml doc/node.1: doc/api.xml
xsltproc --output doc/node.1 \ xsltproc --output doc/node.1 --nonet doc/manpage.xsl doc/api.xml
--nonet /etc/asciidoc/docbook-xsl/manpage.xsl \
doc/api.xml
website-upload: doc website-upload: doc
scp doc/* linode:~/tinyclouds/node/ scp doc/* linode:~/tinyclouds/node/
clean: clean:
@-rm doc/node.1 doc/api.xml doc/api.html
@tools/waf-light clean @tools/waf-light clean
distclean: distclean:
@tools/waf-light distclean @tools/waf-light distclean
@-rm -rf _build_
@-rm -f Makefile
@-rm -f *.pyc @-rm -f *.pyc
check: check:
@tools/waf-light check @tools/waf-light check
dist: VERSION=$(shell git-describe)
@tools/waf-light dist TARNAME=node-$(VERSION)
dist: doc/node.1 doc/api.html
git-archive --prefix=$(TARNAME)/ HEAD > $(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 .PHONY: benchmark clean dist distclean check uninstall install all test test-all website-upload

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

61
doc/common.xsl Normal file
View File

@ -0,0 +1,61 @@
<!--
Inlcuded in xhtml.xsl, xhtml.chunked.xsl, htmlhelp.xsl.
Contains common XSL stylesheets parameters.
Output documents styled by docbook.css.
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:param name="html.stylesheet" select="'./docbook-xsl.css'"/>
<xsl:param name="htmlhelp.chm" select="'htmlhelp.chm'"/>
<xsl:param name="htmlhelp.hhc.section.depth" select="5"/>
<xsl:param name="suppress.navigation" select="0"/>
<xsl:param name="navig.graphics.extension" select="'.png'"/>
<xsl:param name="navig.graphics" select="0"/>
<xsl:param name="navig.graphics.path">./images/icons/</xsl:param>
<xsl:param name="navig.showtitles">0</xsl:param>
<xsl:param name="shade.verbatim" select="0"/>
<xsl:attribute-set name="shade.verbatim.style">
<xsl:attribute name="border">0</xsl:attribute>
<xsl:attribute name="bgcolor">#E0E0E0</xsl:attribute>
</xsl:attribute-set>
<xsl:param name="admon.graphics" select="1"/>
<xsl:param name="admon.graphics.path">./images/icons/</xsl:param>
<xsl:param name="admon.graphics.extension" select="'.png'"/>
<xsl:param name="admon.style">
<xsl:text>margin-left: 0; margin-right: 10%;</xsl:text>
</xsl:param>
<xsl:param name="admon.textlabel" select="1"/>
<xsl:param name="callout.defaultcolumn" select="'60'"/>
<xsl:param name="callout.graphics.extension" select="'.png'"/>
<xsl:param name="callout.graphics" select="'1'"/>
<xsl:param name="callout.graphics.number.limit" select="'10'"/>
<xsl:param name="callout.graphics.path" select="'./images/icons/callouts/'"/>
<xsl:param name="callout.list.table" select="'1'"/>
<xsl:param name="base.dir" select="'./xhtml/'"/>
<xsl:param name="chunk.first.sections" select="0"/>
<xsl:param name="chunk.quietly" select="0"/>
<xsl:param name="chunk.section.depth" select="1"/>
<xsl:param name="chunk.toc" select="''"/>
<xsl:param name="chunk.tocs.and.lots" select="0"/>
<xsl:param name="html.cellpadding" select="'4px'"/>
<xsl:param name="html.cellspacing" select="''"/>
<xsl:param name="table.borders.with.css" select="1"/>
<xsl:param name="table.cell.border.color" select="''"/>
<xsl:param name="table.cell.border.style" select="'solid'"/>
<xsl:param name="table.cell.border.thickness" select="'1px'"/>
<xsl:param name="table.footnote.number.format" select="'a'"/>
<xsl:param name="table.footnote.number.symbols" select="''"/>
<xsl:param name="table.frame.border.color" select="'#527bbd'"/>
<xsl:param name="table.frame.border.style" select="'solid'"/>
<xsl:param name="table.frame.border.thickness" select="'2px'"/>
<xsl:param name="tablecolumns.extension" select="'1'"/>
</xsl:stylesheet>

28
doc/manpage.xsl Normal file
View File

@ -0,0 +1,28 @@
<!--
Generates single roff manpage document from DocBook XML source using DocBook
XSL stylesheets.
NOTE: The URL reference to the current DocBook XSL stylesheets is
rewritten to point to the copy on the local disk drive by the XML catalog
rewrite directives so it doesn't need to go out to the Internet for the
stylesheets. This means you don't need to edit the <xsl:import> elements on
a machine by machine basis.
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"/>
<xsl:import href="common.xsl"/>
<!-- Only render the link text -->
<xsl:template match="ulink">
<xsl:variable name="content">
<xsl:apply-templates/>
</xsl:variable>
<xsl:value-of select="$content"/>
</xsl:template>
<!-- Don't automatically generate the REFERENCES section -->
<xsl:template name="format.links.list">
</xsl:template>
</xsl:stylesheet>

2044
doc/node.1

File diff suppressed because it is too large Load Diff

25
wscript
View File

@ -180,7 +180,7 @@ def build_udns(bld):
#debug.target = join(debug_dir, static_lib) #debug.target = join(debug_dir, static_lib)
bld.env_of_name('debug')["STATICLIB_UDNS"] = "udns" bld.env_of_name('debug')["STATICLIB_UDNS"] = "udns"
bld.env_of_name('debug')["LIBPATH_UDNS"] = debug_dir bld.env_of_name('debug')["LIBPATH_UDNS"] = 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 # XXX Remove this when v8 defaults x86_64 to native builds
def GuessArchitecture(): def GuessArchitecture():
@ -237,7 +237,7 @@ def build_v8(bld):
v8_debug.rule = v8rule % (v8dir_tgt, scons, "debug", arch) v8_debug.rule = v8rule % (v8dir_tgt, scons, "debug", arch)
v8_debug.target = join("deps/v8", bld.env["staticlib_PATTERN"] % "v8_g") v8_debug.target = join("deps/v8", bld.env["staticlib_PATTERN"] % "v8_g")
bld.install_files('${PREFIX}/include/node/', 'deps/v8/include/v8*'); bld.install_files('${PREFIX}/include/node/', 'deps/v8/include/v8*')
def build(bld): def build(bld):
bld.add_subdirs('deps/libeio deps/libev') bld.add_subdirs('deps/libeio deps/libev')
@ -255,7 +255,7 @@ def build(bld):
evcom.install_path = None evcom.install_path = None
if bld.env["USE_DEBUG"]: if bld.env["USE_DEBUG"]:
evcom.clone("debug") evcom.clone("debug")
bld.install_files('${PREFIX}/include/node/', 'deps/evcom/evcom.h'); bld.install_files('${PREFIX}/include/node/', 'deps/evcom/evcom.h')
### http_parser ### http_parser
http_parser = bld.new_task_gen("cc", "staticlib") http_parser = bld.new_task_gen("cc", "staticlib")
@ -338,7 +338,7 @@ def build(bld):
, 'VERSION' : VERSION , 'VERSION' : VERSION
, 'PREFIX' : program.env["PREFIX"] , 'PREFIX' : program.env["PREFIX"]
} }
return x; return x
# process file.pc.in -> file.pc # process file.pc.in -> file.pc
pkgconfig = bld.new_task_gen('subst', before="cxx") pkgconfig = bld.new_task_gen('subst', before="cxx")
@ -369,12 +369,17 @@ def build(bld):
src/object_wrap.h src/object_wrap.h
src/events.h src/events.h
src/net.h src/net.h
"""); """)
bld.install_files('${PREFIX}/share/man/man1/', 'doc/node.1');
bld.install_files('${PREFIX}/bin/', 'bin/*', chmod=0755); # 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. # 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/wafadmin/*.py')
bld.install_files('${PREFIX}/lib/node/wafadmin/Tools', 'tools/wafadmin/Tools/*.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')