Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/gdb (7.9): fix doc build when makeinfo is missing
@ 2015-09-05 14:30 Romain Naour
  2015-09-05 14:30 ` [Buildroot] [PATCH 2/2] package/gdb (7.10): fix doc build when make info " Romain Naour
  2015-09-05 18:09 ` [Buildroot] [PATCH 1/2] package/gdb (7.9): fix doc build when makeinfo " Thomas Petazzoni
  0 siblings, 2 replies; 6+ messages in thread
From: Romain Naour @ 2015-09-05 14:30 UTC (permalink / raw)
  To: buildroot

If makeinfo is not found in the system then the missing
script is used to warn the user.

Before commit e30465112ed4c6320dd19107302057a5f7712cf2 the missing
script returned 0 after printing the message.

Now, missing return 127 (command not found) to the Makefile and
the build fail.

Ignore the code returned by missing in order to build successfully
gdb even if makeinfo is not installed on the system.

upstream status: to be submitted

Fixes:
http://autobuild.buildroot.net/results/dee/dee1326baf26ad1eb6e12a7d033428eca50d00bc/build-end.log

Signed-off-by: Romain Naour <romain.naour@openwide.fr>
---
 ...db-fix-doc-build-when-makeinfo-is-missing.patch | 73 ++++++++++++++++++++++
 1 file changed, 73 insertions(+)
 create mode 100644 package/gdb/7.9.1/0004-gdb-fix-doc-build-when-makeinfo-is-missing.patch

diff --git a/package/gdb/7.9.1/0004-gdb-fix-doc-build-when-makeinfo-is-missing.patch b/package/gdb/7.9.1/0004-gdb-fix-doc-build-when-makeinfo-is-missing.patch
new file mode 100644
index 0000000..ca73750
--- /dev/null
+++ b/package/gdb/7.9.1/0004-gdb-fix-doc-build-when-makeinfo-is-missing.patch
@@ -0,0 +1,73 @@
+From e282f9d2a24f72ff7bb9bfb20dbdea299982bda0 Mon Sep 17 00:00:00 2001
+From: Romain Naour <romain.naour@openwide.fr>
+Date: Sat, 5 Sep 2015 16:02:28 +0200
+Subject: [PATCH] gdb: fix doc build when makeinfo is missing
+
+If makeinfo is not found in the system then the missing
+script is used to warn the user.
+
+Before commit e30465112ed4c6320dd19107302057a5f7712cf2 the missing
+script returned 0 after printing the message.
+
+Now, missing return 127 (command not found) to the Makefile and
+the build fail.
+
+Ignore the code returned by missing in order to build successfully
+gdb even if makeinfo is not installed on the system.
+
+Fixes:
+http://autobuild.buildroot.net/results/dee/dee1326baf26ad1eb6e12a7d033428eca50d00bc/build-end.log
+
+Signed-off-by: Romain Naour <romain.naour@openwide.fr>
+---
+ gdb/doc/Makefile.in | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/gdb/doc/Makefile.in b/gdb/doc/Makefile.in
+index bd30a81..fe276d6 100644
+--- a/gdb/doc/Makefile.in
++++ b/gdb/doc/Makefile.in
+@@ -485,7 +485,7 @@ gdb.pdf: ${GDB_DOC_FILES}
+ # GDB MANUAL: info file
+ gdb.info: ${GDB_DOC_FILES}
+ 	$(MAKEINFO_CMD) $(READLINE_TEXI_INCFLAG) -I ${GDBMI_DIR} -I $(srcdir) \
+-		-o gdb.info $(srcdir)/gdb.texinfo
++		-o gdb.info $(srcdir)/gdb.texinfo | true
+ 
+ # GDB MANUAL: roff translations
+ # Try to use a recent texi2roff.  v2 was put on prep in jan91.
+@@ -560,15 +560,15 @@ gdb.mm: $(GDB_DOC_FILES) links2roff
+ # GDB MANUAL: HTML file
+ 
+ gdb/index.html: ${GDB_DOC_FILES}
+-	$(MAKEHTML) $(MAKEHTMLFLAGS) $(READLINE_TEXI_INCFLAG) -I ${GDBMI_DIR} -I $(srcdir) $(srcdir)/gdb.texinfo
++	$(MAKEHTML) $(MAKEHTMLFLAGS) $(READLINE_TEXI_INCFLAG) -I ${GDBMI_DIR} -I $(srcdir) $(srcdir)/gdb.texinfo | true
+ 
+ stabs.info: $(STABS_DOC_FILES)
+-	$(MAKEINFO_CMD) -I $(srcdir) -o stabs.info $(srcdir)/stabs.texinfo
++	$(MAKEINFO_CMD) -I $(srcdir) -o stabs.info $(srcdir)/stabs.texinfo | true
+ 
+ # STABS DOCUMENTATION: HTML file
+ 
+ stabs/index.html: $(STABS_DOC_FILES)
+-	$(MAKEHTML) $(MAKEHTMLFLAGS) -I $(srcdir) $(srcdir)/stabs.texinfo
++	$(MAKEHTML) $(MAKEHTMLFLAGS) -I $(srcdir) $(srcdir)/stabs.texinfo | true
+ 
+ # Clean these up before each run.  Avoids a catch 22 with not being
+ # able to re-generate these files (to fix a corruption) because these
+@@ -607,10 +607,10 @@ annotate.pdf: $(ANNOTATE_DOC_FILES)
+ 	$(TEXI2DVI) --pdf -I $(srcdir) $(srcdir)/annotate.texinfo
+ 
+ annotate.info: $(ANNOTATE_DOC_FILES)
+-	$(MAKEINFO_CMD) -I $(srcdir) -o annotate.info $(srcdir)/annotate.texinfo
++	$(MAKEINFO_CMD) -I $(srcdir) -o annotate.info $(srcdir)/annotate.texinfo | true
+ 
+ annotate/index.html: $(ANNOTATE_DOC_FILES)
+-	$(MAKEHTML) $(MAKEHTMLFLAGS) -I $(srcdir) $(srcdir)/annotate.texinfo
++	$(MAKEHTML) $(MAKEHTMLFLAGS) -I $(srcdir) $(srcdir)/annotate.texinfo | true
+ 
+ # Man pages
+ gdb.1: $(GDB_DOC_FILES)
+-- 
+2.4.3
+
-- 
2.4.3

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 2/2] package/gdb (7.10): fix doc build when make info is missing
  2015-09-05 14:30 [Buildroot] [PATCH 1/2] package/gdb (7.9): fix doc build when makeinfo is missing Romain Naour
@ 2015-09-05 14:30 ` Romain Naour
  2015-09-05 18:09 ` [Buildroot] [PATCH 1/2] package/gdb (7.9): fix doc build when makeinfo " Thomas Petazzoni
  1 sibling, 0 replies; 6+ messages in thread
From: Romain Naour @ 2015-09-05 14:30 UTC (permalink / raw)
  To: buildroot

If makeinfo is not found in the system then the missing
script is used to warn the user.

Before commit e30465112ed4c6320dd19107302057a5f7712cf2 the missing
script returned 0 after printing the message.

Now, missing return 127 (command not found) to the Makefile and
the build fail.

Ignore the code returned by missing in order to build successfully
gdb even if makeinfo is not installed on the system.

upstream status: to be submitted

Fixes:
http://autobuild.buildroot.net/results/dee/dee1326baf26ad1eb6e12a7d033428eca50d00bc/build-end.log

Signed-off-by: Romain Naour <romain.naour@openwide.fr>
---
 ...db-fix-doc-build-when-makeinfo-is-missing.patch | 73 ++++++++++++++++++++++
 1 file changed, 73 insertions(+)
 create mode 100644 package/gdb/7.10/0001-gdb-fix-doc-build-when-makeinfo-is-missing.patch

diff --git a/package/gdb/7.10/0001-gdb-fix-doc-build-when-makeinfo-is-missing.patch b/package/gdb/7.10/0001-gdb-fix-doc-build-when-makeinfo-is-missing.patch
new file mode 100644
index 0000000..e57737d
--- /dev/null
+++ b/package/gdb/7.10/0001-gdb-fix-doc-build-when-makeinfo-is-missing.patch
@@ -0,0 +1,73 @@
+From be4bff50cf256d3f82240bd6bea9b43f22e82ce6 Mon Sep 17 00:00:00 2001
+From: Romain Naour <romain.naour@openwide.fr>
+Date: Sat, 5 Sep 2015 16:02:28 +0200
+Subject: [PATCH] gdb: fix doc build when makeinfo is missing
+
+If makeinfo is not found in the system then the missing
+script is used to warn the user.
+
+Before commit e30465112ed4c6320dd19107302057a5f7712cf2 the missing
+script returned 0 after printing the message.
+
+Now, missing return 127 (command not found) to the Makefile and
+the build fail.
+
+Ignore the code returned by missing in order to build successfully
+gdb even if makeinfo is not installed on the system.
+
+Fixes:
+http://autobuild.buildroot.net/results/dee/dee1326baf26ad1eb6e12a7d033428eca50d00bc/build-end.log
+
+Signed-off-by: Romain Naour <romain.naour@openwide.fr>
+---
+ gdb/doc/Makefile.in | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/gdb/doc/Makefile.in b/gdb/doc/Makefile.in
+index 85ed95b..acc4e10 100644
+--- a/gdb/doc/Makefile.in
++++ b/gdb/doc/Makefile.in
+@@ -487,7 +487,7 @@ gdb.pdf: ${GDB_DOC_FILES}
+ # GDB MANUAL: info file
+ gdb.info: ${GDB_DOC_FILES}
+ 	$(MAKEINFO_CMD) $(READLINE_TEXI_INCFLAG) -I ${GDBMI_DIR} -I $(srcdir) \
+-		-o gdb.info $(srcdir)/gdb.texinfo
++		-o gdb.info $(srcdir)/gdb.texinfo | true
+ 
+ # GDB MANUAL: roff translations
+ # Try to use a recent texi2roff.  v2 was put on prep in jan91.
+@@ -562,15 +562,15 @@ gdb.mm: $(GDB_DOC_FILES) links2roff
+ # GDB MANUAL: HTML file
+ 
+ gdb/index.html: ${GDB_DOC_FILES}
+-	$(MAKEHTML) $(MAKEHTMLFLAGS) $(READLINE_TEXI_INCFLAG) -I ${GDBMI_DIR} -I $(srcdir) $(srcdir)/gdb.texinfo
++	$(MAKEHTML) $(MAKEHTMLFLAGS) $(READLINE_TEXI_INCFLAG) -I ${GDBMI_DIR} -I $(srcdir) $(srcdir)/gdb.texinfo | true
+ 
+ stabs.info: $(STABS_DOC_FILES)
+-	$(MAKEINFO_CMD) -I $(srcdir) -o stabs.info $(srcdir)/stabs.texinfo
++	$(MAKEINFO_CMD) -I $(srcdir) -o stabs.info $(srcdir)/stabs.texinfo | true
+ 
+ # STABS DOCUMENTATION: HTML file
+ 
+ stabs/index.html: $(STABS_DOC_FILES)
+-	$(MAKEHTML) $(MAKEHTMLFLAGS) -I $(srcdir) $(srcdir)/stabs.texinfo
++	$(MAKEHTML) $(MAKEHTMLFLAGS) -I $(srcdir) $(srcdir)/stabs.texinfo | true
+ 
+ # Clean these up before each run.  Avoids a catch 22 with not being
+ # able to re-generate these files (to fix a corruption) because these
+@@ -609,10 +609,10 @@ annotate.pdf: $(ANNOTATE_DOC_FILES)
+ 	$(TEXI2DVI) --pdf -I $(srcdir) $(srcdir)/annotate.texinfo
+ 
+ annotate.info: $(ANNOTATE_DOC_FILES)
+-	$(MAKEINFO_CMD) -I $(srcdir) -o annotate.info $(srcdir)/annotate.texinfo
++	$(MAKEINFO_CMD) -I $(srcdir) -o annotate.info $(srcdir)/annotate.texinfo | true
+ 
+ annotate/index.html: $(ANNOTATE_DOC_FILES)
+-	$(MAKEHTML) $(MAKEHTMLFLAGS) -I $(srcdir) $(srcdir)/annotate.texinfo
++	$(MAKEHTML) $(MAKEHTMLFLAGS) -I $(srcdir) $(srcdir)/annotate.texinfo | true
+ 
+ # Man pages
+ gdb.1: $(GDB_DOC_FILES)
+-- 
+2.4.3
+
-- 
2.4.3

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 1/2] package/gdb (7.9): fix doc build when makeinfo is missing
  2015-09-05 14:30 [Buildroot] [PATCH 1/2] package/gdb (7.9): fix doc build when makeinfo is missing Romain Naour
  2015-09-05 14:30 ` [Buildroot] [PATCH 2/2] package/gdb (7.10): fix doc build when make info " Romain Naour
@ 2015-09-05 18:09 ` Thomas Petazzoni
  2015-09-05 21:50   ` Romain Naour
  1 sibling, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2015-09-05 18:09 UTC (permalink / raw)
  To: buildroot

Romain,

On Sat,  5 Sep 2015 16:30:42 +0200, Romain Naour wrote:

> + gdb/index.html: ${GDB_DOC_FILES}
> +-	$(MAKEHTML) $(MAKEHTMLFLAGS) $(READLINE_TEXI_INCFLAG) -I ${GDBMI_DIR} -I $(srcdir) $(srcdir)/gdb.texinfo
> ++	$(MAKEHTML) $(MAKEHTMLFLAGS) $(READLINE_TEXI_INCFLAG) -I ${GDBMI_DIR} -I $(srcdir) $(srcdir)/gdb.texinfo | true

Can you try instead to just prepend a - at the beginning of the line?

	-$(MAKEHTML) ....

Or better yet, for a properly upstreamable solution, a --enable-doc
option to explicitly enable or disable the doc. Or something that
detects if makeinfo is available, and if it isn't, that doesn't try to
generate the documentation.

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 1/2] package/gdb (7.9): fix doc build when makeinfo is missing
  2015-09-05 18:09 ` [Buildroot] [PATCH 1/2] package/gdb (7.9): fix doc build when makeinfo " Thomas Petazzoni
@ 2015-09-05 21:50   ` Romain Naour
  2015-09-06  8:31     ` Thomas Petazzoni
  0 siblings, 1 reply; 6+ messages in thread
From: Romain Naour @ 2015-09-05 21:50 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

Le 05/09/2015 20:09, Thomas Petazzoni a ?crit :
> Romain,
> 
> On Sat,  5 Sep 2015 16:30:42 +0200, Romain Naour wrote:
> 
>> + gdb/index.html: ${GDB_DOC_FILES}
>> +-	$(MAKEHTML) $(MAKEHTMLFLAGS) $(READLINE_TEXI_INCFLAG) -I ${GDBMI_DIR} -I $(srcdir) $(srcdir)/gdb.texinfo
>> ++	$(MAKEHTML) $(MAKEHTMLFLAGS) $(READLINE_TEXI_INCFLAG) -I ${GDBMI_DIR} -I $(srcdir) $(srcdir)/gdb.texinfo | true
> 
> Can you try instead to just prepend a - at the beginning of the line?
> 
> 	-$(MAKEHTML) ....
> 

It doesn't work. What's the meaning of a - in this case ?

> Or better yet, for a properly upstreamable solution, a --enable-doc
> option to explicitly enable or disable the doc. Or something that
> detects if makeinfo is available, and if it isn't, that doesn't try to
> generate the documentation.

It's not easy to add a new options in configure.ac since a specific version of
autoconf is needed. Also it prevent to use GDB_AUTORECONF...

configure.ac:34: error: Please use exactly Autoconf 2.64 instead of 2.69.

Another solution is to remove "doc" directory from SUBDIRS in gdb/Makefile.in:
-SUBDIRS = doc @subdirs@ data-directory $(GNULIB_BUILDDIR)
+SUBDIRS = @subdirs@ data-directory $(GNULIB_BUILDDIR)

Thoughts ?

Best regards,
Romain

> 
> Thanks,
> 
> Thomas
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 1/2] package/gdb (7.9): fix doc build when makeinfo is missing
  2015-09-05 21:50   ` Romain Naour
@ 2015-09-06  8:31     ` Thomas Petazzoni
  2015-09-06  9:18       ` Romain Naour
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2015-09-06  8:31 UTC (permalink / raw)
  To: buildroot

Romain,

On Sat, 5 Sep 2015 23:50:33 +0200, Romain Naour wrote:

> >> + gdb/index.html: ${GDB_DOC_FILES}
> >> +-	$(MAKEHTML) $(MAKEHTMLFLAGS) $(READLINE_TEXI_INCFLAG) -I ${GDBMI_DIR} -I $(srcdir) $(srcdir)/gdb.texinfo
> >> ++	$(MAKEHTML) $(MAKEHTMLFLAGS) $(READLINE_TEXI_INCFLAG) -I ${GDBMI_DIR} -I $(srcdir) $(srcdir)/gdb.texinfo | true
> > 
> > Can you try instead to just prepend a - at the beginning of the line?
> > 
> > 	-$(MAKEHTML) ....
> > 
> 
> It doesn't work. What's the meaning of a - in this case ?

It tells make to ignore the return value of the command, and continue
executing the Makefile even if the command failed.

See https://www.gnu.org/software/make/manual/html_node/Errors.html:

"""
To ignore errors in a recipe line, write a ?-? at the beginning of the
line?s text (after the initial tab). The ?-? is discarded before the
line is passed to the shell for execution.
"""

> It's not easy to add a new options in configure.ac since a specific version of
> autoconf is needed. Also it prevent to use GDB_AUTORECONF...
> 
> configure.ac:34: error: Please use exactly Autoconf 2.64 instead of 2.69.
> 
> Another solution is to remove "doc" directory from SUBDIRS in gdb/Makefile.in:
> -SUBDIRS = doc @subdirs@ data-directory $(GNULIB_BUILDDIR)
> +SUBDIRS = @subdirs@ data-directory $(GNULIB_BUILDDIR)
> 
> Thoughts ?

Argh. So maybe, removing the "doc" directory from SUBDIRS from
Makefile.in is the easiest solution. In parallel to that, if you are
brave enough to write a patch for upstream gdb to make building the
documentation optional, and submit it, it would allow to solve the
problem for future versions of gdb. Or at least report the bug to the
gdb folks.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 1/2] package/gdb (7.9): fix doc build when makeinfo is missing
  2015-09-06  8:31     ` Thomas Petazzoni
@ 2015-09-06  9:18       ` Romain Naour
  0 siblings, 0 replies; 6+ messages in thread
From: Romain Naour @ 2015-09-06  9:18 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

Le 06/09/2015 10:31, Thomas Petazzoni a ?crit :
> Romain,
> 
> On Sat, 5 Sep 2015 23:50:33 +0200, Romain Naour wrote:
> 
>>>> + gdb/index.html: ${GDB_DOC_FILES}
>>>> +-	$(MAKEHTML) $(MAKEHTMLFLAGS) $(READLINE_TEXI_INCFLAG) -I ${GDBMI_DIR} -I $(srcdir) $(srcdir)/gdb.texinfo
>>>> ++	$(MAKEHTML) $(MAKEHTMLFLAGS) $(READLINE_TEXI_INCFLAG) -I ${GDBMI_DIR} -I $(srcdir) $(srcdir)/gdb.texinfo | true
>>>
>>> Can you try instead to just prepend a - at the beginning of the line?
>>>
>>> 	-$(MAKEHTML) ....
>>>
>>
>> It doesn't work. What's the meaning of a - in this case ?
> 
> It tells make to ignore the return value of the command, and continue
> executing the Makefile even if the command failed.
> 
> See https://www.gnu.org/software/make/manual/html_node/Errors.html:
> 
> """
> To ignore errors in a recipe line, write a ?-? at the beginning of the
> line?s text (after the initial tab). The ?-? is discarded before the
> line is passed to the shell for execution.
> """

Ok thanks.

> 
>> It's not easy to add a new options in configure.ac since a specific version of
>> autoconf is needed. Also it prevent to use GDB_AUTORECONF...
>>
>> configure.ac:34: error: Please use exactly Autoconf 2.64 instead of 2.69.
>>
>> Another solution is to remove "doc" directory from SUBDIRS in gdb/Makefile.in:
>> -SUBDIRS = doc @subdirs@ data-directory $(GNULIB_BUILDDIR)
>> +SUBDIRS = @subdirs@ data-directory $(GNULIB_BUILDDIR)
>>
>> Thoughts ?
> 
> Argh. So maybe, removing the "doc" directory from SUBDIRS from
> Makefile.in is the easiest solution. In parallel to that, if you are
> brave enough to write a patch for upstream gdb to make building the
> documentation optional, and submit it, it would allow to solve the
> problem for future versions of gdb. Or at least report the bug to the
> gdb folks.

Ok, I'll update my patches to remove the "doc" directory and I'll see what I can
do with upstream.

Best regards,
Romain

> 
> Thanks!
> 
> Thomas
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-09-06  9:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-05 14:30 [Buildroot] [PATCH 1/2] package/gdb (7.9): fix doc build when makeinfo is missing Romain Naour
2015-09-05 14:30 ` [Buildroot] [PATCH 2/2] package/gdb (7.10): fix doc build when make info " Romain Naour
2015-09-05 18:09 ` [Buildroot] [PATCH 1/2] package/gdb (7.9): fix doc build when makeinfo " Thomas Petazzoni
2015-09-05 21:50   ` Romain Naour
2015-09-06  8:31     ` Thomas Petazzoni
2015-09-06  9:18       ` Romain Naour

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox