diff options
author | Tom Tromey <tom@tromey.com> | 2019-10-19 15:42:34 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-10-21 07:45:30 -0600 |
commit | a0a461e5b45f6fd9eb81774ad61e55b4917d4305 (patch) | |
tree | 6d563aa9b1cfc93576519b685f05a5f751ecfa45 /gdb/configure.ac | |
parent | 94cb3754118669d46c8ad87c986d8d9c59fac65a (diff) | |
download | gdb-a0a461e5b45f6fd9eb81774ad61e55b4917d4305.zip gdb-a0a461e5b45f6fd9eb81774ad61e55b4917d4305.tar.gz gdb-a0a461e5b45f6fd9eb81774ad61e55b4917d4305.tar.bz2 |
Fix creation of nm.h when configure is changed
My earlier patch -- commit c5adaa192 ("Fix creation of stamp-h by
gdb's configure script") -- broke the creation of nm.h. In
particular, configure removes nm.h, so if you touch configure and
rebuild, nothing will re-create the link, breaking the build.
This patch fixes the bug, and also updates configure.ac to use
AC_CONFIG_LINKS, rather than the obsolete AC_LINK_FILES.
Finally, I noticed that gcore is in generated_files in the
Makefile.in. I think this is incorrect, as generated_files is only
needed for files that can be the target of a #include. So, this patch
removes it.
gdb/ChangeLog
2019-10-21 Tom Tromey <tom@tromey.com>
* configure.ac (nm.h): Conditionally create nm.h link. Subst
NM_H. Use AC_CONFIG_LINKS.
* configure: Rebuild.
* Makefile.in (NM_H): New variable.
(generated_files): Add NM_H. Remove gcore.
(nm.h, stamp-nmh): New targets.
Change-Id: I8dd539785d52455e85389425e4bb996c8a127a0e
Diffstat (limited to 'gdb/configure.ac')
-rw-r--r-- | gdb/configure.ac | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/gdb/configure.ac b/gdb/configure.ac index c4e0dbf..dbe0150 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -2217,23 +2217,20 @@ else fi fi -# If nativefile (NAT_FILE) is not set in configure.nat, we link to an -# empty version. - -files= -links= - +NM_H= rm -f nm.h if test "${nativefile}" != ""; then case "${nativefile}" in nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;; * ) GDB_NM_FILE="${nativefile}" esac - files="${files} ${GDB_NM_FILE}" - links="${links} nm.h" + AC_CONFIG_LINKS([nm.h:$GDB_NM_FILE], [echo > stamp-nmh], + [GDB_NM_FILE=$GDB_NM_FILE]) AC_DEFINE_UNQUOTED(GDB_NM_FILE, "${GDB_NM_FILE}", [nativefile]) + NM_H=nm.h fi AC_SUBST(GDB_NM_FILE) +AC_SUBST(NM_H) dnl Add dependency for xsltproc if building with maintainer-mode enabled. AC_PATH_PROGS(XSLTPROC, xsltproc, missing) @@ -2244,8 +2241,6 @@ if test "x$USE_MAINTAINER_MODE" = xyes; then fi AC_SUBST(XSLTPROC) -AC_LINK_FILES($files, $links) - dnl Check for exe extension set on certain hosts (e.g. Win32) AC_EXEEXT |