This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Update rebuild rules in non-automake directories.
- From: Ralf Wildenhues <Ralf dot Wildenhues at gmx dot de>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: binutils at sourceware dot org, gdb-patches at sourceware dot org
- Date: Thu, 30 Jul 2009 23:09:52 +0200
- Subject: Re: Update rebuild rules in non-automake directories.
- References: <20090628183334.GA5401@gmx.de> <20090728181748.GA3134@gmx.de> <m34osw1vg9.fsf@fleche.redhat.com>
* Tom Tromey wrote on Tue, Jul 28, 2009 at 09:03:34PM CEST:
> >>>>> "Ralf" == Ralf Wildenhues writes:
>
> Ralf> gdb/ChangeLog:
> Ralf> 2009-07-28 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
> Ralf> * Makefile.in (ACLOCAL, ACLOCAL_AMFLAGS, aclocal_m4_deps):
> Ralf> New variables.
> Ralf> ($(srcdir)/aclocal.m4, am--refresh): New rules.
>
> It seems a little odd to have a rule to rebuild aclocal.m4 when there is
> no rule to rebuild configure. Are you planning to add that? (I don't
> think this affects whether the patch is ok -- it is still an improvement
> over the present situation.)
Respin of the gdb part including rebuild rules for configure and
config.in. FWIW, the $(srcdir)/ prefixes before files that are
mentioned both as targets as well as as prerequisites are needed to let
some BSD make implementations find them portably. Anyway the whole
thing is pretty much copied from Automake rules.
OK?
As to Paolo's comment, I didn't see how to easily bring autom4te output
into the mix, and also don't trust distros to have autom4te versioned as
consistently as some have autoconf and autoheader.
Thanks,
Ralf
gdb/ChangeLog:
2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Makefile.in (ACLOCAL, ACLOCAL_AMFLAGS, aclocal_m4_deps)
(AUTOCONF, configure_deps, AUTOHEADER): New variables.
($(srcdir)/aclocal.m4, $(srcdir)/configure, $(srcdir)/config.in)
(am--refresh): New rules.
(stamp-h, config.status): List config.in and configure including
$(srcdir)/ prefix.
Index: gdb/Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.1091
diff -u -r1.1091 Makefile.in
--- gdb/Makefile.in 3 Jul 2009 12:06:35 -0000 1.1091
+++ gdb/Makefile.in 30 Jul 2009 21:01:54 -0000
@@ -1212,16 +1212,69 @@
$(SHELL) config.status
config.h: stamp-h ; @true
-stamp-h: config.in config.status
+stamp-h: $(srcdir)/config.in config.status
CONFIG_HEADERS=config.h:config.in \
CONFIG_COMMANDS="default depdir" \
CONFIG_FILES= \
CONFIG_LINKS= \
$(SHELL) config.status
-config.status: configure configure.tgt configure.host
+config.status: $(srcdir)/configure configure.tgt configure.host
$(SHELL) config.status --recheck
+ACLOCAL = aclocal
+ACLOCAL_AMFLAGS = -I gnulib/m4
+aclocal_m4_deps = \
+ configure.ac \
+ gnulib/m4/extensions.m4 \
+ gnulib/m4/gnulib-common.m4 \
+ gnulib/m4/gnulib-comp.m4 \
+ gnulib/m4/include_next.m4 \
+ gnulib/m4/longlong.m4 \
+ gnulib/m4/memchr.m4 \
+ gnulib/m4/memcmp.m4 \
+ gnulib/m4/memmem.m4 \
+ gnulib/m4/onceonly_2_57.m4 \
+ gnulib/m4/stdint.m4 \
+ gnulib/m4/string_h.m4 \
+ gnulib/m4/wchar.m4 \
+ ../config/extensions.m4 \
+ ../config/lead-dot.m4 \
+ ../config/proginstall.m4 \
+ ../bfd/bfd.m4 \
+ ../config/acinclude.m4 \
+ ../config/override.m4 \
+ ../config/gettext-sister.m4 \
+ ../config/lib-ld.m4 \
+ ../config/lib-prefix.m4 \
+ ../config/lib-link.m4 \
+ ../config/acx.m4 \
+ ../config/tcl.m4 \
+ ../config/depstand.m4 \
+ ../config/lcmessage.m4 \
+ ../config/codeset.m4
+
+$(srcdir)/aclocal.m4: @MAINTAINER_MODE_TRUE@ $(aclocal_m4_deps)
+ cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+
+AUTOCONF = autoconf
+configure_deps = $(srcdir)/configure.ac $(srcdir)/aclocal.m4
+$(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(configure_deps)
+ cd $(srcdir) && $(AUTOCONF)
+
+AUTOHEADER = autoheader
+$(srcdir)/config.in: @MAINTAINER_MODE_TRUE@ $(configure_deps)
+ cd $(srcdir) && $(AUTOHEADER)
+ rm -f stamp-h
+ touch $@
+
+# automatic rebuilding in automake-generated Makefiles requires
+# this rule in the toplevel Makefile, which, with GNU make, causes
+# the desired updates through the implicit regeneration of the Makefile
+# and all of its prerequisites.
+am--refresh:
+ @:
+
force:
# Documentation!