]>
Commit | Line | Data |
---|---|---|
1 | This is a port of GNU Bison @VERSION@ to MSDOS/DJGPP. | |
2 | ||
3 | ||
4 | 1.: 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 | |
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 | |
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 | |
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 | |
18 | /dev/env/DJDIR/share/bison and shall not be removed. | |
19 | It should also be noticed that the skeleton files bison.simple and | |
20 | bison.hairy are no longer supported. This applies also to the environ- | |
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 | |
26 | and lalr1.cc. The first one is a generalized LR C parser based on | |
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. | |
30 | This is done by forking and using pipes for the IPC. MSDOS does not | |
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 | |
33 | and processing these files in sequence. All the changes to the sources | |
34 | are documented in the djgpp/diffs file. | |
35 | ||
36 | Please **read** the docs. | |
37 | ||
38 | ||
39 | 2.: Installing the binary package. | |
40 | ============================== | |
41 | ||
42 | 2.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 | ||
51 | 3.: Building the binaries from sources. | |
52 | =================================== | |
53 | ||
54 | 3.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 | ||
63 | 3.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 | ||
97 | 3.3.: To build the binaries you will need the following binary packages: | |
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, | |
103 | m4-144b.zip. | |
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 | |
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 | |
113 | other packages are the ones I have used to build the binaries | |
114 | from this source. Previuos versions of this packages may do the | |
115 | job as well but I have not tested this. | |
116 | ||
117 | 3.4.: If for some reason you want to reconfigure the package cd into the top | |
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 | ||
140 | The order of the options and the srcdir option does not matter. You | |
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 | ||
147 | 3.5.: To compile the package run from the top srcdir the command: | |
148 | make | |
149 | ||
150 | 3.6.: Now you can run the tests if you like. From the top srcdir run the | |
151 | command: | |
152 | make check | |
153 | ||
154 | No test should fail. | |
155 | Please note that the testsuite only works with LFN available. On plain | |
156 | DOS, most of the tests will fail due to invalid DOS names. | |
157 | ||
158 | 3.7.: To install the binaries, header, library, catalogs, and info docs | |
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 | |
163 | by the default prefix "/dev/env/DJDIR". If you prefer to install them | |
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 | ||
175 | Enjoy. | |
176 | ||
177 | Guerrero, Juan Manuel <juan.guerrero@gmx.de> |