Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* toplevel Makefile.in: autogenerate more
@ 2002-09-24 16:41 Nathanael Nerode
  2002-09-24 16:46 ` DJ Delorie
  0 siblings, 1 reply; 4+ messages in thread
From: Nathanael Nerode @ 2002-09-24 16:41 UTC (permalink / raw)
  To: gcc-patches, binutils, gdb-patches, dj

This patch causes more repetitive material to be generated by autogen.  Only
changes in Makefile.in are a couple of changes of order and spacing.  (Plus 
the previous Makefile.in I committed was slightly out of date, missing the 
rule to regenerate Makefile.in.)

2002-09-24  Nathanael Nerode  <neroden@gcc.gnu.org>
	* Makefile.tpl: Autogenerate *-target-* lists.
	* Makefile.def: Ditto.
	* Makefile.in: Rebuild.

Index: Makefile.tpl
===================================================================
RCS file: /cvs/gcc/gcc/Makefile.tpl,v
retrieving revision 1.1
diff -u -3 -r1.1 Makefile.tpl
--- Makefile.tpl	24 Sep 2002 22:51:57 -0000	1.1
+++ Makefile.tpl	24 Sep 2002 23:36:06 -0000
@@ -594,95 +594,31 @@
 
 # This is a list of the targets for all of the modules which are compiled
 # using $(TARGET_FLAGS_TO_PASS).
-ALL_TARGET_MODULES = \
-	all-target-libstdc++-v3 \
-	all-target-newlib \
-	all-target-libf2c \
-	all-target-libobjc \
-	all-target-libtermcap \
-	all-target-winsup \
-	all-target-libgloss \
-	all-target-libiberty \
-	all-target-gperf \
-	all-target-examples \
-	all-target-libffi \
-	all-target-libjava \
-	all-target-zlib \
-	all-target-boehm-gc \
-	all-target-qthreads
+ALL_TARGET_MODULES = [+ FOR target_modules +]\
+	all-target-[+module+] [+ ENDFOR target_modules +]
 
 # This is a list of the configure targets for all of the modules which
 # are compiled using the target tools.
-CONFIGURE_TARGET_MODULES = \
-	configure-target-libstdc++-v3 \
-	configure-target-newlib \
-	configure-target-libf2c \
-	configure-target-libobjc \
-	configure-target-libtermcap \
-	configure-target-winsup \
-	configure-target-libgloss \
-	configure-target-libiberty \
-	configure-target-gperf \
-	configure-target-examples \
-	configure-target-libffi \
-	configure-target-libjava \
-	configure-target-zlib \
-	configure-target-boehm-gc \
-	configure-target-qthreads
+CONFIGURE_TARGET_MODULES = [+ FOR target_modules +]\
+	configure-target-[+module+] [+ ENDFOR target_modules +]
 
 # This is a list of the check targets for all of the modules which are
 # compiled using $(TARGET_FLAGS_TO_PASS).
-CHECK_TARGET_MODULES = \
-	check-target-libstdc++-v3 \
-	check-target-newlib \
-	check-target-libf2c \
-	check-target-libobjc \
-	check-target-winsup \
-	check-target-libiberty \
-	check-target-libffi \
-	check-target-libjava \
-	check-target-zlib \
-	check-target-boehm-gc \
-	check-target-qthreads \
-	check-target-gperf
+CHECK_TARGET_MODULES = [+ FOR target_modules +][+ IF no_check +][+ ELSE check +]\
+	check-target-[+module+] [+ ENDIF no_check +][+ ENDFOR target_modules +]
 
 # This is a list of the install targets for all of the modules which are
 # compiled using $(TARGET_FLAGS_TO_PASS).
-INSTALL_TARGET_MODULES = \
-	install-target-libstdc++-v3 \
-	install-target-newlib \
-	install-target-libf2c \
-	install-target-libobjc \
-	install-target-libtermcap \
-	install-target-winsup \
-	install-target-libgloss \
-	install-target-libiberty \
-	install-target-libjava \
-	install-target-zlib \
-	install-target-boehm-gc \
-	install-target-qthreads \
-	install-target-gperf
+INSTALL_TARGET_MODULES = [+ FOR target_modules +][+ IF no_install +][+ ELSE install +]\
+	install-target-[+module+] [+ ENDIF no_install +][+ ENDFOR target_modules +]
 
 # This is a list of the targets for which we can do a clean-{target}.
 CLEAN_MODULES = [+ FOR host_modules +][+ IF no_clean +][+ ELSE no_clean +]\
 	clean-[+module+] [+ ENDIF no_clean +][+ ENDFOR host_modules +]
 
 # All of the target modules that can be cleaned
-CLEAN_TARGET_MODULES = \
-	clean-target-libstdc++-v3 \
-	clean-target-newlib \
-	clean-target-libf2c \
-	clean-target-libobjc \
-	clean-target-winsup \
-	clean-target-libgloss \
-	clean-target-libiberty \
-	clean-target-gperf \
-	clean-target-examples \
-	clean-target-libffi \
-	clean-target-libjava \
-	clean-target-zlib \
-	clean-target-boehm-gc \
-	clean-target-qthreads
+CLEAN_TARGET_MODULES = [+ FOR target_modules +][+ IF no_clean +][+ ELSE clean +]\
+	clean-target-[+module+] [+ ENDIF no_clean +][+ ENDFOR target_modules +]
 
 # All of the x11 modules that can be cleaned
 CLEAN_X11_MODULES = \
Index: Makefile.def
===================================================================
RCS file: /cvs/gcc/gcc/Makefile.def,v
retrieving revision 1.1
diff -u -3 -r1.1 Makefile.def
--- Makefile.def	24 Sep 2002 22:51:56 -0000	1.1
+++ Makefile.def	24 Sep 2002 23:36:06 -0000
@@ -63,3 +63,19 @@
 host_modules= { module= wdiff; };
 host_modules= { module= zip; no_check_cross=true; };
 host_modules= { module= zlib; no_install=true; no_check=true; };
+
+target_modules = { module= libstdc++-v3; };
+target_modules = { module= newlib; };
+target_modules = { module= libf2c; };
+target_modules = { module= libobjc; };
+target_modules = { module= libtermcap; no_check=true; no_clean=true; };
+target_modules = { module= winsup; };
+target_modules = { module= libgloss; no_check=true; };
+target_modules = { module= libiberty; };
+target_modules = { module= gperf; };
+target_modules = { module= examples; no_check=true; no_install=true; };
+target_modules = { module= libffi; no_install=true; };
+target_modules = { module= libjava; };
+target_modules = { module= zlib; };
+target_modules = { module= boehm-gc; };
+target_modules = { module= qthreads; };
Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/Makefile.in,v
retrieving revision 1.112
diff -u -3 -r1.112 Makefile.in
--- Makefile.in	24 Sep 2002 22:51:57 -0000	1.112
+++ Makefile.in	24 Sep 2002 23:36:08 -0000
@@ -771,7 +771,7 @@
 	all-target-libjava \
 	all-target-zlib \
 	all-target-boehm-gc \
-	all-target-qthreads
+	all-target-qthreads 
 
 # This is a list of the configure targets for all of the modules which
 # are compiled using the target tools.
@@ -790,7 +790,7 @@
 	configure-target-libjava \
 	configure-target-zlib \
 	configure-target-boehm-gc \
-	configure-target-qthreads
+	configure-target-qthreads 
 
 # This is a list of the check targets for all of the modules which are
 # compiled using $(TARGET_FLAGS_TO_PASS).
@@ -801,12 +801,12 @@
 	check-target-libobjc \
 	check-target-winsup \
 	check-target-libiberty \
+	check-target-gperf \
 	check-target-libffi \
 	check-target-libjava \
 	check-target-zlib \
 	check-target-boehm-gc \
-	check-target-qthreads \
-	check-target-gperf
+	check-target-qthreads 
 
 # This is a list of the install targets for all of the modules which are
 # compiled using $(TARGET_FLAGS_TO_PASS).
@@ -819,11 +819,11 @@
 	install-target-winsup \
 	install-target-libgloss \
 	install-target-libiberty \
+	install-target-gperf \
 	install-target-libjava \
 	install-target-zlib \
 	install-target-boehm-gc \
-	install-target-qthreads \
-	install-target-gperf
+	install-target-qthreads 
 
 # This is a list of the targets for which we can do a clean-{target}.
 CLEAN_MODULES = \
@@ -903,7 +903,7 @@
 	clean-target-libjava \
 	clean-target-zlib \
 	clean-target-boehm-gc \
-	clean-target-qthreads
+	clean-target-qthreads 
 
 # All of the x11 modules that can be cleaned
 CLEAN_X11_MODULES = \
@@ -1787,6 +1787,10 @@
 # the user could load to tell emacs19 where all the TAGS files we just
 # built are.
 TAGS: do-TAGS
+
+# Rebuilding Makefile.in, using autogen.
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.tpl $(srcdir)/Makefile.def
+	cd $(srcdir) && autogen Makefile.def
 
 # with the gnu make, this is done automatically.
 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: toplevel Makefile.in: autogenerate more
  2002-09-24 16:41 toplevel Makefile.in: autogenerate more Nathanael Nerode
@ 2002-09-24 16:46 ` DJ Delorie
  2002-09-24 19:44   ` Alexandre Oliva
  0 siblings, 1 reply; 4+ messages in thread
From: DJ Delorie @ 2002-09-24 16:46 UTC (permalink / raw)
  To: neroden; +Cc: gcc-patches, binutils, gdb-patches


> +# Rebuilding Makefile.in, using autogen.
> +$(srcdir)/Makefile.in: $(srcdir)/Makefile.tpl $(srcdir)/Makefile.def
> +	cd $(srcdir) && autogen Makefile.def

As much as I like automation, this rule is bad.  Not everyone has
autogen, and those who don't shouldn't get penalized if they happen to
get the timestamps rearranged.  IIRC back when we were discussing
using autogen, we decided that Makefile.in would not normally be built
automatically, to avoid such things.

It may be acceptable to make this target conditional on
--enable-maintainer-mode, since maintainers are expected to have all
the esoteric packages required for regens.

Perhaps, for now, the rule could stay if it had a .PHONY target?


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: toplevel Makefile.in: autogenerate more
  2002-09-24 16:46 ` DJ Delorie
@ 2002-09-24 19:44   ` Alexandre Oliva
  2002-09-25  2:26     ` Richard Earnshaw
  0 siblings, 1 reply; 4+ messages in thread
From: Alexandre Oliva @ 2002-09-24 19:44 UTC (permalink / raw)
  To: DJ Delorie; +Cc: neroden, gcc-patches, binutils, gdb-patches

On Sep 24, 2002, DJ Delorie <dj@delorie.com> wrote:

> As much as I like automation, this rule is bad.  Not everyone has
> autogen, and those who don't shouldn't get penalized if they happen to
> get the timestamps rearranged.

If they use the recommended script, contrib/gcc_update, they'll get it
right.

If the rule is not to be activated, I'd rather have it in Makefile.in,
even if commented out, than not at all.  How about:

Makefile.in: # Makefile.tpl Makefile.def  # srcdir omitted for clarity
        ...

so, if one removes Makefile.in, we try to rebuild it, otherwise it
won't be modified just because you touched one of the other files, but
the deps are still documented.

Then, when we get --enable-maintainer-mode in the top level, we'll
just have to replace the `#' with @MAINT@.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: toplevel Makefile.in: autogenerate more
  2002-09-24 19:44   ` Alexandre Oliva
@ 2002-09-25  2:26     ` Richard Earnshaw
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Earnshaw @ 2002-09-25  2:26 UTC (permalink / raw)
  To: Alexandre Oliva
  Cc: DJ Delorie, neroden, gcc-patches, binutils, gdb-patches,
	Richard.Earnshaw

> On Sep 24, 2002, DJ Delorie <dj@delorie.com> wrote:
> 
> > As much as I like automation, this rule is bad.  Not everyone has
> > autogen, and those who don't shouldn't get penalized if they happen to
> > get the timestamps rearranged.
> 
> If they use the recommended script, contrib/gcc_update, they'll get it
> right.

Not if you are updating gdb, or binutils it won't.

R.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-09-25  9:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-24 16:41 toplevel Makefile.in: autogenerate more Nathanael Nerode
2002-09-24 16:46 ` DJ Delorie
2002-09-24 19:44   ` Alexandre Oliva
2002-09-25  2:26     ` Richard Earnshaw

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox