[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
DJGPP specific fix
From: |
Juan Manuel Guerrero |
Subject: |
DJGPP specific fix |
Date: |
Tue, 20 Dec 2005 01:01:28 +0100 |
User-agent: |
KMail/1.8.2 |
This is only DJGPP specific and will not interfere with the rest of the bison
development.
On systems with file name length limitations, like the 8+3 MSDOS file name
restriction, the file name of scan-gram-c.c will map on the file name of
scan-gram.c. The same applies to scan-skel-c.c and scan-skel.c
The presented changes will solve the issue.
Regards,
Juan Guerrero
cvs diff: Diffing .
Index: ChangeLog
===================================================================
RCS file: /sources/bison/bison/ChangeLog,v
retrieving revision 1.1371
diff -U3 -r1.1371 ChangeLog
--- ChangeLog 12 Dec 2005 21:04:39 -0000 1.1371
+++ ChangeLog 20 Dec 2005 23:29:45 -0000
@@ -1,3 +1,19 @@
+2005-12-20 Juan Manuel Guerrero <address@hidden>
+
+ * Makefile.am: DJGPP specific files added to EXTRA_DIST.
+ * djgpp/Makefile.maint: Fix PACKAGE variable computation.
+ * djgpp/config.bat: Replace every occurence of the file name
+ scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
+ c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
+ * djgpp/config.sed: Replace every occurence of the file name
+ scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
+ c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
+ * djgpp/djunpack.bat: DJGPP specific file.
+ * djgpp/fnchange.lst: DJGPP specific file.
+ * djgpp/README.in: Add new information about how to unpack the bison
+ source on MSDOS and other systems which have 8.3 file name restrictions
+ using djunpack.bat and fnchange.lst.
+
2005-12-12 Paul Eggert <address@hidden>
* bootstrap (build_cvs_prefix): Remove; unused.
Index: Makefile.am
===================================================================
RCS file: /sources/bison/bison/Makefile.am,v
retrieving revision 1.43
diff -U3 -r1.43 Makefile.am
--- Makefile.am 21 Oct 2005 09:13:00 -0000 1.43
+++ Makefile.am 20 Dec 2005 23:29:45 -0000
@@ -28,7 +28,8 @@
OChangeLog PACKAGING \
djgpp/Makefile.maint djgpp/README.in djgpp/config.bat \
djgpp/config.sed djgpp/config.site djgpp/config_h.sed \
- djgpp/subpipe.c djgpp/subpipe.h
+ djgpp/subpipe.c djgpp/subpipe.h djgpp/djunpack.bat \
+ djgpp/fnchange.lst
.PHONY: maintainer-check
Index: djgpp/Makefile.maint
===================================================================
RCS file: /sources/bison/bison/djgpp/Makefile.maint,v
retrieving revision 1.2
diff -U3 -r1.2 Makefile.maint
--- djgpp/Makefile.maint 2 Oct 2005 16:09:46 -0000 1.2
+++ djgpp/Makefile.maint 20 Dec 2005 23:29:45 -0000
@@ -9,7 +9,7 @@
all: README
README: README.in $(top_srcdir)/configure
- PACKAGE=`grep "^[ ]*PACKAGE=" $(top_srcdir)/configure | sed -e
's/^[ ]*PACKAGE=//'`; \
+ PACKAGE=`grep "^[ ]*PACKAGE=" $(top_srcdir)/configure | sed -e
's/^[ ]*PACKAGE=//' -e s/[\"\']//g`; \
VERSION=`grep "^[ ]*VERSION=" $(top_srcdir)/configure | sed -e
's/^[ ]*VERSION=//' -e s/[\"\']//g`; \
package_version=`echo "$${VERSION}" | sed 's/\.//g'`; \
tree_version=`echo "$${VERSION}" | sed 's/\.//2g'`; \
Index: djgpp/README.in
===================================================================
RCS file: /sources/bison/bison/djgpp/README.in,v
retrieving revision 1.1
diff -U3 -r1.1 README.in
--- djgpp/README.in 2 Oct 2005 16:11:25 -0000 1.1
+++ djgpp/README.in 20 Dec 2005 23:29:47 -0000
@@ -6,31 +6,31 @@
The DJGPP port of Bison offers LFN and SFN support depending on which
OS it is running. If LFN support is available or not is determinated at
- run time. If LFN support is available (DOS session under Win9X), the
- standard posix file name extensions will be used. These are: y.tab.c,
- y.tab.c++, y.tab.h, y.output, etc. If only SFN support is available
+ run time. If LFN support is available (DOS session under Win9X), the
+ standard posix file name extensions will be used. These are: y.tab.c,
+ y.tab.c++, y.tab.h, y.output, etc. If only SFN support is available
(plain DOS), then the standard MSDOS short file names will be used.
These are: y_tab.c, y_tab.h, y.out, etc.
It should be noticed that this bison version needs the m4 program as
back end to generate the parser file (y.tab.c etc.) from the skeleton
- files. This implies that m4 must always be installed to get bison
- working. m4 will use a couple of m4 scripts that will be installed in
+ files. This implies that m4 must always be installed to get bison
+ working. m4 will use a couple of m4 scripts that will be installed in
/dev/env/DJDIR/share/bison and shall not be removed.
It should also be noticed that the skeleton files bison.simple and
- bison.hairy are no longer supported. This applies also to the environ-
+ bison.hairy are no longer supported. This applies also to the environ-
ment variables BISON_HAIRY and BISON_SIMPLE. Those variables are *no*
longer honored at all.
The kind of skeleton file bison.hairy is no longer supported at all.
The skeleton file bison.simple is now called yacc.c and is an m4
script.
The other two skeleton files supported by this bison version are glr.c
- and lalr1.cc. The first one is a generalized LR C parser based on
+ and lalr1.cc. The first one is a generalized LR C parser based on
Bison's LALR(1) tables and the second one is a experimental C++ parser
class.
As has been told before, bison uses m4 to generate the parser file.
- This is done by forking and using pipes for the IPC. MSDOS does not
+ This is done by forking and using pipes for the IPC. MSDOS does not
support this functionality so this has been reproduced in the usual
way by redirecting stdin and stdout of bison and m4 to temporary files
- and processing these files in sequence. All the changes to the sources
+ and processing these files in sequence. All the changes to the sources
are documented in the djgpp/diffs file.
Please **read** the docs.
@@ -51,13 +51,56 @@
3.: Building the binaries from sources.
===================================
-3.1.: To build the binaries you will need the following binary packages:
+3.1.: Create a temporary directory and copy the source package into the
+ directory. If you download the source distribution from one of the
+ DJGPP sites, just unzip it preserving the directory structure
+ running *ONE* of the following commands:
+ unzip32 address@hidden@s.zip or
+ djtarx address@hidden@s.zip or
+ pkunzip -d address@hidden@s.zip
+ and proceed to the paragraph 3.3, below.
+
+3.2.: Source distributions downloaded from one of the GNU FTP sites need
+ some more work to unpack, if LFN support is not available. If LFN is
+ available then you can extract the source files from the archive with
+ any unzip program and proceed to the paragraph 3.3, below. Any file
+ name issue will be handled by the the DJGPP configuration files.
+ To unpack the source distribution on SFN systems, first, you MUST use
+ the `djunpack' batch file to unzip the package. That is because some
+ file names in the official distributions need to be changed to avoid
+ problems on the various platforms supported by DJGPP.
+ `djunpack' invokes the `djtar' program (that is part of the basic DJGPP
+ development kit) to rename these files on the fly given a file with
+ name mappings; the distribution includes a file `djgpp/fnchange.lst'
+ with the necessary mappings. So you need first to retrieve that batch
+ file, and then invoke it to unpack the distribution. Here's how:
+
+ djtar -x -p -o bison-2.1/djgpp/djunpack.bat bison-2.1.tar.gz >
djunpack.bat
+ djunpack bison-2.1.tar.gz
+
+ (The name of the distribution archive and the leading directory of the
+ path to `djunpack.bat' in the distribution will be different for
+ versions of Bison other than 2.1.)
+
+ If the argument to `djunpack.bat' include leading directories, it MUST
+ be given with the DOS-style backslashes; Unix-style forward slashes
+ will NOT work.
+
+ If the distribution comes as a .tar.bz2 archive, and your version of
+ `djtar' doesn't support bzip2 decompression, you need to unpack it as
+ follows:
+
+ bnzip2 bison-2.1.tar.bz2
+ djtar -x -p -o bison-2.1/djgpp/djunpack.bat bison-2.1.tar >
djunpack.bat
+ djunpack bison-2.1.tar
+
+3.3.: To build the binaries you will need the following binary packages:
djdev203.zip (or a later but NOT a prior version)
bsh204b.zip (or a later but NOT a prior version)
gcc400b.zip, gpp400b.zip, bnu215b.zip, mak3791b.zip,
fil40b.zip, shl20jb.zip, txt20b.zip,
txi48b.zip, grep24b.zip, sed414b.zip,
- m4-143b.zip.
+ m4-144b.zip.
If you want to run the check you will need also:
dif281b.zip
@@ -65,21 +108,13 @@
All this packages can be found in the v2gnu directory of any
ftp.delorie.com mirror.
You will need bsh203b.zip or later and *NOT* a prior version or
- the build will fail. The same applies to djdev203.zip. Please note
- that Bison requires m4-143b.zip or later to work properly. All the
+ the build will fail. The same applies to djdev203.zip. Please note
+ that Bison requires m4-144b.zip or later to work properly. All the
other packages are the ones I have used to build the binaries
- from this source. Previuos versions of this packages may do the
+ from this source. Previuos versions of this packages may do the
job as well but I have not tested this.
-3.2.: Create a temporary directory and copy the source package into the
- directory. If you download the source distribution from one of the
- DJGPP archives, just unzip it preserving the directory structure
- running *ONE* of the following commands:
- unzip32 address@hidden@s.zip or
- djtarx address@hidden@s.zip or
- pkunzip -d address@hidden@s.zip
-
-3.3.: If for some reason you want to reconfigure the package cd into the top
+3.4.: If for some reason you want to reconfigure the package cd into the top
srcdir (address@hidden@) and run the following commands:
del djgpp\config.cache
make clean
@@ -102,31 +137,30 @@
cd \build
x:address@hidden@\djgpp\config x:/src/gnu/address@hidden@
- The order of the options and the srcdir option does not matter. You
+ The order of the options and the srcdir option does not matter. You
*MUST* use forward slashes to specify the source directory.
The batch file will set same environment variables, make MSDOS specific
modifications to the Makefile.in's and supply all other needed options
to the configure script.
-
-3.4.: To compile the package run from the top srcdir the command:
+3.5.: To compile the package run from the top srcdir the command:
make
-3.5.: Now you can run the tests if you like. From the top srcdir run the
+3.6.: Now you can run the tests if you like. From the top srcdir run the
command:
make check
No test should fail.
- Please note that the testsuite only works with LFN available. On plain
+ Please note that the testsuite only works with LFN available. On plain
DOS, most of the tests will fail due to invalid DOS names.
-3.6.: To install the binaries, header, library, catalogs, and info docs
+3.7.: To install the binaries, header, library, catalogs, and info docs
run the following command from the top srcdir:
make install
This will install the products into your DJGPP installation tree given
- by the default prefix "/dev/env/DJDIR". If you prefer to install them
+ by the default prefix "/dev/env/DJDIR". If you prefer to install them
into some other directory you will have to set prefix to the appropiate
value:
make install prefix=z:/some/other/place
Index: djgpp/config.bat
===================================================================
RCS file: /sources/bison/bison/djgpp/config.bat,v
retrieving revision 1.2
diff -U3 -r1.2 config.bat
--- djgpp/config.bat 3 Oct 2005 05:35:57 -0000 1.2
+++ djgpp/config.bat 20 Dec 2005 23:29:48 -0000
@@ -1,4 +1,7 @@
@echo off
+Rem WARNING WARNING WARNING: This file needs to have DOS CRLF end-of-line
+Rem format, or else stock DOS/Windows shells will refuse to run it.
+
echo Configuring GNU Bison for DJGPP v2.x...
Rem The SmallEnv tests protect against fixed and too small size
@@ -169,7 +172,18 @@
if not errorlevel 1 mv -f %XSRC%/data/c++.m4 %XSRC%/data/cxx.m4
test -f %XSRC%/data/cxx.m4
if errorlevel 1 mv -f %XSRC%/data/cpp.m4 %XSRC%/data/cxx.m4
+:scan_gram_c_Test
+test -f %XSRC%/src/c-scan-gram.c
+if not errorlevel 1 goto scan_skel_c_Test
+test -f %XSRC%/src/scan-gram-c.c
+if not errorlevel 1 mv -f %XSRC%/src/scan-gram-c.c %XSRC%/src/c-scan-gram.c
+:scan_skel_c_Test
+test -f %XSRC%/src/c-scan-skel.c
+if not errorlevel 1 goto FixFiles
+test -f %XSRC%/src/scan-skel-c.c
+if not errorlevel 1 mv -f %XSRC%/src/scan-skel-c.c %XSRC%/src/c-scan-skel.c
+:FixFiles
Rem Fix data/lalr1.cc and data/location.cc to reflect the renaming of c++.m4
sed "s/c++\.m4/cxx.m4/" %XSRC%/data/lalr1.cc > lalr1.cc
if errorlevel 1 goto lalr1_ccFileError
Index: djgpp/config.sed
===================================================================
RCS file: /sources/bison/bison/djgpp/config.sed,v
retrieving revision 1.1
diff -U3 -r1.1 config.sed
--- djgpp/config.sed 2 Oct 2005 16:12:06 -0000 1.1
+++ djgpp/config.sed 20 Dec 2005 23:29:48 -0000
@@ -10,6 +10,8 @@
s,c++\\.at,cxx.at,g;t t\
s,c++\\.m4,cxx.m4,g;t t\
s,calc++,calcxx,g;t t\
+ s,scan-gram-c,c-scan-gram,g;t t\
+ s,scan-skel-c,c-scan-skel,g;t t\
s,Makefile\\.in\\.in,Makefile.in-in,g;t t\
s,Makefile\\.am\\.in,Makefile.am-in,g;t t\
s,(MAKEINFOFLAGS),& --no-split,\
diff -aprNU5 bison-2.1a.orig/djgpp/djunpack.bat bison-2.1a/djgpp/djunpack.bat
--- bison-2.1a.orig/djgpp/djunpack.bat 1970-01-01 00:00:00.000000000 +0000
+++ bison-2.1a/djgpp/djunpack.bat 2005-12-20 23:47:42.000000000 +0000
@@ -0,0 +1,69 @@
address@hidden off
+Rem
+Rem WARNING WARNING WARNING: This file needs to have DOS CRLF end-of-line
+Rem format, or else stock DOS/Windows shells will refuse to run it.
+Rem
+Rem This batch file unpacks the Bison distribution while simultaneously
+Rem renaming some of the files whose names are invalid on DOS or conflict
+Rem with other file names after truncation to DOS 8+3 namespace.
+Rem
+Rem Invoke like this:
+Rem
+Rem djunpack bison-XYZ.tar
+Rem
+Rem where XYZ is the version number. If the argument includes leading
+Rem directories, it MUST use backslashes, not forward slashes.
+Rem
+Rem The following 2 lines need to be changed with each new Bison release, to
+Rem be identical to the name of the top-level directory where the Bison
+Rem distribution unpacks itself.
+set ENVIRONMENT_SIZE_TEST_STRING=ENVIRONMENT_SIZE_TEST_STRING
+if "%ENVIRONMENT_SIZE_TEST_STRING%"=="ENVIRONMENT_SIZE_TEST_STRING" GoTo EnvOk
+Rem If their environment space is too small, re-exec with a larger one
+command.com /e:4096 /c %0 %1
+GoTo End
+:EnvOk
+set ENVIRONMENT_SIZE_TEST_STRING=
+if "%1" == "" GoTo NoArgument
+if not exist %1 GoTo NoArchive
+Rem Extract top src dir from archive file.
+djtar -t %1 > top_src.dir
+Rem The following uses a feature of COPY whereby it does not copy
+Rem empty files. We need that because the previous line will create
+Rem an empty fnchange.tmp even if the command failed for some reason.
+copy top_src.dir junk.tmp > nul
+if not exist junk.tmp GoTo NoDjTar
+del junk.tmp
+sed "1{s/^.*bison-/djtar -x -p -o bison-/;s|$|djgpp/fnchange.lst %%1 >
fnchange.tmp|};2,$d" top_src.dir > ext_list.bat
+Rem See the comment above about the reason for using COPY.
+copy ext_list.bat junk.tmp > nul
+if not exist junk.tmp GoTo NoSed
+del junk.tmp
+Rem Extract fnchange.lst from archive.
+call ext_list.bat %1
+del ext_list.bat
+sed "1{s|^.*bison-|s/@V@/bison-|;s|$|g|};2,$d" top_src.dir > version.sed
+sed -f version.sed < fnchange.tmp > fnchange.lst
+del version.sed
+del fnchange.tmp
+del top_src.dir
+Rem unpack the source distribution
+djtar -x -n fnchange.lst %1
+del fnchange.lst
+GoTo End
+:NoSed
+del junk.tmp
+echo FAIL: Sed is not available.
+GoTo End
+:NoDjTar
+del junk.tmp
+echo FAIL: DJTAR is not available or no fnchange.lst file in %1.
+GoTo End
+:NoArchive
+echo FAIL: the file %1 does not seem to exist.
+echo Remember that %1 cannot use forward slashes, only backslashes.
+GoTo End
+:NoArgument
+echo FAIL: no archive file has been specified.
+echo Remember that the file name cannot use forward slashes, only backslashes.
+:End
diff -aprNU5 bison-2.1a.orig/djgpp/fnchange.lst bison-2.1a/djgpp/fnchange.lst
--- bison-2.1a.orig/djgpp/fnchange.lst 1970-01-01 00:00:00.000000000 +0000
+++ bison-2.1a/djgpp/fnchange.lst 2005-12-20 23:50:18.000000000 +0000
@@ -0,0 +1,2 @@
address@hidden@/src/scan-gram-c.c @V@/src/c-scan-gram.c
address@hidden@/src/scan-skel-c.c @V@/src/c-scan-skel.c
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- DJGPP specific fix,
Juan Manuel Guerrero <=