This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: [PATCH] COPYING and copying.c
- To: Eli Zaretskii <eliz at delorie dot com>
- Subject: Re: [PATCH] COPYING and copying.c
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Wed, 01 Mar 2000 19:47:26 +1100
- CC: gdb-patches at sourceware dot cygnus dot com
- Organization: Cygnus Solutions
- References: <200002270857.DAA25056@indy.delorie.com>
Eli Zaretskii wrote:
>
> The following is one of the gotchas with case-insensitive file names.
> It got me puzzled for about 10 seconds when I saw Make trying to
> compile COPYING.c into COPYING...
>
> (It turns out Robert Hoehne already bumped into this while working on
> GDB 4.18, but he ``handled'' it by commenting out the whole rule...
> Ts, ts, ts ;-).
>
> I hope this solution is acceptable. If not, please tell me how to
> change it.
>
> 2000-02-27 Eli Zaretskii <eliz@is.elta.co.il>
>
> * Makefile.in (copying.c): Depend on copying.txt, not COPYING.
> (copying.txt): New target, a link to COPYING.
>
> --- gdb/Makefile.i~0 Tue Feb 22 10:52:06 2000
> +++ gdb/Makefile.in Sat Feb 26 19:31:54 2000
> @@ -911,9 +911,14 @@
> doc/gdb.info:
> cd doc; $(MAKE) gdb.info $(FLAGS_TO_PASS)
>
> +# When DJGPP Make runs on MS-DOS, it downcases all file names, so
> +# it doesn't find COPYING, and wants to make it...
> +copying.txt:
> + test -f copying.txt || ln COPYING copying.txt
This bit won't work when building in a separate directory.
I'm also not sure about the ``ln'' command. configure.in contains stuff
to set ``LN_S''.
> # Make copying.c from COPYING
> -copying.c: COPYING copying.awk
> - awk -f $(srcdir)/copying.awk < $(srcdir)/COPYING > copying.c
> +copying.c: copying.txt copying.awk
> + awk -f $(srcdir)/copying.awk < $(srcdir)/copying.txt > copying.c
>
> version.c: Makefile
> rm -f version.c
I suspect the patch needs to:
o Tweek configure.in to set LN_S in Makefile.in
It almost does that now.
o use $(LN_S) to make the link
(a softlink can cross a HD boundary)
and check for failure
o tweek the copying bit as you've done here.
As an asside, I think having the code doing the link in Makefile.in
rather than configure.in (like gdbtk) is much better.
Andrew