gdb/gdbserver: add dependencies for distclean-gnulib
authorAndrew Burgess <andrew.burgess@embecosm.com>
Mon, 12 Oct 2020 15:04:32 +0000 (16:04 +0100)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Wed, 14 Oct 2020 14:05:14 +0000 (15:05 +0100)
After commit:

  commit 361cb219351d8b7e39e1962fe77f40aa80657b27
  Date:   Tue Oct 6 10:09:06 2020 +0100

      gnulib: Ensure all libraries are used when building gdb/gdbserver

We now get an error when, at the top level of the build tree, we do
'make distclean'.

The reason for this is that the gnulib directory is cleaned before the
gdb directory, cleaning gnulib deletes Makefile.gnulib.inc from the
gnulib build directory, which is currently pulled in by the gdb
Makefile.in using 'include'.

This commit adds a dependency between distclean-gnulib and both
distclean-gdb and distclean-gdbserver.  This means that gdb and
gdbserver will be cleaned before gnulib, as a result the
Makefile.gnulib.inc file should exist when needed.

ChangeLog:

* Makefile.in: Rebuild.
* Makefile.def: Make distclean-gnulib depend on distclean-gdb and
distclean-gdbserver.

ChangeLog
Makefile.def
Makefile.in

index 3e0e274ba31f6384f247e96feadf44c0b4c4b245..9daa7be3226e54547978730834ed5857ab3dc0dc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2020-10-14  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * Makefile.in: Rebuild.
+       * Makefile.def: Make distclean-gnulib depend on distclean-gdb and
+       distclean-gdbserver.
+
 2020-07-24  Aaron Merey  <amerey@redhat.com>
 
        * configure: Rebuild.
index 76d062bb671649040425f4835b958bc4780c1631..089e70ae3ed1a1dcbe586b6c2e0e3b25d14c7390 100644 (file)
@@ -548,6 +548,12 @@ dependencies = { module=configure-libctf; on=all-intl; };
 dependencies = { module=configure-libctf; on=all-zlib; };
 dependencies = { module=configure-libctf; on=all-libiconv; };
 
+// The Makefiles in gdb and gdbserver pull in a file that configure
+// generates in the gnulib directory, so distclean gnulib only after
+// gdb and gdbserver.
+dependencies = { module=distclean-gnulib; on=distclean-gdb; };
+dependencies = { module=distclean-gnulib; on=distclean-gdbserver; };
+
 // Warning, these are not well tested.
 dependencies = { module=all-bison; on=all-intl; };
 dependencies = { module=all-bison; on=all-build-texinfo; };
index 9dfd39fae1368dd4b065a7fe36d8c51b2961fcff..fe34132f9e518ad6a081bee51cf6578a741a18b1 100644 (file)
@@ -52366,6 +52366,8 @@ configure-stage3-libctf: maybe-all-stage3-libiconv
 configure-stage4-libctf: maybe-all-stage4-libiconv
 configure-stageprofile-libctf: maybe-all-stageprofile-libiconv
 configure-stagefeedback-libctf: maybe-all-stagefeedback-libiconv
+distclean-gnulib: maybe-distclean-gdb
+distclean-gnulib: maybe-distclean-gdbserver
 all-bison: maybe-all-build-texinfo
 all-flex: maybe-all-build-bison
 all-flex: maybe-all-m4