public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-694] Avoid spurious rebuild actions in ada/gen_il
@ 2021-05-10 23:26 Eric Botcazou
  0 siblings, 0 replies; only message in thread
From: Eric Botcazou @ 2021-05-10 23:26 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:ebffafe9cf8671bab6da8debdf406b1e2c5ed194

commit r12-694-gebffafe9cf8671bab6da8debdf406b1e2c5ed194
Author: Eric Botcazou <ebotcazou@adacore.com>
Date:   Mon May 10 23:14:43 2021 +0200

    Avoid spurious rebuild actions in ada/gen_il
    
    This uses the same mechanism as for ada/snames and ada/sdefault to avoid
    spurious rebuild actions in the ada/gen_il directory.  This also avoids
    copying some files into the generated directory, which is unnecessary.
    
    gcc/ada/
            * Make-generated.in (do_gen_il): Replace with...
            (ada/stamp-gen_il): ...this.  Do not copy files into generated/.

Diff:
---
 gcc/ada/Make-generated.in | 49 ++++++++++-------------------------------------
 1 file changed, 10 insertions(+), 39 deletions(-)

diff --git a/gcc/ada/Make-generated.in b/gcc/ada/Make-generated.in
index 237444c7a26..26832beb589 100644
--- a/gcc/ada/Make-generated.in
+++ b/gcc/ada/Make-generated.in
@@ -15,10 +15,9 @@ fsrcdir := $(shell cd $(srcdir);${PWD_COMMAND})
 GEN_IL_INCLUDES = -I$(fsrcdir)/ada
 GEN_IL_FLAGS = -a -q -g -gnata -j0 -gnat2012 -gnatw.g -gnatyg -gnatU $(GEN_IL_INCLUDES)
 
-.PHONY: do_gen_il
-do_gen_il:
+ada/seinfo_tables.ads ada/seinfo_tables.adb ada/sinfo.h ada/einfo.h ada/nmake.ads ada/nmake.adb ada/seinfo.ads ada/sinfo-nodes.ads ada/sinfo-nodes.adb ada/einfo-entities.ads ada/einfo-entities.adb: ada/stamp-gen_il ; @true
+ada/stamp-gen_il: $(fsrcdir)/ada/gen_il* $(fsrcdir)/ada/libgnat/a-sto*.ad? $(fsrcdir)/ada/libgnat/a-stteou__bootstrap.ads
 	$(MKDIR) ada/gen_il
-	$(MKDIR) ada/generated
 	# Copy recent runtime files needed by gen_il that may not be available
 	# in the base compiler.
 	$(CP) -f $(fsrcdir)/ada/libgnat/a-sto*.ad? ada/gen_il
@@ -27,53 +26,25 @@ do_gen_il:
 	# ignore errors when running gen_il-main due to bootstrap
 	# considerations
 	-cd ada/gen_il ; ./gen_il-main
-
-ada/seinfo_tables.ads: do_gen_il
 	$(fsrcdir)/../move-if-change ada/gen_il/seinfo_tables.ads ada/seinfo_tables.ads
-
-ada/seinfo_tables.adb: do_gen_il
 	$(fsrcdir)/../move-if-change ada/gen_il/seinfo_tables.adb ada/seinfo_tables.adb
-
-# We need -gnatX to compile seinfo_tables, because it uses extensions. This
-# target is not currently used when building gnat, because these extensions
-# would cause bootstrapping with older compilers to fail. You can call it by
-# hand, as a sanity check that these files are legal.
-ada/seinfo_tables.o: ada/seinfo_tables.ads ada/seinfo_tables.adb
-	cd ada ; time gnatmake $(GEN_IL_INCLUDES) seinfo_tables.adb -gnatU -gnatX
-
-ada/sinfo.h: do_gen_il
 	$(fsrcdir)/../move-if-change ada/gen_il/sinfo.h ada/sinfo.h
-
-ada/einfo.h: do_gen_il
 	$(fsrcdir)/../move-if-change ada/gen_il/einfo.h ada/einfo.h
-
-ada/nmake.ads: do_gen_il
 	$(fsrcdir)/../move-if-change ada/gen_il/nmake.ads ada/nmake.ads
-	$(CP) ada/nmake.ads ada/generated
-
-ada/nmake.adb: do_gen_il
 	$(fsrcdir)/../move-if-change ada/gen_il/nmake.adb ada/nmake.adb
-	$(CP) ada/nmake.adb ada/generated
-
-ada/seinfo.ads: do_gen_il
 	$(fsrcdir)/../move-if-change ada/gen_il/seinfo.ads ada/seinfo.ads
-	$(CP) ada/seinfo.ads ada/generated
-
-ada/sinfo-nodes.ads: do_gen_il
 	$(fsrcdir)/../move-if-change ada/gen_il/sinfo-nodes.ads ada/sinfo-nodes.ads
-	$(CP) ada/sinfo-nodes.ads ada/generated
-
-ada/sinfo-nodes.adb: do_gen_il
 	$(fsrcdir)/../move-if-change ada/gen_il/sinfo-nodes.adb ada/sinfo-nodes.adb
-	$(CP) ada/sinfo-nodes.adb ada/generated
-
-ada/einfo-entities.ads: do_gen_il
 	$(fsrcdir)/../move-if-change ada/gen_il/einfo-entities.ads ada/einfo-entities.ads
-	$(CP) ada/einfo-entities.ads ada/generated
-
-ada/einfo-entities.adb: do_gen_il
 	$(fsrcdir)/../move-if-change ada/gen_il/einfo-entities.adb ada/einfo-entities.adb
-	$(CP) ada/einfo-entities.adb ada/generated
+	touch ada/stamp-gen_il
+
+# We need -gnatX to compile seinfo_tables, because it uses extensions. This
+# target is not currently used when building gnat, because these extensions
+# would cause bootstrapping with older compilers to fail. You can call it by
+# hand, as a sanity check that these files are legal.
+ada/seinfo_tables.o: ada/seinfo_tables.ads ada/seinfo_tables.adb
+	cd ada ; gnatmake $(GEN_IL_INCLUDES) seinfo_tables.adb -gnatU -gnatX
 
 ada/snames.h ada/snames.ads ada/snames.adb : ada/stamp-snames ; @true
 ada/stamp-snames : ada/snames.ads-tmpl ada/snames.adb-tmpl ada/snames.h-tmpl ada/xsnamest.adb ada/xutil.ads ada/xutil.adb


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-10 23:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-10 23:26 [gcc r12-694] Avoid spurious rebuild actions in ada/gen_il Eric Botcazou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).