From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 8A0E33861C74 for ; Wed, 23 Mar 2022 10:50:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8A0E33861C74 Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-213--JCqbU5vPOue9aYrv1Yrrg-1; Wed, 23 Mar 2022 06:50:35 -0400 X-MC-Unique: -JCqbU5vPOue9aYrv1Yrrg-1 Received: by mail-wr1-f71.google.com with SMTP id q4-20020adfc504000000b00203e15159e8so378608wrf.6 for ; Wed, 23 Mar 2022 03:50:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=spGfkYW17uYQNEl26xd83eYmVGQauxz3FKEoRFaBzIM=; b=ALe+ptyzf26oGctTJd5iNFlqLhBQ0MkUx2bQyAo1XZNnYp0QzuJxlekq6wc9mBJ9ia kfwS12xOa91aV83kLph6f8XRT70tC8kDTjyx4cub3ta+XeeYa5AeiZSN5k6AWVwuZ42k pWUlP/LRC6g6OWnidIVdSHOVUA7+jGHHHNNRR6G7P3Ciino2vAP3CPCUzToFkMAX3pgo 7D5O9P9DxMtlVEPGTPro6zs4xwy7JTm56EgSXZ2O2uXtb4Z147JVohiyxxHOdz3QgHlK 3hQ4aECF20M2u8WXLvyxXWC1cDkeNUF1o5PZrHQh4aLoSnZfk8xv0ldYYfv9f6QfZ/3r y44A== X-Gm-Message-State: AOAM532H7LaVJu/0AaD5OsYXcLjMJTBtUY+uFy3f4LGc1gwM0LWVGGhO Kfn40T+++3ON5CCILTvawBlBVfMWUYKJ7TfFWb94BqWMHus4P+peVuVt0jV1u7GakSMs5TPA+rz glvXvNQGKn9x6eNV+jCS/ppu+kzSXZRD2stB+5wRFKVfT1FPF6lrDl2VlsjenNkRqp2LqWwl5WA == X-Received: by 2002:a5d:5982:0:b0:204:1b19:40da with SMTP id n2-20020a5d5982000000b002041b1940damr10215950wri.23.1648032634222; Wed, 23 Mar 2022 03:50:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1LLtWcpnc0C/dX9eGTf2hjbhyvp1tWxDlf4aOTNi6UEYvBVopEBJpFh6kZALHdD1+BoOzhQ== X-Received: by 2002:a5d:5982:0:b0:204:1b19:40da with SMTP id n2-20020a5d5982000000b002041b1940damr10215914wri.23.1648032633866; Wed, 23 Mar 2022 03:50:33 -0700 (PDT) Received: from localhost (host109-158-45-15.range109-158.btcentralplus.com. [109.158.45.15]) by smtp.gmail.com with ESMTPSA id u7-20020a5d6da7000000b00203d9d1875bsm20047300wrs.73.2022.03.23.03.50.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Mar 2022 03:50:33 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCHv2 3/3] gdb/Makefile.in: move ALLDEPFILES earlier in Makefile.in Date: Wed, 23 Mar 2022 10:50:26 +0000 Message-Id: <62bade11f2797f1fd2d4b0c6c28fe122397768b7.1648032382.git.aburgess@redhat.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2022 10:50:39 -0000 If I do 'make tags' in the gdb build directory, the tags target does complete, but I see these warnings: ../../src/gdb/arm.c: No such file or directory ../../src/gdb/arm-get-next-pcs.c: No such file or directory ../../src/gdb/arm-linux.c: No such file or directory The reason for this is the ordering of build rules and make variables in gdb/Makefile.in, specifically, the placement of the tags related rules, and the ALLDEPFILES variable. The ordering is like this: TAGFILES_NO_SRCDIR = .... $(ALLDEPFILES) .... TAGS: $(TAGFILES_NO_SRCDIR) .... # Recipe uses $(TAGFILES_NO_SRCDIR) tags: TAGS ALLDEPFILES = ..... When the TAGS rule is parsed TAGFILES_NO_SRCDIR is expanded, which then expands ALLDEPFILES, which, at that point in the Makefile is undefined, and so expands to the empty string. As a result TAGS does not depend on any file listed in ALLDEPFILES. However, when the TAGS recipe is invoked ALLDEPFILES is now defined. As a result, all the files in ALLDEPFILES are passed to the etags program. The ALLDEPFILES references three files, arm.c, arm-get-next-pcs.c, and arm-linux.c, which are actually in the gdb/arch/ directory, but, in ALLDEPFILES these files don't include the arch/ prefix. As a result, the etags program ends up looking for these files in the wrong location. As ALLDEPFILES is only used by the TAGS rule, this mistake was not previously noticed (the TAGS rule itself was broken until a recent commit). In this commit I make two changes, first, I move ALLDEPFILES to be defined before TAGFILES_NO_SRCDIR, this means that the TAGS rule will depend on all the files in ALLDEPFILES. With this change the TAGS rule now breaks complaining that there's no rule to build the 3 files mentioned above. Next, I have added all *.c files in gdb/arch/ to ALLDEPFILES, including their arch/ prefix, and removed the incorrect (missing arch/ prefix) references. With these two changes the TAGS (or tags if you prefer) target now builds without any errors or warnings. --- gdb/Makefile.in | 447 +++++++++++++++++++++++++----------------------- 1 file changed, 229 insertions(+), 218 deletions(-) diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 3df09e6a43b..a775b2f4d19 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -1589,6 +1589,235 @@ HFILES_WITH_SRCDIR = \ DEPFILES = $(TARGET_OBS) $(SER_HARDWIRE) $(NATDEPFILES) $(SIM_OBS) +ALLDEPFILES = \ + arch/aarch32.c \ + arch/aarch64.c \ + arch/aarch64-insn.c \ + arch/aarch64-mte-linux.c \ + arch/amd64.c \ + arch/arc.c \ + arch/arm.c \ + arch/arm-get-next-pcs.c \ + arch/arm-linux.c \ + arch/i386.c \ + arch/loongarch.c \ + arch/ppc-linux-common.c \ + arch/riscv.c \ + arch/tic6x.c \ + aarch32-tdep.c \ + aarch64-fbsd-nat.c \ + aarch64-fbsd-tdep.c \ + aarch64-linux-nat.c \ + aarch64-linux-tdep.c \ + aarch64-newlib-tdep.c \ + aarch64-ravenscar-thread.c \ + aarch64-tdep.c \ + aix-thread.c \ + alpha-bsd-nat.c \ + alpha-bsd-tdep.c \ + alpha-linux-nat.c \ + alpha-linux-tdep.c \ + alpha-mdebug-tdep.c \ + alpha-netbsd-tdep.c \ + alpha-obsd-tdep.c \ + alpha-tdep.c \ + amd64-bsd-nat.c \ + amd64-darwin-tdep.c \ + amd64-dicos-tdep.c \ + amd64-fbsd-nat.c \ + amd64-fbsd-tdep.c \ + amd64-linux-nat.c \ + amd64-linux-tdep.c \ + amd64-nat.c \ + amd64-netbsd-nat.c \ + amd64-netbsd-tdep.c \ + amd64-obsd-nat.c \ + amd64-obsd-tdep.c \ + amd64-ravenscar-thread.c \ + amd64-sol2-tdep.c \ + amd64-tdep.c \ + arc-linux-nat.c \ + arc-tdep.c \ + arm-bsd-tdep.c \ + arm-fbsd-nat.c \ + arm-fbsd-tdep.c \ + arm-linux-nat.c \ + arm-linux-tdep.c \ + arm-netbsd-nat.c \ + arm-netbsd-tdep.c \ + arm-none-tdep.c \ + arm-obsd-tdep.c \ + arm-tdep.c \ + avr-tdep.c \ + bfin-linux-tdep.c \ + bfin-tdep.c \ + bpf-tdep.c \ + bsd-kvm.c \ + bsd-uthread.c \ + csky-linux-tdep.c \ + csky-tdep.c \ + darwin-nat.c \ + dicos-tdep.c \ + fbsd-nat.c \ + fbsd-tdep.c \ + fork-child.c \ + ft32-tdep.c \ + glibc-tdep.c \ + go32-nat.c \ + h8300-tdep.c \ + hppa-bsd-tdep.c \ + hppa-linux-nat.c \ + hppa-linux-tdep.c \ + hppa-netbsd-nat.c \ + hppa-netbsd-tdep.c \ + hppa-obsd-nat.c \ + hppa-obsd-tdep.c \ + hppa-tdep.c \ + i386-bsd-nat.c \ + i386-bsd-tdep.c \ + i386-darwin-nat.c \ + i386-darwin-tdep.c \ + i386-dicos-tdep.c \ + i386-fbsd-nat.c \ + i386-fbsd-tdep.c \ + i386-gnu-nat.c \ + i386-gnu-tdep.c \ + i386-linux-nat.c \ + i386-linux-tdep.c \ + i386-netbsd-nat.c \ + i386-netbsd-tdep.c \ + i386-obsd-nat.c \ + i386-obsd-tdep.c \ + i386-sol2-nat.c \ + i386-sol2-tdep.c \ + i386-tdep.c \ + i386-windows-tdep.c \ + i387-tdep.c \ + ia64-libunwind-tdep.c \ + ia64-linux-nat.c \ + ia64-linux-tdep.c \ + ia64-tdep.c \ + ia64-vms-tdep.c \ + inf-ptrace.c \ + linux-fork.c \ + linux-record.c \ + linux-tdep.c \ + lm32-tdep.c \ + loongarch-linux-nat.c \ + loongarch-linux-tdep.c \ + loongarch-tdep.c \ + m32r-linux-nat.c \ + m32r-linux-tdep.c \ + m32r-tdep.c \ + m68hc11-tdep.c \ + m68k-bsd-nat.c \ + m68k-bsd-tdep.c \ + m68k-linux-nat.c \ + m68k-linux-tdep.c \ + m68k-tdep.c \ + microblaze-linux-tdep.c \ + microblaze-tdep.c \ + mingw-hdep.c \ + mips-fbsd-nat.c \ + mips-fbsd-tdep.c \ + mips-linux-nat.c \ + mips-linux-tdep.c \ + mips-netbsd-nat.c \ + mips-netbsd-tdep.c \ + mips-sde-tdep.c \ + mips-tdep.c \ + mips64-obsd-nat.c \ + mips64-obsd-tdep.c \ + msp430-tdep.c \ + netbsd-nat.c \ + netbsd-tdep.c \ + nds32-tdep.c \ + nios2-linux-tdep.c \ + nios2-tdep.c \ + obsd-nat.c \ + obsd-tdep.c \ + or1k-linux-nat.c \ + posix-hdep.c \ + ppc-fbsd-nat.c \ + ppc-fbsd-tdep.c \ + ppc-linux-nat.c \ + ppc-linux-tdep.c \ + ppc-netbsd-nat.c \ + ppc-netbsd-tdep.c \ + ppc-obsd-nat.c \ + ppc-obsd-tdep.c \ + ppc-ravenscar-thread.c \ + ppc-sysv-tdep.c \ + ppc64-tdep.c \ + procfs.c \ + ravenscar-thread.c \ + remote-sim.c \ + riscv-fbsd-nat.c \ + riscv-fbsd-tdep.c \ + riscv-linux-nat.c \ + riscv-linux-tdep.c \ + riscv-none-tdep.c \ + riscv-ravenscar-thread.c \ + riscv-tdep.c \ + rl78-tdep.c \ + rs6000-aix-nat.c \ + rs6000-lynx178-tdep.c \ + rs6000-tdep.c \ + rx-tdep.c \ + s390-linux-nat.c \ + s390-linux-tdep.c \ + s390-tdep.c \ + ser-go32.c \ + ser-mingw.c \ + ser-pipe.c \ + ser-tcp.c \ + ser-uds.c \ + sh-netbsd-nat.c \ + sh-netbsd-tdep.c \ + sh-tdep.c \ + sol2-tdep.c \ + solib-aix.c \ + solib-svr4.c \ + sparc-linux-nat.c \ + sparc-linux-tdep.c \ + sparc-nat.c \ + sparc-netbsd-nat.c \ + sparc-netbsd-tdep.c \ + sparc-obsd-tdep.c \ + sparc-ravenscar-thread.c \ + sparc-sol2-nat.c \ + sparc-sol2-tdep.c \ + sparc-tdep.c \ + sparc64-fbsd-nat.c \ + sparc64-fbsd-tdep.c \ + sparc64-linux-nat.c \ + sparc64-linux-tdep.c \ + sparc64-nat.c \ + sparc64-netbsd-nat.c \ + sparc64-netbsd-tdep.c \ + sparc64-obsd-nat.c \ + sparc64-obsd-tdep.c \ + sparc64-sol2-tdep.c \ + sparc64-tdep.c \ + tilegx-linux-nat.c \ + tilegx-linux-tdep.c \ + tilegx-tdep.c \ + v850-tdep.c \ + vax-bsd-nat.c \ + vax-netbsd-tdep.c \ + vax-tdep.c \ + windows-nat.c \ + windows-tdep.c \ + x86-nat.c \ + x86-tdep.c \ + xcoffread.c \ + xstormy16-tdep.c \ + xtensa-config.c \ + xtensa-linux-nat.c \ + xtensa-linux-tdep.c \ + xtensa-tdep.c \ + xtensa-xtregs.c + # Don't include YYFILES (*.c) because we already include *.y in SFILES, # and it's more useful to see it in the .y file. TAGFILES_NO_SRCDIR = $(SFILES) $(HFILES_NO_SRCDIR) $(ALLDEPFILES) \ @@ -2132,224 +2361,6 @@ force_update: # will remove them. MAKEOVERRIDES = -ALLDEPFILES = \ - aarch32-tdep.c \ - aarch64-fbsd-nat.c \ - aarch64-fbsd-tdep.c \ - aarch64-linux-nat.c \ - aarch64-linux-tdep.c \ - aarch64-newlib-tdep.c \ - aarch64-ravenscar-thread.c \ - aarch64-tdep.c \ - aix-thread.c \ - alpha-bsd-nat.c \ - alpha-bsd-tdep.c \ - alpha-linux-nat.c \ - alpha-linux-tdep.c \ - alpha-mdebug-tdep.c \ - alpha-netbsd-tdep.c \ - alpha-obsd-tdep.c \ - alpha-tdep.c \ - amd64-bsd-nat.c \ - amd64-darwin-tdep.c \ - amd64-dicos-tdep.c \ - amd64-fbsd-nat.c \ - amd64-fbsd-tdep.c \ - amd64-linux-nat.c \ - amd64-linux-tdep.c \ - amd64-nat.c \ - amd64-netbsd-nat.c \ - amd64-netbsd-tdep.c \ - amd64-obsd-nat.c \ - amd64-obsd-tdep.c \ - amd64-ravenscar-thread.c \ - amd64-sol2-tdep.c \ - amd64-tdep.c \ - arc-linux-nat.c \ - arc-tdep.c \ - arm.c \ - arm-bsd-tdep.c \ - arm-fbsd-nat.c \ - arm-fbsd-tdep.c \ - arm-get-next-pcs.c \ - arm-linux.c \ - arm-linux-nat.c \ - arm-linux-tdep.c \ - arm-netbsd-nat.c \ - arm-netbsd-tdep.c \ - arm-none-tdep.c \ - arm-obsd-tdep.c \ - arm-tdep.c \ - avr-tdep.c \ - bfin-linux-tdep.c \ - bfin-tdep.c \ - bpf-tdep.c \ - bsd-kvm.c \ - bsd-uthread.c \ - csky-linux-tdep.c \ - csky-tdep.c \ - darwin-nat.c \ - dicos-tdep.c \ - fbsd-nat.c \ - fbsd-tdep.c \ - fork-child.c \ - ft32-tdep.c \ - glibc-tdep.c \ - go32-nat.c \ - h8300-tdep.c \ - hppa-bsd-tdep.c \ - hppa-linux-nat.c \ - hppa-linux-tdep.c \ - hppa-netbsd-nat.c \ - hppa-netbsd-tdep.c \ - hppa-obsd-nat.c \ - hppa-obsd-tdep.c \ - hppa-tdep.c \ - i386-bsd-nat.c \ - i386-bsd-tdep.c \ - i386-darwin-nat.c \ - i386-darwin-tdep.c \ - i386-dicos-tdep.c \ - i386-fbsd-nat.c \ - i386-fbsd-tdep.c \ - i386-gnu-nat.c \ - i386-gnu-tdep.c \ - i386-linux-nat.c \ - i386-linux-tdep.c \ - i386-netbsd-nat.c \ - i386-netbsd-tdep.c \ - i386-obsd-nat.c \ - i386-obsd-tdep.c \ - i386-sol2-nat.c \ - i386-sol2-tdep.c \ - i386-tdep.c \ - i386-windows-tdep.c \ - i387-tdep.c \ - ia64-libunwind-tdep.c \ - ia64-linux-nat.c \ - ia64-linux-tdep.c \ - ia64-tdep.c \ - ia64-vms-tdep.c \ - inf-ptrace.c \ - linux-fork.c \ - linux-record.c \ - linux-tdep.c \ - lm32-tdep.c \ - loongarch-linux-nat.c \ - loongarch-linux-tdep.c \ - loongarch-tdep.c \ - m32r-linux-nat.c \ - m32r-linux-tdep.c \ - m32r-tdep.c \ - m68hc11-tdep.c \ - m68k-bsd-nat.c \ - m68k-bsd-tdep.c \ - m68k-linux-nat.c \ - m68k-linux-tdep.c \ - m68k-tdep.c \ - microblaze-linux-tdep.c \ - microblaze-tdep.c \ - mingw-hdep.c \ - mips-fbsd-nat.c \ - mips-fbsd-tdep.c \ - mips-linux-nat.c \ - mips-linux-tdep.c \ - mips-netbsd-nat.c \ - mips-netbsd-tdep.c \ - mips-sde-tdep.c \ - mips-tdep.c \ - mips64-obsd-nat.c \ - mips64-obsd-tdep.c \ - msp430-tdep.c \ - netbsd-nat.c \ - netbsd-tdep.c \ - nds32-tdep.c \ - nios2-linux-tdep.c \ - nios2-tdep.c \ - obsd-nat.c \ - obsd-tdep.c \ - or1k-linux-nat.c \ - posix-hdep.c \ - ppc-fbsd-nat.c \ - ppc-fbsd-tdep.c \ - ppc-linux-nat.c \ - ppc-linux-tdep.c \ - ppc-netbsd-nat.c \ - ppc-netbsd-tdep.c \ - ppc-obsd-nat.c \ - ppc-obsd-tdep.c \ - ppc-ravenscar-thread.c \ - ppc-sysv-tdep.c \ - ppc64-tdep.c \ - procfs.c \ - ravenscar-thread.c \ - remote-sim.c \ - riscv-fbsd-nat.c \ - riscv-fbsd-tdep.c \ - riscv-linux-nat.c \ - riscv-linux-tdep.c \ - riscv-none-tdep.c \ - riscv-ravenscar-thread.c \ - riscv-tdep.c \ - rl78-tdep.c \ - rs6000-aix-nat.c \ - rs6000-lynx178-tdep.c \ - rs6000-tdep.c \ - rx-tdep.c \ - s390-linux-nat.c \ - s390-linux-tdep.c \ - s390-tdep.c \ - ser-go32.c \ - ser-mingw.c \ - ser-pipe.c \ - ser-tcp.c \ - ser-uds.c \ - sh-netbsd-nat.c \ - sh-netbsd-tdep.c \ - sh-tdep.c \ - sol2-tdep.c \ - solib-aix.c \ - solib-svr4.c \ - sparc-linux-nat.c \ - sparc-linux-tdep.c \ - sparc-nat.c \ - sparc-netbsd-nat.c \ - sparc-netbsd-tdep.c \ - sparc-obsd-tdep.c \ - sparc-ravenscar-thread.c \ - sparc-sol2-nat.c \ - sparc-sol2-tdep.c \ - sparc-tdep.c \ - sparc64-fbsd-nat.c \ - sparc64-fbsd-tdep.c \ - sparc64-linux-nat.c \ - sparc64-linux-tdep.c \ - sparc64-nat.c \ - sparc64-netbsd-nat.c \ - sparc64-netbsd-tdep.c \ - sparc64-obsd-nat.c \ - sparc64-obsd-tdep.c \ - sparc64-sol2-tdep.c \ - sparc64-tdep.c \ - tilegx-linux-nat.c \ - tilegx-linux-tdep.c \ - tilegx-tdep.c \ - v850-tdep.c \ - vax-bsd-nat.c \ - vax-netbsd-tdep.c \ - vax-tdep.c \ - windows-nat.c \ - windows-tdep.c \ - x86-nat.c \ - x86-tdep.c \ - xcoffread.c \ - xstormy16-tdep.c \ - xtensa-config.c \ - xtensa-linux-nat.c \ - xtensa-linux-tdep.c \ - xtensa-tdep.c \ - xtensa-xtregs.c - # Some files need explicit build rules (due to -Werror problems) or due # to sub-directory fun 'n' games. -- 2.25.4