mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13:03 +00:00
djgpp: remove
Support for DJGPP was announced to be removed in the NEWS of Bison 3.1 (2018-08-27) unless someone expressed interest. There was no answer. * djgpp: Remove. * NEWS, Makefile.am, cfg.mk, po/POTFILES.in: Adjust.
This commit is contained in:
@@ -57,7 +57,6 @@ noinst_LIBRARIES =
|
||||
|
||||
include build-aux/local.mk
|
||||
include data/local.mk
|
||||
include djgpp/local.mk
|
||||
include doc/local.mk
|
||||
include etc/local.mk
|
||||
include examples/local.mk
|
||||
|
||||
8
NEWS
8
NEWS
@@ -2,6 +2,10 @@ GNU Bison NEWS
|
||||
|
||||
* Noteworthy changes in release ?.? (????-??-??) [?]
|
||||
|
||||
** Backward incompatible changes
|
||||
|
||||
Support for DJGPP, which has been unmaintained and untested for years, is
|
||||
removed.
|
||||
|
||||
* Noteworthy changes in release 3.2.1 (2018-11-09) [stable]
|
||||
|
||||
@@ -14,7 +18,7 @@ GNU Bison NEWS
|
||||
|
||||
** Backward incompatible changes
|
||||
|
||||
Support for DJGPP, which have been unmaintained and untested for years, is
|
||||
Support for DJGPP, which has been unmaintained and untested for years, is
|
||||
obsolete. Unless there is activity to revive it, it will be removed.
|
||||
|
||||
** Changes
|
||||
@@ -184,7 +188,7 @@ GNU Bison NEWS
|
||||
release of Bison 3.0, five years ago. Generated parsers do not require a
|
||||
C99 compiler.
|
||||
|
||||
Support for DJGPP, which have been unmaintained and untested for years, is
|
||||
Support for DJGPP, which has been unmaintained and untested for years, is
|
||||
obsolete. Unless there is activity to revive it, the next release of Bison
|
||||
will have it removed.
|
||||
|
||||
|
||||
33
cfg.mk
33
cfg.mk
@@ -158,21 +158,20 @@ sc_space_before_open_paren:
|
||||
|
||||
exclude = \
|
||||
$(foreach a,$(1),$(eval $(subst $$,$$$$,exclude_file_name_regexp--sc_$(a))))
|
||||
$(call exclude, \
|
||||
bindtextdomain=^lib/main.c$$ \
|
||||
preprocessor_indentation=^data/|^lib/|^src/parse-gram.[ch]$$ \
|
||||
program_name=^lib/main.c$$ \
|
||||
prohibit_always-defined_macros=^data/yacc.c$$|^djgpp/ \
|
||||
prohibit_always-defined_macros+=?|^src/(parse-gram.c|system.h)$$ \
|
||||
prohibit_always-defined_macros+=?|^tests/regression.at$$ \
|
||||
prohibit_always_true_header_tests=^djgpp/subpipe.h$$ \
|
||||
prohibit_doubled_word=^tests/named-refs.at$$ \
|
||||
prohibit_magic_number_exit=^doc/bison.texi$$ \
|
||||
prohibit_magic_number_exit+=?|^tests/(conflicts|regression).at$$ \
|
||||
prohibit_strcmp=^doc/bison\.texi|tests/local\.at$$ \
|
||||
prohibit_tab_based_indentation=install-icc.sh|\.(am|mk)$$|^djgpp/|^\.git|Makefile$$ \
|
||||
require_config_h_first=^(lib/yyerror|data/(glr|yacc))\.c$$ \
|
||||
space_before_open_paren=^(data/|djgpp/) \
|
||||
two_space_separator_in_usage=^(bootstrap|build-aux/install-icc.sh) \
|
||||
unmarked_diagnostics=^(djgpp/|doc/bison.texi$$|tests/c\+\+\.at$$) \
|
||||
$(call exclude, \
|
||||
bindtextdomain=^lib/main.c$$ \
|
||||
preprocessor_indentation=^data/|^lib/|^src/parse-gram.[ch]$$ \
|
||||
program_name=^lib/main.c$$ \
|
||||
prohibit_always-defined_macros=^data/yacc.c$$ \
|
||||
prohibit_always-defined_macros+=?|^src/(parse-gram.c|system.h)$$ \
|
||||
prohibit_always-defined_macros+=?|^tests/regression.at$$ \
|
||||
prohibit_doubled_word=^tests/named-refs.at$$ \
|
||||
prohibit_magic_number_exit=^doc/bison.texi$$ \
|
||||
prohibit_magic_number_exit+=?|^tests/(conflicts|regression).at$$ \
|
||||
prohibit_strcmp=^doc/bison\.texi|tests/local\.at$$ \
|
||||
prohibit_tab_based_indentation=install-icc.sh|\.(am|mk)$$|^\.git|Makefile$$ \
|
||||
require_config_h_first=^(lib/yyerror|data/(glr|yacc))\.c$$ \
|
||||
space_before_open_paren=^data/ \
|
||||
two_space_separator_in_usage=^(bootstrap|build-aux/install-icc.sh) \
|
||||
unmarked_diagnostics=^(doc/bison.texi$$|tests/c\+\+\.at$$) \
|
||||
)
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
# DJGPP Maintainer's Makefile -*-Makefile-*-
|
||||
# Requires GNU sed
|
||||
|
||||
## Copyright (C) 2005-2015, 2018 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
top_srcdir = ..
|
||||
srcdir = .
|
||||
|
||||
SHELL = /bin/sh
|
||||
|
||||
all: README
|
||||
|
||||
README: README.in $(top_srcdir)/configure
|
||||
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'`; \
|
||||
sed \
|
||||
-e "s/@V@/$${PACKAGE}-$${VERSION}/g" \
|
||||
-e "s/@VERSION@/$${VERSION}/g" \
|
||||
-e "s/@PACKAGE_VERSION@/$$package_version/g" \
|
||||
-e "s/@TREE_VERSION@/$$tree_version/g" \
|
||||
$(srcdir)/README.in > t-$@
|
||||
mv t-$@ $@
|
||||
195
djgpp/README.in
195
djgpp/README.in
@@ -1,195 +0,0 @@
|
||||
This is a port of GNU Bison @VERSION@ to MSDOS/DJGPP.
|
||||
|
||||
Copyright (C) 2005-2015, 2018 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
1.: DJGPP specific changes.
|
||||
=======================
|
||||
|
||||
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 determined at
|
||||
run time. If LFN support is available (DOS session under Win9X, Win2K,
|
||||
WinXP, etc.) 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
|
||||
/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-
|
||||
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
|
||||
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
|
||||
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.
|
||||
It should be noticed that due to the great amount of file names that do
|
||||
not cleanly map to 8.3 file names, you will need an OS with LFN support
|
||||
to configure and compile the sources. On Win98 this implies that the
|
||||
generation of numeric tails for 8.3 file name aliases must be enabled
|
||||
or the compilation will fail.
|
||||
|
||||
|
||||
Please **read** the docs.
|
||||
|
||||
|
||||
2.: Installing the binary package.
|
||||
==============================
|
||||
|
||||
2.1.: Copy the binary distribution into the top DJGPP installation directory,
|
||||
just unzip it preserving the directory structure running *ONE* of the
|
||||
following commands:
|
||||
unzip32 bsn@PACKAGE_VERSION@b.zip or
|
||||
djtarx bsn@PACKAGE_VERSION@b.zip or
|
||||
pkunzip -d bsn@PACKAGE_VERSION@b.zip
|
||||
|
||||
|
||||
|
||||
3.: Building the binaries from sources.
|
||||
===================================
|
||||
|
||||
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 bsn@PACKAGE_VERSION@s.zip or
|
||||
djtarx bsn@PACKAGE_VERSION@s.zip or
|
||||
pkunzip -d bsn@PACKAGE_VERSION@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 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-@VERSION@/djgpp/djunpack.bat bison-@VERSION@.tar.gz > djunpack.bat
|
||||
djunpack bison-@VERSION@.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 @VERSION@.)
|
||||
|
||||
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-@VERSION@.tar.bz2
|
||||
djtar -x -p -o bison-@VERSION@/djgpp/djunpack.bat bison-@VERSION@.tar > djunpack.bat
|
||||
djunpack bison-@VERSION@.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)
|
||||
gccNNNb.zip, gppNNN.zip, bnuNNNb.zip, makNNNb.zip, filNNNb.zip,
|
||||
perlNNNb.zip, shlNNNb.zip, txtNNNb.zip, txiNNNb.zip, grepNNNb.zip,
|
||||
sedNNNb.zip and m4NNN.zip
|
||||
|
||||
If you want to run the check you will need also:
|
||||
difNNNb.zip
|
||||
|
||||
NNN represents the latest version number of the binary packages. All
|
||||
this packages can be found in the /v2gnu directory of any
|
||||
ftp.delorie.com mirror.
|
||||
You will need bsh204b.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-144b.zip or later to work properly.
|
||||
|
||||
3.4.: If for some reason you want to reconfigure the package cd into the top
|
||||
srcdir (bison-@TREE_VERSION@) and run the following commands:
|
||||
del djgpp\config.cache
|
||||
make clean
|
||||
djgpp\config
|
||||
|
||||
Please note that you *MUST* delete the config.cache file in the djgpp
|
||||
subdir or you will not really reconfigure the sources because the
|
||||
configuration informations will be read from the cache file instead
|
||||
of being newly computed.
|
||||
To build the programs in a directory other than where the sources are,
|
||||
you must add the parameter that specifies the source directory,
|
||||
e.g:
|
||||
x:\src\gnu\bison-@TREE_VERSION@\djgpp\config x:/src/gnu/bison-@TREE_VERSION@
|
||||
|
||||
Lets assume you want to build the binaries in a directory placed on a
|
||||
different drive (z:\build in this case) from where the sources are,
|
||||
then you will run the following commands:
|
||||
z:
|
||||
md \build
|
||||
cd \build
|
||||
x:\src\gnu\bison-@TREE_VERSION@\djgpp\config x:/src/gnu/bison-@TREE_VERSION@
|
||||
|
||||
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.5.: To compile the package run from the top srcdir the command:
|
||||
make
|
||||
|
||||
3.6.: Now you can run the tests if you like. From the top srcdir run the
|
||||
command:
|
||||
make check
|
||||
|
||||
No test should fail but the tests #131 (Doxygen Public Documentation)
|
||||
and #132 (Doxygen Private Documentation) will be skipped. 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.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
|
||||
into some other directory you will have to set prefix to the appropriate
|
||||
value:
|
||||
make install prefix=z:/some/other/place
|
||||
|
||||
|
||||
|
||||
Send GNU bison specific bug reports to <bug-bison@gnu.org>.
|
||||
Send suggestions and bug reports concerning the DJGPP port to
|
||||
comp.os.msdos.djgpp or <djgpp@delorie.com>.
|
||||
|
||||
|
||||
Enjoy.
|
||||
|
||||
Guerrero, Juan Manuel <juan.guerrero@gmx.de>
|
||||
547
djgpp/config.bat
547
djgpp/config.bat
@@ -1,547 +0,0 @@
|
||||
@echo off
|
||||
Rem Configure Bison for DJGPP.
|
||||
|
||||
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 Copyright (C) 2005-2015, 2018 Free Software Foundation, Inc.
|
||||
|
||||
Rem This program is free software: you can redistribute it and/or modify
|
||||
Rem it under the terms of the GNU General Public License as published by
|
||||
Rem the Free Software Foundation, either version 3 of the License, or
|
||||
Rem (at your option) any later version.
|
||||
Rem
|
||||
Rem This program is distributed in the hope that it will be useful,
|
||||
Rem but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
Rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
Rem GNU General Public License for more details.
|
||||
Rem
|
||||
Rem You should have received a copy of the GNU General Public License
|
||||
Rem along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
echo Configuring Bison for DJGPP v2.x...
|
||||
|
||||
Rem The SmallEnv tests protect against fixed and too small size
|
||||
Rem of the environment in stock DOS shell.
|
||||
|
||||
Rem Find out if NLS is wanted or not,
|
||||
Rem if dependency-tracking is wanted or not,
|
||||
Rem if caching is wanted or not
|
||||
Rem and where the sources are.
|
||||
Rem We always default to NLS support,
|
||||
Rem no dependency tracking
|
||||
Rem and to in place configuration.
|
||||
set ARGS=
|
||||
set NLS=enabled
|
||||
if not "%NLS%" == "enabled" goto SmallEnv
|
||||
set CACHING=enabled
|
||||
if not "%CACHING%" == "enabled" goto SmallEnv
|
||||
set DEPENDENCY_TRACKING=disabled
|
||||
if not "%DEPENDENCY_TRACKING%" == "disabled" goto SmallEnv
|
||||
set LIBICONV_PREFIX=disabled
|
||||
if not "%LIBICONV_PREFIX%" == "disabled" goto SmallEnv
|
||||
set LIBINTL_PREFIX=disabled
|
||||
if not "%LIBINTL_PREFIX%" == "disabled" goto SmallEnv
|
||||
set HTML=enabled
|
||||
if not "%HTML%" == "enabled" goto SmallEnv
|
||||
set XSRC=.
|
||||
if not "%XSRC%" == "." goto SmallEnv
|
||||
|
||||
Rem Loop over all arguments.
|
||||
Rem Special arguments are: NLS, XSRC, CACHE, STATIC_LIBS, LIBICONV_PREFIX, LIBINTL_PREFIX and DEPS.
|
||||
Rem All other arguments are stored into ARGS.
|
||||
:ArgLoop
|
||||
if "%1" == "nls" goto NextArgument
|
||||
if "%1" == "NLS" goto NextArgument
|
||||
if "%1" == "no-nls" goto NoNLS
|
||||
if "%1" == "no-NLS" goto NoNLS
|
||||
if "%1" == "NO-NLS" goto NoNLS
|
||||
goto CachingOption
|
||||
:NoNLS
|
||||
if "%1" == "no-nls" set NLS=disabled
|
||||
if "%1" == "no-NLS" set NLS=disabled
|
||||
if "%1" == "NO-NLS" set NLS=disabled
|
||||
if not "%NLS%" == "disabled" goto SmallEnv
|
||||
goto NextArgument
|
||||
:CachingOption
|
||||
if "%1" == "cache" goto NextArgument
|
||||
if "%1" == "CACHE" goto NextArgument
|
||||
if "%1" == "no-cache" goto NoCaching
|
||||
if "%1" == "no-CACHE" goto NoCaching
|
||||
if "%1" == "NO-CACHE" goto NoCaching
|
||||
goto DependencyOption
|
||||
:NoCaching
|
||||
if "%1" == "no-cache" set CACHING=disabled
|
||||
if "%1" == "no-CACHE" set CACHING=disabled
|
||||
if "%1" == "NO-CACHE" set CACHING=disabled
|
||||
if not "%CACHING%" == "disabled" goto SmallEnv
|
||||
goto NextArgument
|
||||
:DependencyOption
|
||||
if "%1" == "no-dep" goto NextArgument
|
||||
if "%1" == "no-DEP" goto NextArgument
|
||||
if "%1" == "NO-DEP" goto NextArgument
|
||||
if "%1" == "dep" goto DependecyTracking
|
||||
if "%1" == "DEP" goto DependecyTracking
|
||||
goto LibiconvPrefixOption
|
||||
:DependecyTracking
|
||||
if "%1" == "dep" set DEPENDENCY_TRACKING=enabled
|
||||
if "%1" == "DEP" set DEPENDENCY_TRACKING=enabled
|
||||
if not "%DEPENDENCY_TRACKING%" == "enabled" goto SmallEnv
|
||||
goto NextArgument
|
||||
:LibiconvPrefixOption
|
||||
if "%1" == "no-libiconvprefix" goto NextArgument
|
||||
if "%1" == "no-LIBICONVPREFIX" goto NextArgument
|
||||
if "%1" == "NO-LIBICONVPREFIX" goto NextArgument
|
||||
if "%1" == "libiconvprefix" goto WithLibiconvPrefix
|
||||
if "%1" == "LIBICONVPREFIX" goto WithLibiconvPrefix
|
||||
goto LibintlPrefixOption
|
||||
:WithLibiconvPrefix
|
||||
if "%1" == "libiconvprefix" set LIBICONV_PREFIX=enabled
|
||||
if "%1" == "LIBICONVPREFIX" set LIBICONV_PREFIX=enabled
|
||||
if not "%LIBICONV_PREFIX%" == "enabled" goto SmallEnv
|
||||
goto NextArgument
|
||||
:LibintlPrefixOption
|
||||
if "%1" == "no-libiconvprefix" goto NextArgument
|
||||
if "%1" == "no-LIBICONVPREFIX" goto NextArgument
|
||||
if "%1" == "NO-LIBICONVPREFIX" goto NextArgument
|
||||
if "%1" == "libintlprefix" goto _WithLibintlPrefix
|
||||
if "%1" == "LIBINTLPREFIX" goto _WithLibintlPrefix
|
||||
goto HTMLOption
|
||||
:_WithLibintlPrefix
|
||||
if "%1" == "libintlprefix" set LIBINTL_PREFIX=enabled
|
||||
if "%1" == "LIBINTLPREFIX" set LIBINTL_PREFIX=enabled
|
||||
if not "%LIBINTL_PREFIX%" == "enabled" goto SmallEnv
|
||||
:HTMLOption
|
||||
if "%1" == "withhtml" goto NextArgument
|
||||
if "%1" == "withHTML" goto NextArgument
|
||||
if "%1" == "WITHHTML" goto NextArgument
|
||||
if "%1" == "withouthtml" goto _WithoutHTML
|
||||
if "%1" == "withoutHTML" goto _WithoutHTML
|
||||
if "%1" == "WITHOUTHTML" goto _WithoutHTML
|
||||
goto SrcDirOption
|
||||
:_WithoutHTML
|
||||
if "%1" == "withouthtml" set HTML=disabled
|
||||
if "%1" == "withoutHTML" set HTML=disabled
|
||||
if "%1" == "WITHOUTHTML" set HTML=disabled
|
||||
if not "%HTML%" == "disabled" goto SmallEnv
|
||||
goto NextArgument
|
||||
:SrcDirOption
|
||||
echo %1 | grep -q "/"
|
||||
if errorlevel 1 goto CollectArgument
|
||||
set XSRC=%1
|
||||
if not "%XSRC%" == "%1" goto SmallEnv
|
||||
goto NextArgument
|
||||
:CollectArgument
|
||||
set _ARGS=%ARGS% %1
|
||||
if not "%_ARGS%" == "%ARGS% %1" if not "%_ARGS%" == "%ARGS%%1" goto SmallEnv
|
||||
echo %_ARGS% | grep -q "[^ ]"
|
||||
if not errorlevel 0 set ARGS=%_ARGS%
|
||||
set _ARGS=
|
||||
:NextArgument
|
||||
shift
|
||||
if not "%1" == "" goto ArgLoop
|
||||
|
||||
Rem Create an arguments file for the configure script.
|
||||
echo --srcdir=%XSRC% > args
|
||||
if "%CACHING%" == "enabled" echo --cache-file=%XSRC%/djgpp/config.cache >> args
|
||||
if "%DEPENDENCY_TRACKING%" == "enabled" echo --enable-dependency-tracking >> args
|
||||
if "%DEPENDENCY_TRACKING%" == "disabled" echo --disable-dependency-tracking >> args
|
||||
if "%LIBICONV_PREFIX%" == "enabled" echo --with-libiconv-prefix >> args
|
||||
if "%LIBICONV_PREFIX%" == "disabled" echo --without-libiconv-prefix >> args
|
||||
if "%LIBINTL_PREFIX%" == "enabled" echo --with-libintl-prefix >> args
|
||||
if "%LIBINTL_PREFIX%" == "disabled" echo --without-libintl-prefix >> args
|
||||
if "%HTML%" == "enabled" echo --enable-html >> args
|
||||
if "%HTML%" == "disabled" echo --disable-html >> args
|
||||
if not "%ARGS%" == "" echo %ARGS% >> args
|
||||
set ARGS=
|
||||
set CACHING=
|
||||
set DEPENDENCY_TRACKING=
|
||||
set LIBICONV_PREFIX=
|
||||
set LIBINTL_PREFIX=
|
||||
set HTML=
|
||||
|
||||
if "%XSRC%" == "." goto InPlace
|
||||
|
||||
:NotInPlace
|
||||
redir -e /dev/null update %XSRC%/configure.org ./configure
|
||||
test -f ./configure
|
||||
if errorlevel 1 update %XSRC%/configure ./configure
|
||||
|
||||
:InPlace
|
||||
Rem Update configuration files
|
||||
echo Updating configuration scripts...
|
||||
test -f ./configure.org
|
||||
if errorlevel 1 update configure configure.org
|
||||
sed -f %XSRC%/djgpp/config.sed configure.org > configure
|
||||
if errorlevel 1 goto SedError
|
||||
|
||||
Rem Make sure they have a config.site file
|
||||
set CONFIG_SITE=%XSRC%/djgpp/config.site
|
||||
if not "%CONFIG_SITE%" == "%XSRC%/djgpp/config.site" goto SmallEnv
|
||||
|
||||
Rem inttypes_.h and inttypes.h map to the same 8.3 alias.
|
||||
test -f %XSRC%/lib/inttypes_.h
|
||||
if not errorlevel 1 mv -f %XSRC%/lib/inttypes_.h %XSRC%/lib/_inttypes.h
|
||||
|
||||
Rem Make sure crucial file names are not munged by unpacking
|
||||
test -f %XSRC%/po/Makefile.in.in
|
||||
if not errorlevel 1 mv -f %XSRC%/po/Makefile.in.in %XSRC%/po/Makefile.in-in
|
||||
test -f %XSRC%/po/Makefile.in-in
|
||||
if errorlevel 1 mv -f %XSRC%/po/Makefile.in %XSRC%/po/Makefile.in-in
|
||||
test -f %XSRC%/po/Makefile.in-in
|
||||
if errorlevel 1 mv -f %XSRC%/po/Makefile.inin %XSRC%/po/Makefile.in-in
|
||||
test -f %XSRC%/po/Makefile.in-in
|
||||
if errorlevel 1 mv -f %XSRC%/po/Makefile.in_in %XSRC%/po/Makefile.in-in
|
||||
test -f %XSRC%/po/Makefile.in-in
|
||||
if errorlevel 1 mv -f %XSRC%/po/Makefile_in.in %XSRC%/po/Makefile.in-in
|
||||
test -f %XSRC%/runtime-po/Makefile.in.in
|
||||
if not errorlevel 1 mv -f %XSRC%/runtime-po/Makefile.in.in %XSRC%/runtime-po/Makefile.in-in
|
||||
test -f %XSRC%/runtime-po/Makefile.in-in
|
||||
if errorlevel 1 mv -f %XSRC%/runtime-po/Makefile.in %XSRC%/runtime-po/Makefile.in-in
|
||||
test -f %XSRC%/runtime-po/Makefile.in-in
|
||||
if errorlevel 1 mv -f %XSRC%/runtime-po/Makefile.inin %XSRC%/runtime-po/Makefile.in-in
|
||||
test -f %XSRC%/runtime-po/Makefile.in-in
|
||||
if errorlevel 1 mv -f %XSRC%/runtime-po/Makefile.in_in %XSRC%/runtime-po/Makefile.in-in
|
||||
test -f %XSRC%/runtime-po/Makefile.in-in
|
||||
if errorlevel 1 mv -f %XSRC%/runtime-po/Makefile_in.in %XSRC%/runtime-po/Makefile.in-in
|
||||
test -f %XSRC%/data/c++.m4
|
||||
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
|
||||
test -f %XSRC%/data/c++-skel.m4
|
||||
if not errorlevel 1 mv -f %XSRC%/data/c++-skel.m4 %XSRC%/data/cxx-skel.m4
|
||||
test -f %XSRC%/data/cxx-skel.m4
|
||||
if errorlevel 1 mv -f %XSRC%/data/cpp-skel.m4 %XSRC%/data/cxx-skel.m4
|
||||
test -f %XSRC%/build-aux/javacomp.sh.in
|
||||
if not errorlevel 1 mv -f %XSRC%/build-aux/javacomp.sh.in %XSRC%/build-aux/javacomp.sh-in
|
||||
test -f %XSRC%/build-aux/javacomp.sh-in
|
||||
if errorlevel 1 mv -f %XSRC%/build-aux/javacomp.sh %XSRC%/build-aux/javacomp.sh-in
|
||||
test -f %XSRC%/build-aux/javacomp.sh-in
|
||||
if errorlevel 1 mv -f %XSRC%/build-aux/javacomp.shin %XSRC%/build-aux/javacomp.sh-in
|
||||
test -f %XSRC%/build-aux/javacomp.sh-in
|
||||
if errorlevel 1 mv -f %XSRC%/build-aux/javacomp.sh_in %XSRC%/build-aux/javacomp.sh-in
|
||||
test -f %XSRC%/build-aux/javacomp.sh-in
|
||||
if errorlevel 1 mv -f %XSRC%/build-aux/javacomp.sh.in %XSRC%/build-aux/javacomp.sh-in
|
||||
test -f %XSRC%/build-aux/javaexec.sh.in
|
||||
if not errorlevel 1 mv -f %XSRC%/build-aux/javaexec.sh.in %XSRC%/build-aux/javaexec.sh-in
|
||||
test -f %XSRC%/build-aux/javaexec.sh-in
|
||||
if errorlevel 1 mv -f %XSRC%/build-aux/javaexec.sh %XSRC%/build-aux/javaexec.sh-in
|
||||
test -f %XSRC%/build-aux/javaexec.sh-in
|
||||
if errorlevel 1 mv -f %XSRC%/build-aux/javaexec.shin %XSRC%/build-aux/javaexec.sh-in
|
||||
test -f %XSRC%/build-aux/javaexec.sh-in
|
||||
if errorlevel 1 mv -f %XSRC%/build-aux/javaexec.sh_in %XSRC%/build-aux/javaexec.sh-in
|
||||
test -f %XSRC%/build-aux/javaexec.sh-in
|
||||
if errorlevel 1 mv -f %XSRC%/build-aux/javaexec_sh.in %XSRC%/build-aux/javaexec.sh-in
|
||||
test -f %XSRC%/doc/yacc.1.in
|
||||
if not errorlevel 1 mv -f %XSRC%/doc/yacc.1.in %XSRC%/doc/yacc.1-in
|
||||
test -f %XSRC%/doc/yacc.1-in
|
||||
if errorlevel 1 mv -f %XSRC%/doc/yacc.1 %XSRC%/doc/yacc.1-in
|
||||
test -f %XSRC%/doc/yacc.1-in
|
||||
if errorlevel 1 mv -f %XSRC%/doc/yacc.1in %XSRC%/doc/yacc.1-in
|
||||
test -f %XSRC%/doc/yacc.1-in
|
||||
if errorlevel 1 mv -f %XSRC%/doc/yacc.1_in %XSRC%/doc/yacc.1-in
|
||||
test -f %XSRC%/doc/yacc.1-in
|
||||
if errorlevel 1 mv -f %XSRC%/doc/yacc_1.in %XSRC%/doc/yacc.1-in
|
||||
test -f %XSRC%/etc/bench.pl.in
|
||||
if not errorlevel 1 mv -f %XSRC%/etc/bench.pl.in %XSRC%/etc/bench.pl-in
|
||||
test -f %XSRC%/etc/bench.pl-in
|
||||
if errorlevel 1 mv -f %XSRC%/etc/bench.pl %XSRC%/etc/bench.pl-in
|
||||
test -f %XSRC%/etc/bench.pl-in
|
||||
if errorlevel 1 mv -f %XSRC%/etc/bench.plin %XSRC%/etc/bench.pl-in
|
||||
test -f %XSRC%/etc/bench.pl-in
|
||||
if errorlevel 1 mv -f %XSRC%/etc/bench.pl_in %XSRC%/etc/bench.pl-in
|
||||
test -f %XSRC%/etc/bench.pl-in
|
||||
if errorlevel 1 mv -f %XSRC%/etc/bench_pl.in %XSRC%/etc/bench.pl-in
|
||||
|
||||
: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
|
||||
mv ./lalr1.cc %XSRC%/data/lalr1.cc
|
||||
sed "s/c++\.m4/cxx.m4/" %XSRC%/data/location.cc > location.cc
|
||||
if errorlevel 1 goto location_ccFileError
|
||||
mv ./location.cc %XSRC%/data/location.cc
|
||||
sed "s/c++\.m4/cxx.m4/" %XSRC%/data/glr.cc > glr.cc
|
||||
if errorlevel 1 goto glr_ccFileError
|
||||
mv ./glr.cc %XSRC%/data/glr.cc
|
||||
|
||||
Rem Fix src/getargs.c to reflect the renaming of c++-skel.m4
|
||||
sed "s/c++-skel\.m4/cxx-skel.m4/" %XSRC%/src/getargs.c > getargs.c
|
||||
if errorlevel 1 goto getargs_cFileError
|
||||
mv ./getargs.c %XSRC%/src/getargs.c
|
||||
|
||||
Rem Define DJGPP specific defs in config.hin
|
||||
echo Editing config.hin...
|
||||
test -f %XSRC%/lib/config_h.org
|
||||
if errorlevel 1 update %XSRC%/lib/config.hin %XSRC%/lib/config_h.org
|
||||
sed -f %XSRC%/djgpp/config_h.sed %XSRC%/lib/config_h.org > config.hin
|
||||
if errorlevel 1 goto SedError2
|
||||
mv -f config.hin %XSRC%/lib/config.hin
|
||||
|
||||
|
||||
Rem Fixing illicit testsuite file name.
|
||||
test -f %XSRC%/tests/c++.at
|
||||
if not errorlevel 1 mv -f %XSRC%/tests/c++.at %XSRC%/tests/cxx.at
|
||||
|
||||
test -f %XSRC%/tests/testsuite.org
|
||||
if errorlevel 1 update %XSRC%/tests/testsuite %XSRC%/tests/testsuite.org
|
||||
sed -f %XSRC%/djgpp/testsuite.sed %XSRC%/tests/testsuite.org > testsuite.tmp
|
||||
if errorlevel 1 goto SedError3
|
||||
mv -f ./testsuite.tmp %XSRC%/tests/testsuite
|
||||
|
||||
Rem Fixing illicit calc++ file names in the calc++ directory.
|
||||
test -d %XSRC%/examples/calc++
|
||||
if not errorlevel 1 mv -f %XSRC%/examples/calc++ %XSRC%/examples/calcxx
|
||||
test -d %XSRC%/examples/calcxx
|
||||
if errorlevel 1 mv -f %XSRC%/examples/calcpp %XSRC%/examples/calcxx
|
||||
test -f %XSRC%/examples/calcxx/calc++-scanner.cc
|
||||
if not errorlevel 1 mv -f %XSRC%/examples/calcxx/calc++-scanner.cc %XSRC%/examples/calcxx/calcxx-scanner.cc
|
||||
test -f %XSRC%/examples/calcxx/calcxx-scanner.cc
|
||||
if errorlevel 1 mv -f %XSRC%/examples/calcxx/calcpp-scanner.cc %XSRC%/examples/calcxx/calcxx-scanner.cc
|
||||
test -f %XSRC%/examples/calcxx/calc++-scanner.ll
|
||||
if not errorlevel 1 mv -f %XSRC%/examples/calcxx/calc++-scanner.ll %XSRC%/examples/calcxx/calcxx-scanner.ll
|
||||
test -f %XSRC%/examples/calcxx/calcxx-scanner.ll
|
||||
if errorlevel 1 mv -f %XSRC%/examples/calcxx/calcpp-scanner.ll %XSRC%/examples/calcxx/calcxx-scanner.ll
|
||||
test -f %XSRC%/examples/calcxx/calc++-driver.cc
|
||||
if not errorlevel 1 mv -f %XSRC%/examples/calcxx/calc++-driver.cc %XSRC%/examples/calcxx/calcxx-driver.cc
|
||||
test -f %XSRC%/examples/calcxx/calcxx-driver.cc
|
||||
if errorlevel 1 mv -f %XSRC%/examples/calcxx/calcpp-driver.cc %XSRC%/examples/calcxx/calcxx-driver.cc
|
||||
test -f %XSRC%/examples/calcxx/calc++-driver.hh
|
||||
if not errorlevel 1 mv -f %XSRC%/examples/calcxx/calc++-driver.hh %XSRC%/examples/calcxx/calcxx-driver.hh
|
||||
test -f %XSRC%/examples/calcxx/calcxx-driver.hh
|
||||
if errorlevel 1 mv -f %XSRC%/examples/calcxx/calcpp-driver.hh %XSRC%/examples/calcxx/calcxx-driver.hh
|
||||
test -f %XSRC%/examples/calcxx/calc++-parser.cc
|
||||
if not errorlevel 1 mv -f %XSRC%/examples/calcxx/calc++-parser.cc %XSRC%/examples/calcxx/calcxx-parser.cc
|
||||
test -f %XSRC%/examples/calcxx/calcxx-parser.cc
|
||||
if errorlevel 1 mv -f %XSRC%/examples/calcxx/calcpp-parser.cc %XSRC%/examples/calcxx/calcxx-parser.cc
|
||||
test -f %XSRC%/examples/calcxx/calc++-parser.hh
|
||||
if not errorlevel 1 mv -f %XSRC%/examples/calcxx/calc++-parser.hh %XSRC%/examples/calcxx/calcxx-parser.hh
|
||||
test -f %XSRC%/examples/calcxx/calcxx-parser.hh
|
||||
if errorlevel 1 mv -f %XSRC%/examples/calcxx/calcpp-parser.hh %XSRC%/examples/calcxx/calcxx-parser.hh
|
||||
test -f %XSRC%/examples/calcxx/calc++-parser.stamp
|
||||
if not errorlevel 1 mv -f %XSRC%/examples/calcxx/calc++-parser.stamp %XSRC%/examples/calcxx/calcxx-parser.stamp
|
||||
test -f %XSRC%/examples/calcxx/calcxx-parser.stamp
|
||||
if errorlevel 1 mv -f %XSRC%/examples/calcxx/calcpp-parser.stamp %XSRC%/examples/calcxx/calcxx-parser.stamp
|
||||
test -f %XSRC%/examples/calcxx/calc++-parser.yy
|
||||
if not errorlevel 1 mv -f %XSRC%/examples/calcxx/calc++-parser.yy %XSRC%/examples/calcxx/calcxx-parser.yy
|
||||
test -f %XSRC%/examples/calcxx/calcxx-parser.yy
|
||||
if errorlevel 1 mv -f %XSRC%/examples/calcxx/calcpp-parser.yy %XSRC%/examples/calcxx/calcxx-parser.yy
|
||||
test -f %XSRC%/examples/calcxx/calc++.cc
|
||||
if not errorlevel 1 mv -f %XSRC%/examples/calcxx/calc++.cc %XSRC%/examples/calcxx/calcxx.cc
|
||||
test -f %XSRC%/examples/calcxx/calcxx.cc
|
||||
if errorlevel 1 mv -f %XSRC%/examples/calcxx/calcpp.cc %XSRC%/examples/calcxx/calcxx.cc
|
||||
|
||||
Rem Fixing #include lines in calcxx files.
|
||||
sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx.cc > calcxx.cc
|
||||
if errorlevel 1 goto calcxxFileError
|
||||
mv ./calcxx.cc %XSRC%/examples/calcxx/calcxx.cc
|
||||
sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-driver.cc > calcxx-driver.cc
|
||||
if errorlevel 1 goto calcxxFileError
|
||||
mv ./calcxx-driver.cc %XSRC%/examples/calcxx/calcxx-driver.cc
|
||||
sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-driver.hh > calcxx-driver.hh
|
||||
if errorlevel 1 goto calcxxFileError
|
||||
mv ./calcxx-driver.hh %XSRC%/examples/calcxx/calcxx-driver.hh
|
||||
sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-parser.cc > calcxx-parser.cc
|
||||
if errorlevel 1 goto calcxxFileError
|
||||
mv ./calcxx-parser.cc %XSRC%/examples/calcxx/calcxx-parser.cc
|
||||
sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-parser.hh > calcxx-parser.hh
|
||||
if errorlevel 1 goto calcxxFileError
|
||||
mv ./calcxx-parser.hh %XSRC%/examples/calcxx/calcxx-parser.hh
|
||||
:sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-parser.yy > calcxx-parser.yy
|
||||
:if errorlevel 1 goto calcxxFileError
|
||||
:mv ./calcxx-parser.yy %XSRC%/examples/calcxx/calcxx-parser.yy
|
||||
sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-scanner.cc > calcxx-scanner.cc
|
||||
if errorlevel 1 goto calcxxFileError
|
||||
mv ./calcxx-scanner.cc %XSRC%/examples/calcxx/calcxx-scanner.cc
|
||||
:sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-scanner.ll > calcxx-scanner.ll
|
||||
:if errorlevel 1 goto calcxxFileError
|
||||
:mv ./calcxx-scanner.ll %XSRC%/examples/calcxx/calcxx-scanner.ll
|
||||
sed "s/calc++/calcxx/" %XSRC%/examples/calcxx/test > test
|
||||
if errorlevel 1 goto calcxxFileError
|
||||
mv ./test %XSRC%/examples/calcxx/test
|
||||
|
||||
|
||||
Rem Fixing the scanner files to make file names 8.3 valid.
|
||||
Rem Use only if you want to change the scan-gram.l and scan-skel.l files.
|
||||
: sed "/outfile=/s/\.yy/yy/" %XSRC%/src/scan-gram.l > scan-gram.l
|
||||
: if errorlevel 1 goto ScannerFileError
|
||||
: mv ./scan-gram.l %XSRC%/src/scan-gram.l
|
||||
: sed "/outfile=/s/\.yy/yy/" %XSRC%/src/scan-skel.l > scan-skel.l
|
||||
: if errorlevel 1 goto ScannerFileError
|
||||
: mv ./scan-skel.l %XSRC%/src/scan-skel.l
|
||||
|
||||
|
||||
Rem This is required because DOS/Windows are case-insensitive
|
||||
Rem to file names, and "make install" will do nothing if Make
|
||||
Rem finds a file called `install'.
|
||||
if exist INSTALL ren INSTALL INSTALL.txt
|
||||
|
||||
Rem Set SHELL to a sane default or some configure tests stop working
|
||||
Rem if the package is configured across partitions.
|
||||
if not "%SHELL%" == "" goto HomeName
|
||||
set SHELL=/bin/sh
|
||||
if not "%SHELL%" == "/bin/sh" goto SmallEnv
|
||||
echo No SHELL found in the environment, using default value
|
||||
|
||||
:HomeName
|
||||
Rem Set HOME to a sane default so configure stops complaining.
|
||||
if not "%HOME%" == "" goto HostName
|
||||
set HOME=%XSRC%/djgpp
|
||||
if not "%HOME%" == "%XSRC%/djgpp" goto SmallEnv
|
||||
echo No HOME found in the environment, using default value
|
||||
|
||||
:HostName
|
||||
Rem Set HOSTNAME so it shows in config.status
|
||||
if not "%HOSTNAME%" == "" goto hostdone
|
||||
if "%windir%" == "" goto msdos
|
||||
set OS=MS-Windows
|
||||
if not "%OS%" == "MS-Windows" goto SmallEnv
|
||||
goto haveos
|
||||
:msdos
|
||||
set OS=MS-DOS
|
||||
if not "%OS%" == "MS-DOS" goto SmallEnv
|
||||
:haveos
|
||||
if not "%USERNAME%" == "" goto haveuname
|
||||
if not "%USER%" == "" goto haveuser
|
||||
echo No USERNAME and no USER found in the environment, using default values
|
||||
set HOSTNAME=Unknown PC
|
||||
if not "%HOSTNAME%" == "Unknown PC" goto SmallEnv
|
||||
goto userdone
|
||||
:haveuser
|
||||
set HOSTNAME=%USER%'s PC
|
||||
if not "%HOSTNAME%" == "%USER%'s PC" goto SmallEnv
|
||||
goto userdone
|
||||
:haveuname
|
||||
set HOSTNAME=%USERNAME%'s PC
|
||||
if not "%HOSTNAME%" == "%USERNAME%'s PC" goto SmallEnv
|
||||
:userdone
|
||||
set _HOSTNAME=%HOSTNAME%, %OS%
|
||||
if not "%_HOSTNAME%" == "%HOSTNAME%, %OS%" goto SmallEnv
|
||||
set HOSTNAME=%_HOSTNAME%
|
||||
:hostdone
|
||||
set _HOSTNAME=
|
||||
set OS=
|
||||
|
||||
Rem install-sh is required by the configure script but clashes with the
|
||||
Rem various Makefile install-foo targets, so we MUST have it before the
|
||||
Rem script runs and rename it afterwards
|
||||
test -f %XSRC%/install-sh
|
||||
if not errorlevel 1 goto NoRen0
|
||||
test -f %XSRC%/install-sh.sh
|
||||
if not errorlevel 1 mv -f %XSRC%/install-sh.sh %XSRC%/install-sh
|
||||
:NoRen0
|
||||
|
||||
if "%NLS%" == "disabled" goto WithoutNLS
|
||||
|
||||
:WithNLS
|
||||
Rem Check for the needed libraries and binaries.
|
||||
test -x /dev/env/DJDIR/bin/msgfmt.exe
|
||||
if errorlevel 1 goto MissingNLSTools
|
||||
test -x /dev/env/DJDIR/bin/xgettext.exe
|
||||
if errorlevel 1 goto MissingNLSTools
|
||||
test -f /dev/env/DJDIR/include/libcharset.h
|
||||
if errorlevel 1 goto MissingNLSTools
|
||||
test -f /dev/env/DJDIR/lib/libcharset.a
|
||||
if errorlevel 1 goto MissingNLSTools
|
||||
test -f /dev/env/DJDIR/include/iconv.h
|
||||
if errorlevel 1 goto MissingNLSTools
|
||||
test -f /dev/env/DJDIR/lib/libiconv.a
|
||||
if errorlevel 1 goto MissingNLSTools
|
||||
test -f /dev/env/DJDIR/include/libintl.h
|
||||
if errorlevel 1 goto MissingNLSTools
|
||||
test -f /dev/env/DJDIR/lib/libintl.a
|
||||
if errorlevel 1 goto MissingNLSTools
|
||||
|
||||
Rem Recreate the files in the %XSRC%/po subdir with our ported tools.
|
||||
redir -e /dev/null rm %XSRC%/po/*.gmo
|
||||
redir -e /dev/null rm %XSRC%/po/bison.pot
|
||||
redir -e /dev/null rm %XSRC%/po/cat-id-tbl.c
|
||||
redir -e /dev/null rm %XSRC%/po/stamp-cat-id
|
||||
|
||||
Rem Update the arguments file for the configure script.
|
||||
Rem We prefer without-included-gettext because libintl.a from gettext package
|
||||
Rem is the only one that is guaranteed to have been ported to DJGPP.
|
||||
echo --enable-nls --without-included-gettext >> args
|
||||
goto ConfigurePackage
|
||||
|
||||
:MissingNLSTools
|
||||
echo Needed libs/tools for NLS not found. Configuring without NLS.
|
||||
:WithoutNLS
|
||||
Rem Update the arguments file for the configure script.
|
||||
echo --disable-nls >> args
|
||||
|
||||
:ConfigurePackage
|
||||
echo Running the ./configure script...
|
||||
sh ./configure @args
|
||||
if errorlevel 1 goto CfgError
|
||||
rm args
|
||||
echo Done.
|
||||
goto End
|
||||
|
||||
:lalr1_ccFileError
|
||||
echo ./data/lalr1.cc file editing failed!
|
||||
goto End
|
||||
|
||||
:glr_ccFileError
|
||||
echo ./data/glr.cc file editing failed!
|
||||
goto End
|
||||
|
||||
:getargs_cFileError
|
||||
echo ./src/getargs.c file editing failed!
|
||||
goto End
|
||||
|
||||
:location_ccFileError
|
||||
echo ./data/location.cc file editing failed!
|
||||
goto End
|
||||
|
||||
:calcxxFileError
|
||||
echo ./examples/calcxx file editing failed!
|
||||
goto End
|
||||
|
||||
:ScannerFileError
|
||||
echo ./scanner file editing failed!
|
||||
goto End
|
||||
|
||||
:SedError
|
||||
echo ./configure script editing failed!
|
||||
goto End
|
||||
|
||||
:SedError2
|
||||
echo ./lib/config.hin editing failed!
|
||||
goto End
|
||||
|
||||
:SedError3
|
||||
echo ./tests/testsuite editing failed!
|
||||
goto End
|
||||
|
||||
:CfgError
|
||||
echo ./configure script exited abnormally!
|
||||
goto End
|
||||
|
||||
:SmallEnv
|
||||
echo Your environment size is too small. Enlarge it and run me again.
|
||||
echo Configuration NOT done!
|
||||
|
||||
:End
|
||||
test -f %XSRC%/install-sh.sh
|
||||
if not errorlevel 1 goto NoRen1
|
||||
test -f %XSRC%/install-sh
|
||||
if not errorlevel 1 mv -f %XSRC%/install-sh %XSRC%/install-sh.sh
|
||||
:NoRen1
|
||||
if "%SHELL%" == "/bin/sh" set SHELL=
|
||||
if "%HOME%" == "%XSRC%/djgpp" set HOME=
|
||||
set CONFIG_SITE=
|
||||
set HOSTNAME=
|
||||
set NLS=
|
||||
set XSRC=
|
||||
190
djgpp/config.sed
190
djgpp/config.sed
@@ -1,190 +0,0 @@
|
||||
# DJGPP specific configuration file.
|
||||
# Sed script for additional DJGPP specific editing
|
||||
# of the configure script generated by autoconf 2.62.
|
||||
|
||||
# Copyright (C) 2005-2015, 2018 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
# Additional editing of Makefiles
|
||||
/^eval sed.*ac_file_inputs.*tmp\/out \\$/ {
|
||||
:loop
|
||||
n
|
||||
/^$/!b loop
|
||||
a\
|
||||
cat > "$tmp/subs-djgpp.sed" << eof_djgpp\
|
||||
# DJGPP specific Makefile changes.\
|
||||
s,\\.deps,_deps,g\
|
||||
s,\\.libs,_libs,g\
|
||||
s,\\.new\\.,_new.,g\
|
||||
s,\\.old\\.,_old.,g\
|
||||
s,\\.tab\\.,_tab.,g\
|
||||
s,c++\\.at,cxx.at,g\
|
||||
s,c++\\.m4,cxx.m4,g\
|
||||
s,c++-skel\\.m4,cxx-skel.m4,g\
|
||||
s,calc++,calcxx,g\
|
||||
s,scan-gram-c,c-scan-gram,g\
|
||||
s,scan-skel-c,c-scan-skel,g\
|
||||
s,inttypes_,_inttypes,g\
|
||||
s,javacomp\\.sh\\.in,javacomp.sh-in,g\
|
||||
s,javaexec\\.sh\\.in,javaexec.sh-in,g\
|
||||
s,yacc\\.1\\.in,yacc.1-in,g\
|
||||
s,bench\\.pl\\.in,bench.pl-in,g\
|
||||
s,Makefile\\.am\\.in,Makefile.am-in,g\
|
||||
s,Makefile\\.in\\.in,Makefile.in-in,g\
|
||||
/^\\.y\\.c:/,/^$/ {\
|
||||
/\\\$(YACCCOMPILE)/ {\
|
||||
a\\\\\
|
||||
-@test -f y.tab.c && mv -f y.tab.c y_tab.c\\\\\
|
||||
-@test -f y.tab.h && mv -f y.tab.h y_tab.h\
|
||||
}\
|
||||
}\
|
||||
/^libbison.a:/ i\\\\\
|
||||
\\$(top_srcdir)/djgpp/subpipe.c: \\$(top_srcdir)/djgpp/subpipe.h\\\\\
|
||||
subpipe.o: \\$(top_srcdir)/djgpp/subpipe.c \\$(top_srcdir)/djgpp/subpipe.h\\\\\
|
||||
\\$(COMPILE) -c \\$<\
|
||||
/^yacc:/ i\\\\\
|
||||
yacc.bat:\\\\\
|
||||
echo "bison\\$(EXEEXT) -y %1 %2 %3 %4 %5 %6 %7 %8 %9" >\\$@\
|
||||
/^bin_SCRIPTS =/s/$/ yacc.bat/\
|
||||
/^MOSTLYCLEANFILES = yacc/s/$/ yacc.bat/\
|
||||
/cross-options.texi:/,/^$/ s|bison|&.exe|g\
|
||||
/^\\.x\\.1:/,/^$/ s|\\$program|&.exe|g\
|
||||
eof_djgpp\
|
||||
sed -f "\$tmp/subs-djgpp.sed" \$tmp/out > \$tmp/out.djgpp\
|
||||
mv -f \$tmp/out.djgpp \$tmp/out
|
||||
}
|
||||
|
||||
# Makefile.in.in is renamed to Makefile.in-in.
|
||||
/ac_config_files=/ {
|
||||
/runtime-po/!s|po/Makefile\.in|&:po/Makefile.in-in|
|
||||
s|runtime-po/Makefile\.in|&:runtime-po/Makefile.in-in|
|
||||
s|javacomp\.sh\.in|javacomp.sh-in|
|
||||
s|javaexec\.sh\.in|javaexec.sh-in|
|
||||
s|doc/yacc\.1|&:doc/yacc.1-in|
|
||||
s|etc/bench.pl|&:etc/bench.pl-in|
|
||||
}
|
||||
|
||||
/CONFIG_FILES=/ {
|
||||
/runtime-po/!s|po/Makefile\.in|&:po/Makefile.in-in|2
|
||||
s|runtime-po/Makefile\.in|&:runtime-po/Makefile.in-in|2
|
||||
s|javacomp\.sh\.in|javacomp.sh-in|
|
||||
s|javaexec\.sh\.in|javaexec.sh-in|
|
||||
s|doc/yacc\.1|&:doc/yacc.1-in|2
|
||||
s|etc/bench\.pl|&:etc/bench.pl-in|2
|
||||
}
|
||||
|
||||
# We always use _deps and _libs instead of .deps and .libs, because
|
||||
# the latter is an invalid name on 8+3 MS-DOS file system. This makes
|
||||
# the generated Makefiles good for every DJGPP installation, not only
|
||||
# the one where the package was configured (which could happen to be
|
||||
# a Windows box, where leading dots in file names are allowed).
|
||||
/^rmdir[ ]*\.tst/ i\
|
||||
am__leading_dot=_
|
||||
|
||||
# Replace (command) > /dev/null with `command > /dev/null`, since
|
||||
# parenthesized commands always return zero status in the ported Bash,
|
||||
# even if the named command doesn't exist
|
||||
/if ([^|;`]*null/{
|
||||
s,(,`,
|
||||
s,),,
|
||||
/null[ ]*2>&1/ s,2>&1,&`,
|
||||
/null.*null/ s,null.*null,&`,
|
||||
/null.*null/ !{
|
||||
/null[ ]*2>&1/ !s,null,&`,
|
||||
}
|
||||
}
|
||||
|
||||
# DOS-style absolute file names should be supported as well
|
||||
/\*) top_srcdir=/s,/\*,[\\\\/]* | ?:[\\\\/]*,
|
||||
|
||||
# The following two items are changes needed for configuring
|
||||
# and compiling across partitions.
|
||||
# 1) The given srcdir value is always translated from the
|
||||
# "x:" syntax into "/dev/x" syntax while we run configure.
|
||||
/^[ ]*-srcdir=\*.*$/ a\
|
||||
ac_optarg=`echo "$ac_optarg" | sed "s,^\\([A-Za-z]\\):,/dev/\\1,"`
|
||||
/set X `ls -Lt \$srcdir/ i\
|
||||
if `echo $srcdir | grep "^/dev/" - > /dev/null`; then\
|
||||
srcdir=`echo "$srcdir" | sed -e "s%^/dev/%%" -e "s%/%:/%"`\
|
||||
fi
|
||||
|
||||
# Autoconf 2.52e generated configure scripts
|
||||
# write absolute paths into Makefiles and bison.in
|
||||
# making them useless for DJGPP installations for
|
||||
# which the package has not been configured for.
|
||||
/MISSING=/,/^$/ {
|
||||
/^fi$/ a\
|
||||
am_missing_run=`echo "$am_missing_run" | sed 's%/dev/.*/bison[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%${top_srcdir}%;s%.:.*/bison[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%${top_srcdir}%'`
|
||||
}
|
||||
/^install_sh=/a\
|
||||
install_sh=`echo "$install_sh" | sed 's%/dev/.*/bison[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%${top_srcdir}%;s%.:.*/bison[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%${top_srcdir}%'`
|
||||
|
||||
# This will only work if the assumption that the
|
||||
# testsuite is ran from the following path:
|
||||
# ${top_srcdir}/tests/testsuite.dir
|
||||
# holds. The explicit names are of no importance.
|
||||
# ../../. == ${top_srcdir}
|
||||
#/^esac$/,/^ac_abs_srcdir=/ {
|
||||
/^ac_abs_srcdir=/ i\
|
||||
ac_abs_builddir=`echo "$ac_abs_builddir" | sed "s%/dev/.*/bison[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%../../.%;s%.:.*/bison[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%../../.%"`\
|
||||
ac_abs_top_builddir=`echo "$ac_abs_top_builddir" | sed "s%/dev/.*/bison[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%../../..%;s%.:.*/bison[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%../../..%"`\
|
||||
ac_abs_top_srcdir=`echo "$ac_abs_top_srcdir" | sed "s%/dev/.*/bison[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%../../..%;s%.:.*/bison[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%../../..%"`
|
||||
#ac_abs_srcdir=`echo "$ac_abs_srcdir" | sed "s%/dev/.*/bison[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%../../.%;s%.:.*/bison[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%../../.%"`
|
||||
/^ac_abs_srcdir=/ a\
|
||||
for dj_dir in $ac_abs_builddir $ac_abs_top_builddir $ac_abs_top_srcdir $ac_abs_srcdir\
|
||||
do\
|
||||
ac_abs_builddir=`echo "$ac_abs_builddir" | sed "s%//%/%g"`\
|
||||
ac_abs_top_builddir=`echo "$ac_abs_top_builddir" | sed "s%//%/%g"`\
|
||||
ac_abs_top_srcdir=`echo "$ac_abs_top_srcdir" | sed "s%//%/%g"`\
|
||||
ac_abs_srcdir=`echo "$ac_abs_srcdir" | sed "s%//%/%g"`\
|
||||
done
|
||||
|
||||
# Add DJGPP version information.
|
||||
/^#define VERSION/ s/\$VERSION/& (DJGPP port (r1))/
|
||||
|
||||
# We need makeinfo to make the html formated docs.
|
||||
/\$am_missing_run[ ]*makeinfo/ s,\$am_missing_run,,
|
||||
|
||||
# The path to the FORTRAN compiler and libraries
|
||||
# shall contain no absolute path reference so it
|
||||
# will be good for all djgpp installations.
|
||||
/^FLIBS="\$ac_cv_flibs"/ i\
|
||||
ac_djgpp_path=`echo "$DJDIR" | sed 's%\\\\\\%/%g' | tr $as_cr_LETTERS $as_cr_letters`\
|
||||
ac_cv_flibs=`echo "$ac_cv_flibs" | sed "s%-L$ac_djgpp_path%-L/dev/env/DJDIR%g"`
|
||||
|
||||
# Autoconf generated configure scripts write absolute
|
||||
# paths of certain header files into Makefiles making
|
||||
# them useless for DJGPP installations for which the
|
||||
# package has not been configured for.
|
||||
/^.*echo "\$as_me:\$LINENO: result: \$gl_cv_absolute_.*$/ {
|
||||
h
|
||||
s,^.*\(gl_cv_absolute_\)\([a-z0-9_]*\)\(_h\).*$,\1\2\3=`echo $\1\2\3 | sed "s%[^:]:.*/include/%/dev/env/DJDIR/include/%"`,
|
||||
G
|
||||
}
|
||||
/^.*echo "\$as_me:\$LINENO: result: \$gl_cv_full_.*$/ {
|
||||
h
|
||||
s,^.*\(gl_cv_full_\)\([a-z0-9_]*\)\(_h\).*$,\1\2\3=`echo $\1\2\3 | sed "s%[^:]:.*/include/%/dev/env/DJDIR/include/%"`,
|
||||
G
|
||||
}
|
||||
|
||||
# The following is not a valid DOS file name
|
||||
s/calc++/calcxx/g
|
||||
|
||||
# The CR test for awk does not work for DJGPP.
|
||||
/^ac_cs_awk_cr=/,/^$/ {
|
||||
/^fi$/ a\
|
||||
ac_cs_awk_cr=$ac_cr
|
||||
}
|
||||
@@ -1,85 +0,0 @@
|
||||
#! /bin/sh
|
||||
|
||||
# This is the config.site file for configuring GNU packages
|
||||
# which are to be built with DJGPP tools.
|
||||
|
||||
# Copyright (C) 2005-2015, 2018 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
# Include the djgpp subdirectory in PATH, so that getconf is found
|
||||
PATH="$srcdir/djgpp:$PATH"
|
||||
|
||||
# These two variables are required, otherwise looking for
|
||||
# programs along the PATH will not work.
|
||||
PATH_SEPARATOR=:
|
||||
PATH_EXPAND=y
|
||||
|
||||
# This is required in for "test -f foo" to find foo.exe
|
||||
export TEST_FINDS_EXE=y
|
||||
|
||||
# The root of the DJGPP tree serves as the default prefix
|
||||
test "x$prefix" = xNONE && prefix='/dev/env/DJDIR'
|
||||
|
||||
# This is required for config.status script to be run, since
|
||||
# ./configure runs it by invoking ${CONFIG_SHELL-/bin/sh}
|
||||
CONFIG_SHELL=${CONFIG_SHELL='sh'}
|
||||
|
||||
# These are set here so the generated Makefile's will be good
|
||||
# for every DJGPP installation, not only the one where the
|
||||
# package was configured.
|
||||
# $INSTALL must be an absolute path name, otherwise config.status
|
||||
# will try to prepend ./ and ../ to it when it goes into subdirs.
|
||||
INSTALL=${INSTALL='/dev/env/DJDIR/bin/ginstall -c'}
|
||||
RANLIB=${RANLIB='ranlib'}
|
||||
GMSGFMT=${GMSGFMT='/dev/env/DJDIR/bin/msgfmt'}
|
||||
MSGFMT=${MSGFMT='/dev/env/DJDIR/bin/msgfmt'}
|
||||
XGETTEXT=${XGETTEXT='/dev/env/DJDIR/bin/xgettext'}
|
||||
AWK=${AWK='gawk'}
|
||||
|
||||
# A sane default for emacs.
|
||||
ac_cv_path_EMACS=${EMACS='/dev/env/DJDIR/gnu/emacs/bin/emacs'}
|
||||
|
||||
# A sane default for m4.
|
||||
ac_cv_path_M4=${M4='/dev/env/DJDIR/bin/m4'}
|
||||
|
||||
# A sane default for grep.
|
||||
ac_cv_path_GREP=${GREP='/dev/env/DJDIR/bin/grep'}
|
||||
|
||||
# A sane default for egrep.
|
||||
ac_cv_path_EGREP=${EGREP='/dev/env/DJDIR/bin/egrep'}
|
||||
|
||||
# A sane default for fgrep.
|
||||
ac_cv_path_FGREP=${FGREP='/dev/env/DJDIR/bin/fgrep'}
|
||||
|
||||
# A sane default for sed.
|
||||
ac_cv_path_SED=${SED='/dev/env/DJDIR/bin/sed'}
|
||||
|
||||
# A sane default for mkdir.
|
||||
ac_cv_path_mkdir=${MKDIR_P='/dev/env/DJDIR/bin/mkdir -p'}
|
||||
|
||||
# These are set here so the generated libtool will be good
|
||||
# for every DJGPP installation, not only the one where the
|
||||
# package was configured.
|
||||
NM=${NM='nm'}
|
||||
LD=${LD='ld'}
|
||||
|
||||
# Force the test for 'ln -s' to report 'cp -pf'.
|
||||
ac_cv_prog_LN_S='cp -pf'
|
||||
|
||||
# There is no fork and vfork functionality.
|
||||
ac_cv_func_fork=no
|
||||
ac_cv_func_vfork=no
|
||||
ac_cv_func_pipe=no
|
||||
@@ -1,28 +0,0 @@
|
||||
# sed script for DJGPP specific editing of config.hin
|
||||
|
||||
# Copyright (C) 2005-2015, 2018 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
$ a\
|
||||
\
|
||||
\
|
||||
/* DJGPP specific defines. */\
|
||||
\
|
||||
#include <unistd.h>\
|
||||
#define TAB_EXT ((pathconf(NULL, _PC_NAME_MAX) > 12) ? ".tab" : "_tab")\
|
||||
#define OUTPUT_EXT ((pathconf(NULL, _PC_NAME_MAX) > 12) ? ".output" : ".out")\
|
||||
\
|
||||
#define DEFAULT_TMPDIR "/dev/env/DJDIR/tmp"
|
||||
@@ -1,87 +0,0 @@
|
||||
@echo 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 Copyright (C) 2005-2015, 2018 Free Software Foundation, Inc.
|
||||
Rem
|
||||
Rem This program is free software: you can redistribute it and/or modify
|
||||
Rem it under the terms of the GNU General Public License as published by
|
||||
Rem the Free Software Foundation, either version 3 of the License, or
|
||||
Rem (at your option) any later version.
|
||||
Rem
|
||||
Rem This program is distributed in the hope that it will be useful,
|
||||
Rem but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
Rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
Rem GNU General Public License for more details.
|
||||
Rem
|
||||
Rem You should have received a copy of the GNU General Public License
|
||||
Rem along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
Rem
|
||||
Rem
|
||||
Rem Invoke like this:
|
||||
Rem
|
||||
Rem djunpack bison-XYZ.tar.gz
|
||||
Rem or
|
||||
Rem djunpack bison-XYZ.tar.bz2
|
||||
Rem
|
||||
Rem where XYZ is the version number. If the argument includes leading
|
||||
Rem directories, it MUST use backslashes, not forward slashes.
|
||||
Rem
|
||||
|
||||
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
|
||||
@@ -1,27 +0,0 @@
|
||||
@V@/build-aux/javacomp.sh.in @V@/build-aux/javacomp.sh-in
|
||||
@V@/build-aux/javaexec.sh.in @V@/build-aux/javaexec.sh-in
|
||||
@V@/data/c++-skel.m4 @V@/data/cxx-skel.m4
|
||||
@V@/data/c++.m4 @V@/data/cxx.m4
|
||||
@V@/doc/yacc.1.in @V@/doc/yacc.1-in
|
||||
@V@/etc/bench.pl.in @V@/etc/bench.pl-in
|
||||
@V@/examples/calc++/ @V@/examples/calcxx/
|
||||
@V@/examples/calc++/Makefile.am @V@/examples/calcxx/Makefile.am
|
||||
@V@/examples/calc++/Makefile.in @V@/examples/calcxx/Makefile.in
|
||||
@V@/examples/calc++/calc++-scanner.cc @V@/examples/calcxx/calcxx-scanner.cc
|
||||
@V@/examples/calc++/calc++-scanner.ll @V@/examples/calcxx/calcxx-scanner.ll
|
||||
@V@/examples/calc++/calc++.cc @V@/examples/calcxx/calcxx.cc
|
||||
@V@/examples/calc++/calc++-driver.hh @V@/examples/calcxx/calcxx-driver.hh
|
||||
@V@/examples/calc++/calc++-driver.cc @V@/examples/calcxx/calcxx-driver.cc
|
||||
@V@/examples/calc++/stack.hh @V@/examples/calcxx/stack.hh
|
||||
@V@/examples/calc++/position.hh @V@/examples/calcxx/position.hh
|
||||
@V@/examples/calc++/location.hh @V@/examples/calcxx/location.hh
|
||||
@V@/examples/calc++/calc++-parser.hh @V@/examples/calcxx/calcxx-parser.hh
|
||||
@V@/examples/calc++/calc++-parser.cc @V@/examples/calcxx/calcxx-parser.cc
|
||||
@V@/examples/calc++/calc++-parser.stamp @V@/examples/calcxx/calcxx-parser.stamp
|
||||
@V@/examples/calc++/calc++-parser.yy @V@/examples/calcxx/calcxx-parser.yy
|
||||
@V@/examples/calc++/test @V@/examples/calcxx/test
|
||||
@V@/po/Makefile.in.in @V@/po/Makefile.in-in
|
||||
@V@/runtime-po/Makefile.in.in @V@/runtime-po/Makefile.in-in
|
||||
@V@/src/scan-gram-c.c @V@/src/c-scan-gram.c
|
||||
@V@/src/scan-skel-c.c @V@/src/c-scan-skel.c
|
||||
@V@/tests/c++.at @V@/tests/cxx.at
|
||||
@@ -1,27 +0,0 @@
|
||||
## Copyright (C) 2008-2015, 2018 Free Software Foundation, Inc.
|
||||
|
||||
## This program is free software: you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License as published by
|
||||
## the Free Software Foundation, either version 3 of the License, or
|
||||
## (at your option) any later version.
|
||||
##
|
||||
## This program is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
## GNU General Public License for more details.
|
||||
##
|
||||
## You should have received a copy of the GNU General Public License
|
||||
## along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
EXTRA_DIST += \
|
||||
djgpp/Makefile.maint \
|
||||
djgpp/README.in \
|
||||
djgpp/config.bat \
|
||||
djgpp/config.sed \
|
||||
djgpp/config.site \
|
||||
djgpp/config_h.sed \
|
||||
djgpp/djunpack.bat \
|
||||
djgpp/fnchange.lst \
|
||||
djgpp/subpipe.c \
|
||||
djgpp/subpipe.h \
|
||||
djgpp/testsuite.sed
|
||||
293
djgpp/subpipe.c
293
djgpp/subpipe.c
@@ -1,293 +0,0 @@
|
||||
/* Subprocesses with pipes.
|
||||
|
||||
Copyright (C) 2005-2015, 2018 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Juan Manuel Guerrero <juan.guerrero@gmx.de>. */
|
||||
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "subpipe.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <process.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include "xalloc.h"
|
||||
|
||||
|
||||
#ifndef STDIN_FILENO
|
||||
# define STDIN_FILENO 0
|
||||
#endif
|
||||
#ifndef STDOUT_FILENO
|
||||
# define STDOUT_FILENO 1
|
||||
#endif
|
||||
|
||||
|
||||
#include "error.h"
|
||||
|
||||
#include "gettext.h"
|
||||
#define _(Msgid) gettext (Msgid)
|
||||
|
||||
|
||||
/* Initialize this module. */
|
||||
|
||||
|
||||
static int old_stdin;
|
||||
static int old_stdout;
|
||||
static char **arguments;
|
||||
static char tmp_file_name[2][L_tmpnam];
|
||||
|
||||
#define remove_tmp_file(fd, name) \
|
||||
do { \
|
||||
close ((fd)); \
|
||||
if (unlink ((name))) \
|
||||
error (EXIT_FAILURE, 0, _("removing of '%s' failed"), (name)); \
|
||||
} while (0)
|
||||
|
||||
|
||||
void
|
||||
init_subpipe(void)
|
||||
{
|
||||
char *tmpdir;
|
||||
int fd;
|
||||
|
||||
tmpdir = getenv("TMPDIR");
|
||||
if (tmpdir == NULL)
|
||||
tmpdir = getenv("TMP");
|
||||
if (tmpdir == NULL)
|
||||
tmpdir = getenv("TEMP");
|
||||
if (access(tmpdir, D_OK))
|
||||
tmpdir = ".";
|
||||
|
||||
strcpy(tmp_file_name[0], tmpdir);
|
||||
strcat(tmp_file_name[0], "/bnXXXXXX");
|
||||
fd = mkstemp(tmp_file_name[0]);
|
||||
if (fd < 0)
|
||||
error(EXIT_FAILURE, 0, _("creation of a temporary file failed"));
|
||||
close (fd);
|
||||
|
||||
strcpy(tmp_file_name[1], tmpdir);
|
||||
strcat(tmp_file_name[1], "/bnXXXXXX");
|
||||
fd = mkstemp(tmp_file_name[1]);
|
||||
if (fd < 0)
|
||||
error(EXIT_FAILURE, 0, _("creation of a temporary file failed"));
|
||||
close (fd);
|
||||
}
|
||||
|
||||
|
||||
/* Create a subprocess that is run as a filter. ARGV is the
|
||||
NULL-terminated argument vector for the subprocess. Store read and
|
||||
write file descriptors for communication with the subprocess into
|
||||
FD[0] and FD[1]: input meant for the process can be written into
|
||||
FD[0], and output from the process can be read from FD[1]. Return
|
||||
the subprocess id.
|
||||
|
||||
Because DOS has neither fork nor pipe functionality to run the subprocess
|
||||
as a filter, the filter is reproduced using temporary files. First bison's
|
||||
stdout is redirected to a temporary file. After bison has produced all of
|
||||
is output, this file is closed and connected to m4's stdin. All m4's output
|
||||
is redirected from m4's stdout to a second temporary file and reopened as
|
||||
bison's stdin. */
|
||||
|
||||
pid_t
|
||||
create_subpipe(char const *const *argv, int fd[2])
|
||||
{
|
||||
int argc;
|
||||
int from_in_fd; /* pipe from bison to m4. */
|
||||
pid_t pid;
|
||||
|
||||
|
||||
pid = getpid();
|
||||
|
||||
/*
|
||||
* Save original stdin and stdout
|
||||
* for later restauration.
|
||||
*/
|
||||
old_stdin = dup(STDIN_FILENO);
|
||||
if (old_stdin < 0)
|
||||
error(EXIT_FAILURE, 0, _("saving stdin failed"));
|
||||
|
||||
old_stdout = dup(STDOUT_FILENO);
|
||||
if (old_stdout < 0)
|
||||
error(EXIT_FAILURE, 0, _("saving stdout failed"));
|
||||
|
||||
/*
|
||||
* Save argv for later use.
|
||||
*/
|
||||
for (argc = 0; argv[argc]; argc++)
|
||||
;
|
||||
argc++;
|
||||
arguments = xmalloc(argc * sizeof(arguments[0]));
|
||||
for (argc = 0; argv[argc]; argc++)
|
||||
{
|
||||
arguments[argc] = xmalloc((strlen(argv[argc]) + 1) * sizeof(arguments[0][0]));
|
||||
strcpy(arguments[argc], argv[argc]);
|
||||
}
|
||||
arguments[argc] = NULL;
|
||||
|
||||
/*
|
||||
* All bison's output will be gathered in this temporary file
|
||||
* and will be redirected to m4's stdin.
|
||||
*/
|
||||
from_in_fd = open(tmp_file_name[0], O_WRONLY | O_CREAT | O_TRUNC, S_IWUSR);
|
||||
if (from_in_fd < 0)
|
||||
error(EXIT_FAILURE, 0, _("opening of tmpfile failed"));
|
||||
if (dup2(from_in_fd, STDOUT_FILENO) < 0)
|
||||
{
|
||||
remove_tmp_file(from_in_fd, tmp_file_name[0]);
|
||||
error(EXIT_FAILURE, 0, _("redirecting bison's stdout to the temporary file failed"));
|
||||
}
|
||||
close(from_in_fd);
|
||||
|
||||
|
||||
fd[0] = STDOUT_FILENO;
|
||||
return pid;
|
||||
}
|
||||
|
||||
|
||||
/* A signal handler that just records that a signal has happened. */
|
||||
static int child_interrupted;
|
||||
|
||||
static void
|
||||
signal_catcher(int signo)
|
||||
{
|
||||
child_interrupted++;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
end_of_output_subpipe(pid_t pid, int fd[2])
|
||||
{
|
||||
char *program;
|
||||
int from_out_fd = open(tmp_file_name[0], O_RDONLY, S_IRUSR); /* pipe from bison to m4. */
|
||||
int to_in_fd = open(tmp_file_name[1], O_WRONLY | O_CREAT | O_TRUNC, S_IWUSR); /* pipe from m4 to bison. */
|
||||
int status;
|
||||
void (*previous_handler)(int);
|
||||
|
||||
|
||||
program = strrchr(arguments[0], '/');
|
||||
if (program)
|
||||
program++;
|
||||
else
|
||||
program = arguments[0];
|
||||
|
||||
/*
|
||||
* Redirect bison's output to m4's stdin.
|
||||
*/
|
||||
if (from_out_fd < 0)
|
||||
error(EXIT_FAILURE, 0, _("opening of tmpfile failed"));
|
||||
if (dup2(from_out_fd, STDIN_FILENO) < 0)
|
||||
{
|
||||
remove_tmp_file(from_out_fd, tmp_file_name[0]);
|
||||
error(EXIT_FAILURE, 0, _("redirecting m4's stdin from the temporary file failed"));
|
||||
}
|
||||
close(from_out_fd);
|
||||
|
||||
/*
|
||||
* All m4's output will be gathered in this temporary file
|
||||
* and will be redirected to bison's stdin.
|
||||
*/
|
||||
if (to_in_fd < 0)
|
||||
{
|
||||
remove_tmp_file(STDIN_FILENO, tmp_file_name[0]);
|
||||
error(EXIT_FAILURE, 0, _("opening of a temporary file failed"));
|
||||
}
|
||||
if (dup2(to_in_fd, STDOUT_FILENO) < 0)
|
||||
{
|
||||
remove_tmp_file(STDIN_FILENO, tmp_file_name[0]);
|
||||
remove_tmp_file(to_in_fd, tmp_file_name[1]);
|
||||
error(EXIT_FAILURE, 0, _("redirecting m4's stdout to a temporary file failed"));
|
||||
}
|
||||
close(to_in_fd);
|
||||
|
||||
/*
|
||||
* Run m4.
|
||||
*/
|
||||
child_interrupted = 0;
|
||||
errno = 0;
|
||||
previous_handler = signal(SIGINT, signal_catcher);
|
||||
status = spawnvp(P_WAIT, program, arguments);
|
||||
signal(SIGINT, previous_handler);
|
||||
if (child_interrupted)
|
||||
{
|
||||
remove_tmp_file(STDIN_FILENO, tmp_file_name[0]);
|
||||
remove_tmp_file(STDOUT_FILENO, tmp_file_name[1]);
|
||||
error(EXIT_FAILURE, 0, _("subsidiary program '%s' interrupted"), program);
|
||||
}
|
||||
if (status)
|
||||
{
|
||||
remove_tmp_file(STDIN_FILENO, tmp_file_name[0]);
|
||||
remove_tmp_file(STDOUT_FILENO, tmp_file_name[1]);
|
||||
error(EXIT_FAILURE, 0, _(errno == ENOENT
|
||||
? "subsidiary program '%s' not found"
|
||||
: status < 1
|
||||
? "subsidiary program '%s' failed"
|
||||
: "subsidiary program '%s' failed (status=%i, errno=%i)"), program, status, errno);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Redirect m4's output to bison's stdin.
|
||||
*/
|
||||
if (dup2(old_stdout, STDOUT_FILENO) < 0)
|
||||
error(EXIT_FAILURE, 0, "restore of bison's stdout failed");
|
||||
close(old_stdout);
|
||||
to_in_fd = open(tmp_file_name[1], O_RDONLY, S_IRUSR); /* pipe from m4 to bison. */
|
||||
if (to_in_fd < 0)
|
||||
{
|
||||
remove_tmp_file(STDIN_FILENO, tmp_file_name[0]);
|
||||
error(EXIT_FAILURE, 0, _("opening of tmpfile failed"));
|
||||
}
|
||||
if (dup2(to_in_fd, STDIN_FILENO) < 0)
|
||||
{
|
||||
remove_tmp_file(STDIN_FILENO, tmp_file_name[0]);
|
||||
remove_tmp_file(to_in_fd, tmp_file_name[1]);
|
||||
error(EXIT_FAILURE, -1, "dup2");
|
||||
error(EXIT_FAILURE, 0, _("redirecting bison's stdin from the temporary file failed"));
|
||||
}
|
||||
close(to_in_fd);
|
||||
|
||||
|
||||
fd[1] = STDIN_FILENO;
|
||||
}
|
||||
|
||||
|
||||
/* Free resources, unlink temporary files and restore stdin and stdout. */
|
||||
|
||||
void
|
||||
reap_subpipe(pid_t pid, char const *program)
|
||||
{
|
||||
int argc;
|
||||
|
||||
for (argc = 0; arguments[argc]; argc++)
|
||||
free(arguments[argc]);
|
||||
free(arguments);
|
||||
|
||||
if (unlink(tmp_file_name[0]))
|
||||
error(EXIT_FAILURE, 0, _("removing of '%s' failed"), tmp_file_name[0]);
|
||||
if (unlink(tmp_file_name[1]))
|
||||
error(EXIT_FAILURE, 0, _("removing of '%s' failed"), tmp_file_name[1]);
|
||||
|
||||
if (dup2(old_stdin, STDIN_FILENO) < 0)
|
||||
error(EXIT_FAILURE, 0, "restore of bison's stdin failed");
|
||||
close(old_stdin);
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
/* Subprocesses with pipes.
|
||||
|
||||
Copyright (C) 2005-2015, 2018 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Juan Manuel Guerrero <juan.guerrero@gmx.de>. */
|
||||
|
||||
#if HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
|
||||
void init_subpipe(void);
|
||||
pid_t create_subpipe(char const * const *, int[2]);
|
||||
void end_of_output_subpipe(pid_t, int[2]);
|
||||
void reap_subpipe(pid_t, char const *);
|
||||
@@ -1,23 +0,0 @@
|
||||
# DJGPP specific configuration file.
|
||||
# Sed script for additional DJGPP specific editing
|
||||
# of the testsuite script generated by autoconf 2.61.
|
||||
|
||||
# Copyright (C) 2007-2015, 2018 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
# Remove disallowed characters from file names.
|
||||
|
||||
s/~!@#\\\$%^&\*()-=_+{}\[\]|\\\\:;<>, ./~!@#\\$%^\&()-=_+{}[];, ./g
|
||||
@@ -17,7 +17,6 @@ src/scan-gram.l
|
||||
src/scan-skel.l
|
||||
src/symtab.c
|
||||
|
||||
djgpp/subpipe.c
|
||||
lib/argmatch.c
|
||||
lib/bitset_stats.c
|
||||
lib/closeout.c
|
||||
|
||||
Reference in New Issue
Block a user