From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1285) id 0E7423857C61; Mon, 10 May 2021 23:26:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0E7423857C61 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Eric Botcazou To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-694] Avoid spurious rebuild actions in ada/gen_il X-Act-Checkin: gcc X-Git-Author: Eric Botcazou X-Git-Refname: refs/heads/master X-Git-Oldrev: ead233e6ff01c0bcaffce567ef656259fcc3530d X-Git-Newrev: ebffafe9cf8671bab6da8debdf406b1e2c5ed194 Message-Id: <20210510232601.0E7423857C61@sourceware.org> Date: Mon, 10 May 2021 23:26:01 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 May 2021 23:26:01 -0000 https://gcc.gnu.org/g:ebffafe9cf8671bab6da8debdf406b1e2c5ed194 commit r12-694-gebffafe9cf8671bab6da8debdf406b1e2c5ed194 Author: Eric Botcazou 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