Mail Archives: djgpp-workers/2000/08/11/06:15:44
[CC: to Jim Meyering, since some issues go beyond DJGPP-specific aspects.]
> Date: Tue, 25 Jul 2000 06:59:03 +0530 (IST)
> From: Prashant TR <tr AT eth DOT net>
>
> The DJGPP port of the Sh-utils pretest is available.
>
> ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/alphas/shl20js.zip
I finally found time to download and test this beta version. The
package built for me flawlessly, both on plain DOS and on Windows 98,
both in the source directory and outside it. Good work!
I have only a few minor comments:
1) When the configure script runs, it prints an error message from
`ln' (when it tests whether `lstat' dereferences a symlink with a
trailing slash). This is expected behavior, but it might alarm
users. I suggest either to redirect stderr to /dev/null or at
least mention the message in djgpp/README.
2) The version of `depcomp' supplied with sh-utils-2.0j does not
work correctly for DOS/Windows-style pathnames with drive
letters. The following Sed script breaks if .deps/*.Tpo files
include absolute file names with drive letters:
sed 's/^[^:]*: / /' < "$tmpdepfile" >> "$depfile"
This happens because on DOS/Windows, "gcc -MD" produces the
following in, e.g., lib/.deps/addext.Tpo:
e:/src/gnu/sh-util2.0j/lib/addext.o: \
e:/src/gnu/sh-util2.0j/lib/addext.c ../config.h \
e:/src/gnu/sh-util2.0j/lib/backupfile.h c:/bin/gcc/include/limits.h \
c:/bin/gcc/include/sys/types.h c:/bin/gcc/include/sys/djtypes.h \
c:/bin/gcc/include/string.h c:/bin/gcc/include/sys/movedata.h \
c:/bin/gcc/include/unistd.h
The first line above is supposed to be removed by the Sed script,
but that fails because the file name includes a colon.
Note that this problem is only visible when building Sh-utils
from another drive, because only then the drive letter appears in
the file name.
The patch to depcomp which fixes this is below. Jim, where
should I post it? Also, is \{0,1\} supported in all versions of
Sed?
3) The test suite fails in several ways, unless the package is
configured, built, and tested in the source directory. This
happens because djgpp/edtest.bat is not written to work except in
that case. Either edtest.bat should be augmented, or a note to
this effect should be added to djgpp/README.
In any case, I think that the DJGPP source distribution should
come with the files under `tests/' already edited and converted
to the DOS-style CRLF EOL format (where appropriate). (If you
decide to accept this advice, you need to take into consideration
that someone might run config.bat again, so the conversion Sed
scripts should be prepared for multiple editing.)
4) lib/Makefile.in has a rule to produce C files from Yacc grammar
sources. This rule will not work on plain MS-DOS, because file
names like y.tab.c are not allowed, and because the DJGPP port of
Yacc produces y_tab.c instead of y.tab.c when it runs on plain
DOS machine. This problem will pop up if someone edits
getdate.y, for example.
The offending rule comes from Automake, so to correct this once
and for all, Automake should be changed. What is the correct
address to report this? Is it automake-bugs AT gnu DOT org?
For now, I suggest to add some magic to djgpp/config.sed so that
it edits this:
.y.c:
$(YACC) $(AM_YFLAGS) $(YFLAGS) $< && mv y.tab.c $*.c
if test -f y.tab.h; then \
if cmp -s y.tab.h $*.h; then rm -f y.tab.h; else mv y.tab.h $*.h; fi; \
else :; fi
into this:
.y.c:
$(YACC) $(AM_YFLAGS) $(YFLAGS) $<
-test -f y.tab.c && mv y.tab.c y_tab.c
-test -f y.tab.h && mv y.tab.h y_tab.h
mv y_tab.c $*.c
if test -f y_tab.h; then \
if cmp -s y_tab.h $*.h; then rm -f y_tab.h; else mv y_tab.h $*.h; fi; \
else :; fi
5) A note: since `true' and `false' are now programs, you need to
make sure shl20b.dsm includes commands to uninstall the old shell
scripts by those names before installing the binaries.
6) Finally, it looks like the DJGPP source distribution will require
to run the configure script before building. If that is true,
I'd like to suggest to make any reasonable effort so that the
sources could come already configured. AFAIK, every other ported
package does that; we should try not to require users to have all
those additional utilities installed just to rebuild a package.
I'm guessing that this depcomp thingy is one of the major
obstacles to ship the sources configured. If so, let's see what
exactly in depcomp prevents you from doing so, and let's try to
solve those problems, either by submitting patches to depcomp
maintainers, or by augmenting the DJGPP-specific scripts.
Last but not least, thanks to Jim for a wonderful package, and to
Prashant for the good work porting it.
Here's the patch for depcomp:
2000-08-11 Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
* depcomp (gcc): Support DOS-style absolute file names with drive
letters.
--- depcomp.~0 Mon Oct 4 07:56:46 1999
+++ depcomp Thu Aug 10 20:49:02 2000
@@ -65,7 +65,7 @@
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
- sed 's/^[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+ sed 's/^\([A-z]:\/\)\{0,1\}[^:]*: / /' < "$tmpdepfile" >> "$depfile"
## This next piece of magic avoids the `deleted header file' problem.
## The problem is that when a header file which appears in a .P file
## is deleted, the dependency causes make to die (because there is
- Raw text -