[RFC] Make "all" depend on "info"

Message ID 20181020183429.21188-1-tom@tromey.com
State Superseded
Headers show
Series
  • [RFC] Make "all" depend on "info"
Related show

Commit Message

Tom Tromey Oct. 20, 2018, 6:34 p.m.
I've broken "make info" a couple of times now, because I sometimes
forget to run "make info" after modifying a Texinfo file.

I don't know why gdb's "make all" doesn't build the info pages.  I
suspect this was some Cygnus-local oddity back in the day.

This patch changes doc/Makefile.in so that the info pages are built by
"make all".  As a point of reference, Automake has essentially always
worked this way.  According to the Automake manual (I didn't
double-check) this is required by the GNU coding standards.

gdb/doc/ChangeLog
2018-10-20  Tom Tromey  <tom@tromey.com>

	* Makefile.in (all): Depend on "info".
---
 gdb/doc/ChangeLog   | 4 ++++
 gdb/doc/Makefile.in | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

-- 
2.17.1

Comments

Simon Marchi Oct. 20, 2018, 9:19 p.m. | #1
On 2018-10-20 14:34, Tom Tromey wrote:
> I've broken "make info" a couple of times now, because I sometimes

> forget to run "make info" after modifying a Texinfo file.

> 

> I don't know why gdb's "make all" doesn't build the info pages.  I

> suspect this was some Cygnus-local oddity back in the day.

> 

> This patch changes doc/Makefile.in so that the info pages are built by

> "make all".  As a point of reference, Automake has essentially always

> worked this way.  According to the Automake manual (I didn't

> double-check) this is required by the GNU coding standards.


IIRC, another weird consequence of the current situation is that if you 
do ./configure && make && sudo make install, the doc artifacts will be 
generated during make install, so owned by root.  I believe everything 
should be generated by "make", and make install should only install the 
files in the prefix.

Simon
Kevin Buettner Oct. 20, 2018, 9:44 p.m. | #2
On Sat, 20 Oct 2018 12:34:29 -0600
Tom Tromey <tom@tromey.com> wrote:

> I've broken "make info" a couple of times now, because I sometimes

> forget to run "make info" after modifying a Texinfo file.

> 

> I don't know why gdb's "make all" doesn't build the info pages.  I

> suspect this was some Cygnus-local oddity back in the day.

> 

> This patch changes doc/Makefile.in so that the info pages are built by

> "make all".  As a point of reference, Automake has essentially always

> worked this way.  According to the Automake manual (I didn't

> double-check) this is required by the GNU coding standards.

> 

> gdb/doc/ChangeLog

> 2018-10-20  Tom Tromey  <tom@tromey.com>

> 

> 	* Makefile.in (all): Depend on "info".


I'm in favor of this change.

Kevin
Sergio Durigan Junior Oct. 20, 2018, 10:13 p.m. | #3
On Saturday, October 20 2018, Tom Tromey wrote:

> I've broken "make info" a couple of times now, because I sometimes

> forget to run "make info" after modifying a Texinfo file.

>

> I don't know why gdb's "make all" doesn't build the info pages.  I

> suspect this was some Cygnus-local oddity back in the day.

>

> This patch changes doc/Makefile.in so that the info pages are built by

> "make all".  As a point of reference, Automake has essentially always

> worked this way.  According to the Automake manual (I didn't

> double-check) this is required by the GNU coding standards.


I think it makes sense, especially because "info" the default
documentation format for GNU.

I was wondering if it would also make sense to build the documentation
on the BuildBot.

> gdb/doc/ChangeLog

> 2018-10-20  Tom Tromey  <tom@tromey.com>

>

> 	* Makefile.in (all): Depend on "info".

> ---

>  gdb/doc/ChangeLog   | 4 ++++

>  gdb/doc/Makefile.in | 2 +-

>  2 files changed, 5 insertions(+), 1 deletion(-)

>

> diff --git a/gdb/doc/Makefile.in b/gdb/doc/Makefile.in

> index 0323bc4ecb..4e167d59cf 100644

> --- a/gdb/doc/Makefile.in

> +++ b/gdb/doc/Makefile.in

> @@ -182,7 +182,7 @@ HAVE_NATIVE_GCORE_TARGET = @HAVE_NATIVE_GCORE_TARGET@

>  

>  ###

>  

> -all:

> +all: info

>  

>  info: $(INFO_DEPS)

>  dvi: gdb.dvi stabs.dvi refcard.dvi annotate.dvi

> -- 

> 2.17.1


-- 
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF  31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/
Tom Tromey Nov. 29, 2018, 7:23 p.m. | #4
>>>>> "Tom" == Tom Tromey <tom@tromey.com> writes:


Tom> This patch changes doc/Makefile.in so that the info pages are built by
Tom> "make all".  As a point of reference, Automake has essentially always
Tom> worked this way.  According to the Automake manual (I didn't
Tom> double-check) this is required by the GNU coding standards.

I haven't checked this in yet, because I remembered there are a number
of bugs in bugzilla from users who don't have (and maybe also don't
want) makeinfo installed.  So, I thought I'd hold off on this until I
find the time to come up with a solution for them.

Tom

Patch

diff --git a/gdb/doc/Makefile.in b/gdb/doc/Makefile.in
index 0323bc4ecb..4e167d59cf 100644
--- a/gdb/doc/Makefile.in
+++ b/gdb/doc/Makefile.in
@@ -182,7 +182,7 @@  HAVE_NATIVE_GCORE_TARGET = @HAVE_NATIVE_GCORE_TARGET@
 
 ###
 
-all:
+all: info
 
 info: $(INFO_DEPS)
 dvi: gdb.dvi stabs.dvi refcard.dvi annotate.dvi