forked from lix-project/lix
* Detect flex and bison; updated the manual.
This commit is contained in:
parent
c5baaafae6
commit
c625718513
|
@ -45,6 +45,8 @@ AC_LANG_POP(C++)
|
||||||
AC_PATH_PROG(wget, wget)
|
AC_PATH_PROG(wget, wget)
|
||||||
AC_PATH_PROG(xmllint, xmllint)
|
AC_PATH_PROG(xmllint, xmllint)
|
||||||
AC_PATH_PROG(xsltproc, xsltproc)
|
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],
|
AC_ARG_WITH(docbook-catalog, AC_HELP_STRING([--with-docbook-catalog=PATH],
|
||||||
[path of the DocBook XML DTD]),
|
[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>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
To rebuild this manual and the man-pages you need the
|
To build this manual and the man-pages you need the
|
||||||
<command>xmllint</command> and <command>xsltproc</command>, which are
|
<command>xmllint</command> and <command>xsltproc</command>
|
||||||
part of the <literal>libxml2</literal> and <literal>libxslt</literal>
|
programs, which are part of the <literal>libxml2</literal> and
|
||||||
packages, respectively. You also need the <ulink
|
<literal>libxslt</literal> packages, respectively. You also
|
||||||
url='http://docbook.sourceforge.net/projects/xsl/'>DocBook XSL
|
need the <ulink
|
||||||
stylesheets</ulink> and optionally the <ulink
|
url='http://docbook.sourceforge.net/projects/xsl/'>DocBook XSL
|
||||||
url='http://www.oasis-open.org/docbook/xml/4.2/docbook-xml-4.2.zip'>
|
stylesheets</ulink> and optionally the <ulink
|
||||||
DocBook XML 4.2 DTD</ulink>. Note that these are only required if you
|
url='http://www.oasis-open.org/docbook/xml/4.2/docbook-xml-4.2.zip'>
|
||||||
modify the manual sources or when you are building from the Subversion
|
DocBook XML 4.2 DTD</ulink>. Note that these are only required
|
||||||
repository.
|
if you modify the manual sources or when you are building from
|
||||||
|
the Subversion repository.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Nix uses Sleepycat's Berkeley DB, CWI's ATerm library, and SDF parser
|
To build the parser, very <emphasis>recent</emphasis> versions
|
||||||
library. These are included in the Nix source distribution. If you
|
of Bison and Flex are required. (This is because Nix needs GLR
|
||||||
build from the Subversion repository, you must download them yourself and
|
support in Bison and reentrancy support in Flex.) For Bison,
|
||||||
place them in the <filename>externals/</filename> directory. See
|
you need version 1.875c or higher (1.875 does
|
||||||
<filename>externals/Makefile.am</filename> for the precise URLs of these
|
<emphasis>not</emphasis> work), which can be obtained from the
|
||||||
packages.
|
<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>
|
</para>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
|
|
|
@ -174,8 +174,8 @@ $ nix-env -if pkgs/system/i686-linux.nix pan</screen>
|
||||||
|
|
||||||
<screen>
|
<screen>
|
||||||
$ nix-pull
|
$ nix-pull
|
||||||
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/~eelco/nix/nixpkgs-<replaceable>version</replaceable>...
|
obtaining list of Nix archives at http://catamaran.labs.cs.uu.nl/dist/nix/nixpkgs-<replaceable>version</replaceable>...
|
||||||
...</screen>
|
...</screen>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
|
35
externals/Makefile.am
vendored
35
externals/Makefile.am
vendored
|
@ -56,37 +56,10 @@ build-aterm: have-aterm
|
||||||
touch build-aterm
|
touch build-aterm
|
||||||
|
|
||||||
|
|
||||||
# SDF bundle
|
all: build-db build-aterm
|
||||||
|
|
||||||
SDF2 = sdf2-bundle-1.6
|
EXTRA_DIST = $(DB).tar.gz $(ATERM).tar.gz
|
||||||
|
|
||||||
$(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
|
|
||||||
|
|
||||||
ext-clean:
|
ext-clean:
|
||||||
$(RM) -f have-db build-db have-aterm build-aterm have-sdf2 build-sdf2
|
$(RM) -f have-db build-db have-aterm build-aterm
|
||||||
$(RM) -rf $(DB) $(ATERM) $(SDF2)
|
$(RM) -rf $(DB) $(ATERM)
|
||||||
|
|
|
@ -12,11 +12,13 @@ AM_CFLAGS = \
|
||||||
|
|
||||||
# Parser generation.
|
# Parser generation.
|
||||||
|
|
||||||
|
parser.o: parser-tab.h lexer-tab.h
|
||||||
|
|
||||||
parser-tab.c parser-tab.h: parser.y
|
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
|
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 =
|
CLEANFILES =
|
||||||
|
|
Loading…
Reference in a new issue