* Detect flex and bison; updated the manual.
This commit is contained in:
parent
c5baaafae6
commit
c625718513
5 changed files with 45 additions and 51 deletions
|
@ -45,6 +45,8 @@ AC_LANG_POP(C++)
|
|||
AC_PATH_PROG(wget, wget)
|
||||
AC_PATH_PROG(xmllint, xmllint)
|
||||
AC_PATH_PROG(xsltproc, xsltproc)
|
||||
AC_PATH_PROG(flex, flex, false)
|
||||
AC_PATH_PROG(bison, bison, false)
|
||||
|
||||
AC_ARG_WITH(docbook-catalog, AC_HELP_STRING([--with-docbook-catalog=PATH],
|
||||
[path of the DocBook XML DTD]),
|
||||
|
|
|
@ -46,25 +46,42 @@ $ svn checkout https://svn.cs.uu.nl:12443/repos/trace/nix/trunk nix</screen>
|
|||
</para>
|
||||
|
||||
<para>
|
||||
To rebuild this manual and the man-pages you need the
|
||||
<command>xmllint</command> and <command>xsltproc</command>, which are
|
||||
part of the <literal>libxml2</literal> and <literal>libxslt</literal>
|
||||
packages, respectively. You also need the <ulink
|
||||
To build this manual and the man-pages you need the
|
||||
<command>xmllint</command> and <command>xsltproc</command>
|
||||
programs, which are part of the <literal>libxml2</literal> and
|
||||
<literal>libxslt</literal> packages, respectively. You also
|
||||
need the <ulink
|
||||
url='http://docbook.sourceforge.net/projects/xsl/'>DocBook XSL
|
||||
stylesheets</ulink> and optionally the <ulink
|
||||
url='http://www.oasis-open.org/docbook/xml/4.2/docbook-xml-4.2.zip'>
|
||||
DocBook XML 4.2 DTD</ulink>. Note that these are only required if you
|
||||
modify the manual sources or when you are building from the Subversion
|
||||
repository.
|
||||
DocBook XML 4.2 DTD</ulink>. Note that these are only required
|
||||
if you modify the manual sources or when you are building from
|
||||
the Subversion repository.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Nix uses Sleepycat's Berkeley DB, CWI's ATerm library, and SDF parser
|
||||
library. These are included in the Nix source distribution. If you
|
||||
build from the Subversion repository, you must download them yourself and
|
||||
place them in the <filename>externals/</filename> directory. See
|
||||
<filename>externals/Makefile.am</filename> for the precise URLs of these
|
||||
packages.
|
||||
To build the parser, very <emphasis>recent</emphasis> versions
|
||||
of Bison and Flex are required. (This is because Nix needs GLR
|
||||
support in Bison and reentrancy support in Flex.) For Bison,
|
||||
you need version 1.875c or higher (1.875 does
|
||||
<emphasis>not</emphasis> work), which can be obtained from the
|
||||
<ulink url='ftp://alpha.gnu.org/pub/gnu/bison'>GNU FTP
|
||||
server</ulink>. For Flex, you need version 2.5.31, which is
|
||||
available on <ulink
|
||||
url='http://lex.sourceforge.net/'>SourceForge</ulink>. Slightly
|
||||
older versions may also work, but ancient versions like the
|
||||
ubiquitous 2.5.4a won't. Note that these are only required if
|
||||
you modify the parser or when you are building from the
|
||||
Subversion repository.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Nix uses Sleepycat's Berkeley DB and CWI's ATerm library. These
|
||||
are included in the Nix source distribution. If you build from
|
||||
the Subversion repository, you must download them yourself and
|
||||
place them in the <filename>externals/</filename> directory.
|
||||
See <filename>externals/Makefile.am</filename> for the precise
|
||||
URLs of these packages.
|
||||
</para>
|
||||
</sect1>
|
||||
|
||||
|
|
|
@ -174,8 +174,8 @@ $ nix-env -if pkgs/system/i686-linux.nix pan</screen>
|
|||
|
||||
<screen>
|
||||
$ nix-pull
|
||||
http://catamaran.labs.cs.uu.nl/~eelco/nix/nixpkgs-<replaceable>version</replaceable>/
|
||||
obtaining list of Nix archives at http://catamaran.labs.cs.uu.nl/~eelco/nix/nixpkgs-<replaceable>version</replaceable>...
|
||||
http://catamaran.labs.cs.uu.nl/dist/nix/nixpkgs-<replaceable>version</replaceable>/
|
||||
obtaining list of Nix archives at http://catamaran.labs.cs.uu.nl/dist/nix/nixpkgs-<replaceable>version</replaceable>...
|
||||
...</screen>
|
||||
|
||||
<para>
|
||||
|
|
35
externals/Makefile.am
vendored
35
externals/Makefile.am
vendored
|
@ -56,37 +56,10 @@ build-aterm: have-aterm
|
|||
touch build-aterm
|
||||
|
||||
|
||||
# SDF bundle
|
||||
all: build-db build-aterm
|
||||
|
||||
SDF2 = sdf2-bundle-1.6
|
||||
|
||||
$(SDF2).tar.gz:
|
||||
@echo "Nix requires the SDF2 bundle to build."
|
||||
@echo "Please download version 1.6 from"
|
||||
@echo " ftp://ftp.stratego-language.org/pub/stratego/sdf2/sdf2-bundle-1.6.tar.gz"
|
||||
@echo "and place it in the externals/ directory."
|
||||
false
|
||||
|
||||
$(SDF2): $(SDF2).tar.gz
|
||||
gunzip < $(SDF2).tar.gz | tar xvf -
|
||||
|
||||
have-sdf2:
|
||||
$(MAKE) $(SDF2)
|
||||
touch have-sdf2
|
||||
|
||||
build-sdf2: have-sdf2
|
||||
(pfx=`pwd` && \
|
||||
cd $(SDF2) && \
|
||||
CC="$(CC) -pg" ./configure --prefix=$$pfx/inst --with-cflags="$(CFLAGS)" && \
|
||||
make && \
|
||||
make install)
|
||||
touch build-sdf2
|
||||
|
||||
|
||||
all: build-db build-aterm build-sdf2
|
||||
|
||||
EXTRA_DIST = $(DB).tar.gz $(ATERM).tar.gz $(SDF2).tar.gz
|
||||
EXTRA_DIST = $(DB).tar.gz $(ATERM).tar.gz
|
||||
|
||||
ext-clean:
|
||||
$(RM) -f have-db build-db have-aterm build-aterm have-sdf2 build-sdf2
|
||||
$(RM) -rf $(DB) $(ATERM) $(SDF2)
|
||||
$(RM) -f have-db build-db have-aterm build-aterm
|
||||
$(RM) -rf $(DB) $(ATERM)
|
||||
|
|
|
@ -12,11 +12,13 @@ AM_CFLAGS = \
|
|||
|
||||
# Parser generation.
|
||||
|
||||
parser.o: parser-tab.h lexer-tab.h
|
||||
|
||||
parser-tab.c parser-tab.h: parser.y
|
||||
../grammartest/inst/bin/bison -v -o parser-tab.c parser.y -d
|
||||
$(bison) -v -o parser-tab.c parser.y -d
|
||||
|
||||
lexer-tab.c lexer-tab.h: lexer.l
|
||||
flex --outfile lexer-tab.c --header-file=lexer-tab.h lexer.l
|
||||
$(flex) --outfile lexer-tab.c --header-file=lexer-tab.h lexer.l
|
||||
|
||||
|
||||
CLEANFILES =
|
||||
|
|
Loading…
Reference in a new issue