Here's a proposed diffutils patch to simplify the code by removing the now-obsolete DJGPP stuff. I have not pushed this.
===== diffutils is now designed to build with Cygwin or MinGW. The old DJGPP stuff probably doesn't work anyway. * Makefile.am (SUBDIRS): Remove ms. * NEWS: Document this. * configure.ac (AC_CONFIG_FILES): Remove ms/Makefile. * ms/Makefile.am, ms/README, ms/config.bat, ms/config.sed: * ms/config.site: Remove. --- Makefile.am | 2 +- NEWS | 5 + configure.ac | 1 - ms/Makefile.am | 18 ---- ms/README | 64 -------------- ms/config.bat | 259 -------------------------------------------------------- ms/config.sed | 85 ------------------ ms/config.site | 78 ----------------- 8 files changed, 6 insertions(+), 506 deletions(-) delete mode 100644 ms/Makefile.am delete mode 100644 ms/README delete mode 100644 ms/config.bat delete mode 100644 ms/config.sed delete mode 100644 ms/config.site diff --git a/Makefile.am b/Makefile.am index 73cac49..dcd4b74 100644 --- a/Makefile.am +++ b/Makefile.am @@ -18,7 +18,7 @@ ALL_RECURSIVE_TARGETS = EXTRA_DIST = bootstrap exgettext ChangeLog-2008 cfg.mk dist-check.mk -SUBDIRS = lib src tests doc man po ms gnulib-tests +SUBDIRS = lib src tests doc man po gnulib-tests ACLOCAL_AMFLAGS = -I m4 AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS) diff --git a/NEWS b/NEWS index 5a69cd7..567fa3d 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,11 @@ GNU diffutils NEWS -*- outline -*- --new-file (-N) and --unidirectional-new-file now allow comparisons to "-". A standard input that's closed acts like a nonexistent file. +** Packaging + + diffutils is now designed to build with Cygwin or MinGW rather than DJGPP. + The ms subdirectory has been removed. + * Noteworthy changes in release 3.2 (2011-09-02) [stable] diff --git a/configure.ac b/configure.ac index cf71ade..d6e52c4 100644 --- a/configure.ac +++ b/configure.ac @@ -168,6 +168,5 @@ AC_CONFIG_FILES([ gnulib-tests/Makefile man/Makefile po/Makefile.in - ms/Makefile ]) AC_OUTPUT diff --git a/ms/Makefile.am b/ms/Makefile.am deleted file mode 100644 index 2296d6a..0000000 --- a/ms/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -# Makefile for GNU diffutils sources used on Microsoft operating systems. - -# Copyright (C) 2001-2002, 2009-2012 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 = config.bat config.sed config.site diff --git a/ms/README b/ms/README deleted file mode 100644 index 93a9074..0000000 --- a/ms/README +++ /dev/null @@ -1,64 +0,0 @@ -This directory contains files required to build GNU Diffutils on -MS_DOS and MS-Windows using the DJGPP tools. - -To build Diffutils, you will need the following packages: - - . the basic DJGPP development kit: GCC, Binutils, and djdevNNN.zip - . a DJGPP port of Bash (bsh204b.zip) - . GNU Fileutils (fil40b.zip) - . GNU Textutils (txt20b.zip) - . GNU Sh-utils (shl112b.zip) - . GNU Grep (grep24b.zip) - . GNU Awk (gwk306b.zip) - . GNU Sed (sed302b.zip) - . GNU Make (mak3791b.zip) - -The package names in parentheses indicate the oldest version which -should work; newer versions are okay. All those packages can be found -on the usual DJGPP sites, in the v2gnu directory. Please see -<http://www.delorie.com/djgpp/getting.html> for a list of DJGPP sites. - -The source distribution of Diffutils you find on DJGPP sites comes -preconfigured for the latest officially released version of the DJGPP -library, and without NLS support. If that is what you have installed, -and if you don't need NLS support in Diffutils, you don't need to run -the configure script; proceed directly to the "make" step below. - -If you are building the official GNU distribution, or your library is -not the latest official release, or if you modified your headers or -installed optional libraries, or if you want to have NLS support in -Diffutils, you will have to reconfigure the package. To this end, -after unpacking the sources, chdir to the top-level directory created -by unpacking, and type this command: - - ms\config [nls] - -The "nls" option, if given, will configure the package for NLS -support. - -This will run for a while and create the Makefile's and the config.h -header file. - -Next type "make"; this will build the programs. - -To install the package, type "make install". - -That's it! - ------ -Copyright (C) 2001, 2009-2012 Free Software Foundation, Inc. - -This file is part of GNU DIFF. - -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/>. diff --git a/ms/config.bat b/ms/config.bat deleted file mode 100644 index 57d5f3f..0000000 --- a/ms/config.bat +++ /dev/null @@ -1,259 +0,0 @@ -@echo off - -echo Configuring GNU Diffutils for DJGPP v2.x... - -Rem Copyright (C) 2001, 2009-2012 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 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 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 Written by Eli Zaretskii. - - -Rem The small_env 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 cache is wanted or not -Rem and where the sources are. -set ARGS= -set NLS=disabled -if not "%NLS%" == "disabled" goto small_env -set CACHE=enabled -if not "%CACHE%" == "enabled" goto small_env -set DEPENDENCY_TRACKING=disabled -if not "%DEPENDENCY_TRACKING%" == "disabled" goto small_env -set XSRC=. -if not "%XSRC%" == "." goto small_env - -Rem Loop over all arguments. -Rem Special arguments are: NLS, XSRC CACHE and DEPS. -Rem All other arguments are stored into ARGS. -:arg_loop -set SPECIAL_ARG_SEEN=0 -if not "%SPECIAL_ARG_SEEN%" == "0" goto small_env -if "%1" == "NLS" goto nls_on -if not "%1" == "nls" goto CacheOpt -:nls_on -if "%1" == "nls" set NLS=enabled -if "%1" == "NLS" set NLS=enabled -if not "%NLS%" == "enabled" goto small_env -set SPECIAL_ARG_SEEN=1 -if not "%SPECIAL_ARG_SEEN%" == "1" goto small_env -shift -:CacheOpt -set SPECIAL_ARG_SEEN=0 -if not "%SPECIAL_ARG_SEEN%" == "0" goto small_env -if "%1" == "no-cache" goto cache_off -if "%1" == "no-CACHE" goto cache_off -if not "%1" == "NO-CACHE" goto dependency_opt -:cache_off -if "%1" == "no-cache" set CACHE=disabled -if "%1" == "no-CACHE" set CACHE=disabled -if "%1" == "NO-CACHE" set CACHE=disabled -if not "%CACHE%" == "disabled" goto small_env -set SPECIAL_ARG_SEEN=1 -if not "%SPECIAL_ARG_SEEN%" == "1" goto small_env -shift -:dependency_opt -set SPECIAL_ARG_SEEN=0 -if not "%SPECIAL_ARG_SEEN%" == "0" goto small_env -if "%1" == "dep" goto dep_off -if not "%1" == "DEP" goto src_dir_opt -:dep_off -if "%1" == "dep" set DEPENDENCY_TRACKING=enabled -if "%1" == "DEP" set DEPENDENCY_TRACKING=enabled -if not "%DEPENDENCY_TRACKING%" == "enabled" goto small_env -set SPECIAL_ARG_SEEN=1 -if not "%SPECIAL_ARG_SEEN%" == "1" goto small_env -shift -:src_dir_opt -set SPECIAL_ARG_SEEN=0 -if not "%SPECIAL_ARG_SEEN%" == "0" goto small_env -echo %1 | grep -q "/" -if errorlevel 1 goto collect_arg -set XSRC=%1 -if not "%XSRC%" == "%1" goto small_env -set SPECIAL_ARG_SEEN=1 -if not "%SPECIAL_ARG_SEEN%" == "1" goto small_env -:collect_arg -if "%SPECIAL_ARG_SEEN%" == "0" set _ARGS=%ARGS% %1 -if "%SPECIAL_ARG_SEEN%" == "0" if not "%_ARGS%" == "%ARGS% %1" goto small_env -echo %_ARGS% | grep -q "[^ ]" -if not errorlevel 0 set ARGS=%_ARGS% -set _ARGS= -shift -if not "%1" == "" goto arg_loop -set SPECIAL_ARG_SEEN= - -Rem Create a response file for the configure script. -echo --srcdir=%XSRC% > arguments -if "%CACHE%" == "enabled" echo --config-cache >> arguments -if "%DEPENDENCY_TRACKING%" == "enabled" echo --enable-dependency-tracking >> arguments -if "%DEPENDENCY_TRACKING%" == "disabled" echo --disable-dependency-tracking >> arguments -if not "%ARGS%" == "" echo %ARGS% >> arguments -set ARGS= -set CACHE= -set DEPENDENCY_TRACKING= - -if "%XSRC%" == "." goto in_place - -:not_in_place -redir -e /dev/null update %XSRC%/configure.orig ./configure -test -f ./configure -if errorlevel 1 update %XSRC%/configure ./configure - -:in_place -Rem Update configuration files -echo Updating configuration scripts... -test -f ./configure.orig -if errorlevel 1 update configure configure.orig -sed -f %XSRC%/ms/config.sed configure.orig > configure -if errorlevel 1 goto sed_error - -Rem Make sure they have a config.site file -set CONFIG_SITE=%XSRC%/ms/config.site -if not "%CONFIG_SITE%" == "%XSRC%/ms/config.site" goto small_env - -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%/m4/Makefile.am.in -if not errorlevel 1 mv -f %XSRC%/m4/Makefile.am.in %XSRC%/m4/Makefile.am-in - -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 HOME to a sane default so configure stops complaining. -if not "%HOME%" == "" goto HostName -set HOME=%XSRC%/ms -if not "%HOME%" == "%XSRC%/ms" goto small_env -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 small_env -goto haveos -:msdos -set OS=MS-DOS -if not "%OS%" == "MS-DOS" goto small_env -: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 small_env -goto userdone -:haveuser -set HOSTNAME=%USER%'s PC -if not "%HOSTNAME%" == "%USER%'s PC" goto small_env -goto userdone -:haveuname -set HOSTNAME=%USERNAME%'s PC -if not "%HOSTNAME%" == "%USERNAME%'s PC" goto small_env -:userdone -set _HOSTNAME=%HOSTNAME%, %OS% -if not "%_HOSTNAME%" == "%HOSTNAME%, %OS%" goto small_env -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 no_ren0 -test -f %XSRC%/install-sh.sh -if not errorlevel 1 mv -f %XSRC%/install-sh.sh %XSRC%/install-sh -:no_ren0 - -if "%NLS%" == "disabled" goto without_NLS - -:with_NLS -Rem Check for the needed libraries and binaries. -test -x /dev/env/DJDIR/bin/msgfmt.exe -if not errorlevel 0 goto missing_NLS_tools -test -x /dev/env/DJDIR/bin/xgettext.exe -if not errorlevel 0 goto missing_NLS_tools -test -f /dev/env/DJDIR/include/libcharset.h -if not errorlevel 0 goto missing_NLS_tools -test -f /dev/env/DJDIR/lib/libcharset.a -if not errorlevel 0 goto missing_NLS_tools -test -f /dev/env/DJDIR/include/iconv.h -if not errorlevel 0 goto missing_NLS_tools -test -f /dev/env/DJDIR/lib/libiconv.a -if not errorlevel 0 goto missing_NLS_tools -test -f /dev/env/DJDIR/include/libintl.h -if not errorlevel 0 goto missing_NLS_tools -test -f /dev/env/DJDIR/lib/libintl.a -if not errorlevel 0 goto missing_NLS_tools - -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/diffutil*.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 >> arguments -goto configure_package - -:missing_NLS_tools -echo Needed libs/tools for NLS not found. Configuring without NLS. -:without_NLS -Rem Update the arguments file for the configure script. -echo --disable-nls >> arguments - -:configure_package -echo Running the ./configure script... -sh ./configure @arguments -if errorlevel 1 goto cfg_error -rm arguments -echo Done. -goto End - -:sed_error -echo ./configure script editing failed! -goto End - -:cfg_error -echo ./configure script exited abnormally! -goto End - -:small_env -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 no_ren1 -test -f %XSRC%/install-sh -if not errorlevel 1 mv -f %XSRC%/install-sh %XSRC%/install-sh.sh -:no_ren1 -if "%HOME%" == "%XSRC%/ms" set HOME= -set ARGS= -set CONFIG_SITE= -set HOSTNAME= -set NLS= -set CACHE= -set DEPENDENCY_TRACKING= -set XSRC= diff --git a/ms/config.sed b/ms/config.sed deleted file mode 100644 index 0d40421..0000000 --- a/ms/config.sed +++ /dev/null @@ -1,85 +0,0 @@ -# Additional editing of Makefiles and of config.status - -# Copyright (C) 2001-2002, 2009-2012 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 Eli Zaretskii. - - -/(echo[ ]*':t/ a\ -# DJGPP specific Makefile changes.\ - /^aliaspath * *=/s,:,";",g;t t\ - /TEXINPUTS=/s,:,";",g;t t\ - /PATH=/s,:,";",g;t t\ - s,\\.deps,_deps,g;t t\ - s,\\.new\\.,_new.,g;t t\ - s,\\.old\\.,_old.,g;t t\ - s,\\.tab\\.,_tab.,g;t t\ - s,Makefile\\.in\\.in,Makefile.in-in,g;t t\ - s,Makefile\\.am\\.in,Makefile.am-in,g;t t\ - /^install-info-am:/,/^$/ {\ - /@list=.\\\$(INFO_DEPS)\[^ \]/s,DEPS),& diff.i,\ - s,\\(\\\$\\\$d/\\\$\\\$file-\\[0-9\\]\\[0-9\\]\\)\\(\[^ \]\\),\\1 \\$\\$d/\\$\\$file[0-9] \\$\\$d/\\$\\$file[0-9][0-9]\\2,\ - s,\\( \\\$\\\$file-\\[0-9\\]\\[0-9\\]\\)\\(\[^ \]\\),\\1 \\$\\$file[0-9] \\$\\$file[0-9][0-9]\\2,\ - }\ - /^uninstall-info-am:/,/^$/ {\ - /@list=.\\\$(INFO_DEPS)\[^ \]/s,DEPS),& diff.i,\ - s,\\(file-\\[0-9\\]\\[0-9\\]\\)\\(\[^ \]\\),\\1 \\$\\$file[0-9] \\$\\$file[0-9][0-9]\\2,\ - } - -# Makefile.in.in is renamed to Makefile.in-in. -/^ac_config_files=/,/_ACEOF/ { - s|po/Makefile\.in|&:po/Makefile.in-in| -} -/CONFIG_FILES=/ s|po/Makefile\.in|&:po/Makefile.in-in|2 - -# We always use _deps instead of .deps, 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). -s,\.deps,_deps,g - -# The following two items are changes needed for configuring -# and compiling across partitions. -# 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, making them useless for DJGPP installations other than the -# one for which the package has been configured. -/MISSING=/,/^$/ { - /^fi$/ a\ -am_missing_run=`echo "$am_missing_run" | sed 's%/dev.*/diffutil.*[-.]2.*[7-9].*[0-9]%${top_srcdir}%'` -} -/^install_sh=/a\ -install_sh=`echo "$install_sh" | sed 's%/dev.*/diffutil.*[-.]2.*[7-9].*[0-9]%${top_srcdir}%'` - - -# The following makes sure we are not going to remove a directory -# which is the cwd on its drive (DOS doesn't allow to remove such -# a directory). The trick is to chdir to the root directory on -# temp directory's drive. -/^ *trap 'exit_status=\$\?; rm -rf/s%rm -rf%cd $tmp; cd /; &% - -# AC_CONFIG_LINKS fails if the source and destination are on -# different file systems and symlinks don't work. -/^ ln \$srcdir/s%||%|| cp -pf $srcdir/$ac_source $ac_dest ||% diff --git a/ms/config.site b/ms/config.site deleted file mode 100644 index c863616..0000000 --- a/ms/config.site +++ /dev/null @@ -1,78 +0,0 @@ -#! /bin/sh -# Site defaults for the DJGPP configuration - -# Copyright (C) 2001, 2009-2012 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 Eli Zaretskii. - - -# 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 -# for all paths that are hardcoded in the binaries. -# When installing the installation prefix must be supplied. -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'} - -# Sane defaults for standard programs compiled into the package that -# we are about to build. Use .exe extension so that library functions -# invoking these programs will provide a better diagnostics when a -# program is not found: the library won't need to call the stock DOS -# shell, which always returns a zero status, even if it doesn't find -# the program. -ac_cv_path_PR_PROGRAM=${PR_PROGRAM='/dev/env/DJDIR/bin/pr.exe'} - -# Sane defaults for standard programs used by the build process. -# We force the values of these variables so that the resultant -# Makefile's will work on any DJGPP platform, not only on the -# machine where the package was configured. -ac_cv_prog_AWK=${AWK='gawk'} -ac_cv_prog_INTLBISON=${INTLBISON='bison'} -ac_cv_prog_CC=${CC='gcc'} - -# These are set here so the generated libtool/Makefile's will -# be good for every DJGPP installation, not only the one where -# the package was configured. -NM=${NM='nm'} -LD=${LD='ld'} -MAKEINFO=${MAKEINFO='makeinfo'} - -# Force the test for 'ln -s' to report 'cp -pf'. -ac_cv_prog_LN_S='cp -pf' - -# We have 'fork', but it always fails. Don't trust Autoconf to be -# smart enough to detect that... -ac_cv_func_fork=no -- 1.7.6.5
