This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: PATCH/RFA : copying.c & copying.txt
- To: Philippe De Muyter <phdm at macqel dot be>
- Subject: Re: PATCH/RFA : copying.c & copying.txt
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Thu, 13 Apr 2000 15:27:09 +1000
- CC: gdb-patches at sourceware dot cygnus dot com
- Organization: Cygnus Solutions
- References: <200004101335.PAA26753@mail.macqel.be>
Philippe De Muyter wrote:
>
> Andrew Cagney wrote :
> > Philippe De Muyter wrote:
> > >
> > > Do you already know that Eli's recent copying.txt change causes build failure
> > > for gdb ?
> >
> > Hmm, it is make dependant. GNU make finds copying.c in the src directory
> > and just uses that.
>
> I use GNU make (version 3.71), and I surmise that it now `knows' that copying.c
> requires copying.txt, so it builds it, but then copying.txt is newer than
> copying.c, so copying.c must be remade with the rule that I proposed to patch.
>
> > This also suggests what I suspect is the correct solution - copying.c
> > should only be dependant on COPYING when ``maintainer-mode'' is enabled.
>
> That is also true.
FYI,
I've committed the attatched to the trunk and branch. I think I've been
through all combinations of BSD vs GNU makes and with/without
maintainer-mode so hopefully it is ok. Eli, I've assumed that lacking
maintainer-mode under djgpp won't be noticed :-(
One comment, I had some fun re-generating aclocal.m4. I ended up using
the aclocal from BINUTILS snapshot as local aclocal-1.4 kept deleting
macros.
Andrew
Thu Apr 13 13:24:27 2000 Andrew Cagney <cagney@b1.cygnus.com>
* configure.in: Add --enable-maintainer-mode.
* aclocal.m4, configure: Re-generate.
* Makefile.in ($(srcdir)/copying.c): Enable dependencies only when
on maintainer-mode. Update copying.c in source directory.
(copying.txt): Delete rule.
(copying.o): Add explict paths to $(srcdir) and explicit make
rule.
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.25
diff -p -r1.25 Makefile.in
*** Makefile.in 2000/04/09 14:37:28 1.25
--- Makefile.in 2000/04/13 05:18:02
*************** doc/gdb.dvi:
*** 942,960 ****
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 || \
- (test "$$LN_S" = "ln -s" && \
- ln -s $(srcdir)/COPYING copying.txt;) || \
- cp -p $(srcdir)/COPYING copying.txt 2>/dev/null || \
- ln $(srcdir)/COPYING copying.txt 2>/dev/null || \
- cp $(srcdir)/COPYING copying.txt
-
# Make copying.c from COPYING
! copying.c: copying.txt copying.awk
! awk -f $(srcdir)/copying.awk < $(srcdir)/copying.txt > copying.c
version.c: Makefile
rm -f version.c
--- 942,953 ----
doc/gdb.info:
cd doc; $(MAKE) gdb.info $(FLAGS_TO_PASS)
# Make copying.c from COPYING
! $(srcdir)/copying.c: @MAINTAINER_MODE_TRUE@ \
! $(srcdir)/COPYING $(srcdir)/copying.awk
! awk -f $(srcdir)/copying.awk \
! < $(srcdir)/COPYING > $(srcdir)/copying.tmp
! mv $(srcdir)/copying.tmp $(srcdir)/copying.c
version.c: Makefile
rm -f version.c
*************** complaints.o: complaints.c complaints.h
*** 1201,1207 ****
# OBSOLETE convex-xdep.o: convex-xdep.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) \
# OBSOLETE $(inferior_h)
! copying.o: copying.c $(defs_h) $(gdbcmd_h)
core-aout.o: core-aout.c $(defs_h) $(gdbcore_h) $(value_h) $(inferior_h)
--- 1194,1202 ----
# OBSOLETE convex-xdep.o: convex-xdep.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) \
# OBSOLETE $(inferior_h)
! # Provide explicit rule/dependency - works for more makes.
! copying.o: $(srcdir)/copying.c $(defs_h) $(gdbcmd_h)
! $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/copying.c
core-aout.o: core-aout.c $(defs_h) $(gdbcore_h) $(value_h) $(inferior_h)
Index: configure.in
===================================================================
RCS file: /cvs/src/src/gdb/configure.in,v
retrieving revision 1.18
diff -p -r1.18 configure.in
*** configure.in 2000/04/08 11:13:17 1.18
--- configure.in 2000/04/13 05:18:20
*************** dnl Process this file with autoconf to p
*** 22,27 ****
--- 22,28 ----
AC_PREREQ(2.13)dnl
AC_INIT(main.c)
AC_CONFIG_HEADER(config.h:config.in)
+ AM_MAINTAINER_MODE
AC_PROG_CC
AC_AIX