]> git.saurik.com Git - bison.git/blame - djgpp/README.in
Fix latest changelog entry: the "who" was missing.
[bison.git] / djgpp / README.in
CommitLineData
cd72b08b
JMG
1This is a port of GNU Bison @VERSION@ to MSDOS/DJGPP.
2
3
41.: DJGPP specific changes.
5 =======================
6
7 The DJGPP port of Bison offers LFN and SFN support depending on which
8 OS it is running. If LFN support is available or not is determinated at
bf60087f
JMG
9 run time. If LFN support is available (DOS session under Win9X), the
10 standard posix file name extensions will be used. These are: y.tab.c,
11 y.tab.c++, y.tab.h, y.output, etc. If only SFN support is available
cd72b08b
JMG
12 (plain DOS), then the standard MSDOS short file names will be used.
13 These are: y_tab.c, y_tab.h, y.out, etc.
14 It should be noticed that this bison version needs the m4 program as
15 back end to generate the parser file (y.tab.c etc.) from the skeleton
bf60087f
JMG
16 files. This implies that m4 must always be installed to get bison
17 working. m4 will use a couple of m4 scripts that will be installed in
cd72b08b
JMG
18 /dev/env/DJDIR/share/bison and shall not be removed.
19 It should also be noticed that the skeleton files bison.simple and
bf60087f 20 bison.hairy are no longer supported. This applies also to the environ-
cd72b08b
JMG
21 ment variables BISON_HAIRY and BISON_SIMPLE. Those variables are *no*
22 longer honored at all.
23 The kind of skeleton file bison.hairy is no longer supported at all.
24 The skeleton file bison.simple is now called yacc.c and is an m4 script.
25 The other two skeleton files supported by this bison version are glr.c
bf60087f 26 and lalr1.cc. The first one is a generalized LR C parser based on
cd72b08b
JMG
27 Bison's LALR(1) tables and the second one is a experimental C++ parser
28 class.
29 As has been told before, bison uses m4 to generate the parser file.
bf60087f 30 This is done by forking and using pipes for the IPC. MSDOS does not
cd72b08b
JMG
31 support this functionality so this has been reproduced in the usual
32 way by redirecting stdin and stdout of bison and m4 to temporary files
bf60087f 33 and processing these files in sequence. All the changes to the sources
cd72b08b
JMG
34 are documented in the djgpp/diffs file.
35
36 Please **read** the docs.
37
38
392.: Installing the binary package.
40 ==============================
41
422.1.: Copy the binary distribution into the top DJGPP installation directory,
43 just unzip it preserving the directory structure running *ONE* of the
44 following commands:
45 unzip32 bsn@PACKAGE_VERSION@b.zip or
46 djtarx bsn@PACKAGE_VERSION@b.zip or
47 pkunzip -d bsn@PACKAGE_VERSION@b.zip
48
49
50
513.: Building the binaries from sources.
52 ===================================
53
bf60087f
JMG
543.1.: Create a temporary directory and copy the source package into the
55 directory. If you download the source distribution from one of the
56 DJGPP sites, just unzip it preserving the directory structure
57 running *ONE* of the following commands:
58 unzip32 bsn@PACKAGE_VERSION@s.zip or
59 djtarx bsn@PACKAGE_VERSION@s.zip or
60 pkunzip -d bsn@PACKAGE_VERSION@s.zip
61 and proceed to the paragraph 3.3, below.
62
633.2.: Source distributions downloaded from one of the GNU FTP sites need
64 some more work to unpack, if LFN support is not available. If LFN is
65 available then you can extract the source files from the archive with
66 any unzip program and proceed to the paragraph 3.3, below. Any file
67 name issue will be handled by the the DJGPP configuration files.
68 To unpack the source distribution on SFN systems, first, you MUST use
69 the `djunpack' batch file to unzip the package. That is because some
70 file names in the official distributions need to be changed to avoid
71 problems on the various platforms supported by DJGPP.
72 `djunpack' invokes the `djtar' program (that is part of the basic DJGPP
73 development kit) to rename these files on the fly given a file with
74 name mappings; the distribution includes a file `djgpp/fnchange.lst'
75 with the necessary mappings. So you need first to retrieve that batch
76 file, and then invoke it to unpack the distribution. Here's how:
77
78 djtar -x -p -o bison-2.1/djgpp/djunpack.bat bison-2.1.tar.gz > djunpack.bat
79 djunpack bison-2.1.tar.gz
80
81 (The name of the distribution archive and the leading directory of the
82 path to `djunpack.bat' in the distribution will be different for
83 versions of Bison other than 2.1.)
84
85 If the argument to `djunpack.bat' include leading directories, it MUST
86 be given with the DOS-style backslashes; Unix-style forward slashes
87 will NOT work.
88
89 If the distribution comes as a .tar.bz2 archive, and your version of
90 `djtar' doesn't support bzip2 decompression, you need to unpack it as
91 follows:
92
93 bnzip2 bison-2.1.tar.bz2
94 djtar -x -p -o bison-2.1/djgpp/djunpack.bat bison-2.1.tar > djunpack.bat
95 djunpack bison-2.1.tar
96
973.3.: To build the binaries you will need the following binary packages:
cd72b08b
JMG
98 djdev203.zip (or a later but NOT a prior version)
99 bsh204b.zip (or a later but NOT a prior version)
100 gcc400b.zip, gpp400b.zip, bnu215b.zip, mak3791b.zip,
101 fil40b.zip, shl20jb.zip, txt20b.zip,
102 txi48b.zip, grep24b.zip, sed414b.zip,
bf60087f 103 m4-144b.zip.
cd72b08b
JMG
104
105 If you want to run the check you will need also:
106 dif281b.zip
107
108 All this packages can be found in the v2gnu directory of any
109 ftp.delorie.com mirror.
110 You will need bsh203b.zip or later and *NOT* a prior version or
bf60087f
JMG
111 the build will fail. The same applies to djdev203.zip. Please note
112 that Bison requires m4-144b.zip or later to work properly. All the
cd72b08b 113 other packages are the ones I have used to build the binaries
bf60087f 114 from this source. Previuos versions of this packages may do the
cd72b08b
JMG
115 job as well but I have not tested this.
116
bf60087f 1173.4.: If for some reason you want to reconfigure the package cd into the top
cd72b08b
JMG
118 srcdir (bison-@TREE_VERSION@) and run the following commands:
119 del djgpp\config.cache
120 make clean
121 djgpp\config
122
123 Please note that you *MUST* delete the config.cache file in the djgpp
124 subdir or you will not really reconfigure the sources because the
125 configuration informations will be read from the cache file instead
126 of being newly computed.
127 To build the programs in a directory other than where the sources are,
128 you must add the parameter that specifies the source directory,
129 e.g:
130 x:\src\gnu\bison-@TREE_VERSION@\djgpp\config x:/src/gnu/bison-@TREE_VERSION@
131
132 Lets assume you want to build the binaries in a directory placed on a
133 different drive (z:\build in this case) from where the sources are,
134 then you will run the following commands:
135 z:
136 md \build
137 cd \build
138 x:\src\gnu\bison-@TREE_VERSION@\djgpp\config x:/src/gnu/bison-@TREE_VERSION@
139
bf60087f 140 The order of the options and the srcdir option does not matter. You
cd72b08b
JMG
141 *MUST* use forward slashes to specify the source directory.
142
143 The batch file will set same environment variables, make MSDOS specific
144 modifications to the Makefile.in's and supply all other needed options
145 to the configure script.
146
bf60087f 1473.5.: To compile the package run from the top srcdir the command:
cd72b08b
JMG
148 make
149
bf60087f 1503.6.: Now you can run the tests if you like. From the top srcdir run the
cd72b08b
JMG
151 command:
152 make check
153
154 No test should fail.
bf60087f 155 Please note that the testsuite only works with LFN available. On plain
cd72b08b
JMG
156 DOS, most of the tests will fail due to invalid DOS names.
157
bf60087f 1583.7.: To install the binaries, header, library, catalogs, and info docs
cd72b08b
JMG
159 run the following command from the top srcdir:
160 make install
161
162 This will install the products into your DJGPP installation tree given
bf60087f 163 by the default prefix "/dev/env/DJDIR". If you prefer to install them
cd72b08b
JMG
164 into some other directory you will have to set prefix to the appropiate
165 value:
166 make install prefix=z:/some/other/place
167
168
169
170 Send GNU bison specific bug reports to <bug-bison@gnu.org>.
171 Send suggestions and bug reports concerning the DJGPP port to
172 comp.os.msdos.djgpp or <djgpp@delorie.com>.
173
174
175Enjoy.
176
177 Guerrero, Juan Manuel <juan.guerrero@gmx.de>