gprofng: install examples to $(docdir)/gprofng

Message ID 20241009193442.591872-1-vladimir.mezentsev@oracle.com
State New
Headers
Series gprofng: install examples to $(docdir)/gprofng |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_binutils_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_binutils_check--master-aarch64 success Test passed
linaro-tcwg-bot/tcwg_binutils_check--master-arm success Test passed

Commit Message

Vladimir Mezentsev Oct. 9, 2024, 7:34 p.m. UTC
  From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>

gprofng/ChangeLog
2024-10-09  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	* doc/Makefile.am: Install gprofng examples.
	* doc/Makefile.in: Rebuild.
---
 gprofng/doc/Makefile.am | 10 ++++++++++
 gprofng/doc/Makefile.in | 12 +++++++++---
 2 files changed, 19 insertions(+), 3 deletions(-)
  

Comments

H.J. Lu Oct. 10, 2024, 9:51 p.m. UTC | #1
On Thu, Oct 10, 2024 at 3:35 AM <vladimir.mezentsev@oracle.com> wrote:
>
> From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
>
> gprofng/ChangeLog
> 2024-10-09  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
>
>         * doc/Makefile.am: Install gprofng examples.
>         * doc/Makefile.in: Rebuild.
> ---
>  gprofng/doc/Makefile.am | 10 ++++++++++
>  gprofng/doc/Makefile.in | 12 +++++++++---
>  2 files changed, 19 insertions(+), 3 deletions(-)
>
> diff --git a/gprofng/doc/Makefile.am b/gprofng/doc/Makefile.am
> index 7c88e144ab6..fcd079671ba 100644
> --- a/gprofng/doc/Makefile.am
> +++ b/gprofng/doc/Makefile.am
> @@ -59,3 +59,13 @@ MAINTAINERCLEANFILES = gprofng.info $(man_MANS)
>  EXTRA_DIST = $(man_MANS) version.texi
>
>  info: $(man_MANS)
> +
> +examples.tar.gz:
> +       $(AM_V_at)( tar czf $@ $(srcdir)/../examples )
> +
> +install-examples:  examples.tar.gz
> +       $(mkinstalldirs) $(docdir)/gprofng
> +       $(INSTALL_DATA) examples.tar.gz $(docdir)/gprofng

This breaks "make install DESTDIR=xxx".  I am testing this change:

diff --git a/gprofng/doc/Makefile.am b/gprofng/doc/Makefile.am
index fcd079671ba..83e6006899b 100644
--- a/gprofng/doc/Makefile.am
+++ b/gprofng/doc/Makefile.am
@@ -64,8 +64,7 @@ examples.tar.gz:
  $(AM_V_at)( tar czf $@ $(srcdir)/../examples )

 install-examples:  examples.tar.gz
- $(mkinstalldirs) $(docdir)/gprofng
- $(INSTALL_DATA) examples.tar.gz $(docdir)/gprofng
+ $(mkinstalldirs) $(DESTDIR)$(docdir)/gprofng
+ $(INSTALL_DATA) examples.tar.gz $(DESTDIR)$(docdir)/gprofng

 install-am: install-examples
-
diff --git a/gprofng/doc/Makefile.in b/gprofng/doc/Makefile.in
index 3e625433f95..98aa1056357 100644
--- a/gprofng/doc/Makefile.in
+++ b/gprofng/doc/Makefile.in
@@ -894,8 +894,8 @@ examples.tar.gz:
  $(AM_V_at)( tar czf $@ $(srcdir)/../examples )

 install-examples:  examples.tar.gz
- $(mkinstalldirs) $(docdir)/gprofng
- $(INSTALL_DATA) examples.tar.gz $(docdir)/gprofng
+ $(mkinstalldirs) $(DESTDIR)$(docdir)/gprofng
+ $(INSTALL_DATA) examples.tar.gz $(DESTDIR)$(docdir)/gprofng

 install-am: install-examples

> +
> +install-am: install-examples
> +
> diff --git a/gprofng/doc/Makefile.in b/gprofng/doc/Makefile.in
> index 9b9f81cb780..3e625433f95 100644
> --- a/gprofng/doc/Makefile.in
> +++ b/gprofng/doc/Makefile.in
> @@ -667,9 +667,6 @@ install-exec: install-exec-am
>  install-data: install-data-am
>  uninstall: uninstall-am
>
> -install-am: all-am
> -       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
> -
>  installcheck: installcheck-am
>  install-strip:
>         if test -z '$(STRIP)'; then \
> @@ -893,6 +890,15 @@ gprofng-display-text.1: $(srcdir)/gprofng-display-text.texi
>
>  info: $(man_MANS)
>
> +examples.tar.gz:
> +       $(AM_V_at)( tar czf $@ $(srcdir)/../examples )
> +
> +install-examples:  examples.tar.gz
> +       $(mkinstalldirs) $(docdir)/gprofng
> +       $(INSTALL_DATA) examples.tar.gz $(docdir)/gprofng
> +
> +install-am: install-examples
> +
>  # Tell versions [3.59,3.63) of GNU make to not export all variables.
>  # Otherwise a system limit (for SysV at least) may be exceeded.
>  .NOEXPORT:
> --
> 2.43.5
>
  
H.J. Lu Oct. 10, 2024, 10:28 p.m. UTC | #2
On Fri, Oct 11, 2024 at 5:51 AM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> On Thu, Oct 10, 2024 at 3:35 AM <vladimir.mezentsev@oracle.com> wrote:
> >
> > From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
> >
> > gprofng/ChangeLog
> > 2024-10-09  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
> >
> >         * doc/Makefile.am: Install gprofng examples.
> >         * doc/Makefile.in: Rebuild.
> > ---
> >  gprofng/doc/Makefile.am | 10 ++++++++++
> >  gprofng/doc/Makefile.in | 12 +++++++++---
> >  2 files changed, 19 insertions(+), 3 deletions(-)
> >
> > diff --git a/gprofng/doc/Makefile.am b/gprofng/doc/Makefile.am
> > index 7c88e144ab6..fcd079671ba 100644
> > --- a/gprofng/doc/Makefile.am
> > +++ b/gprofng/doc/Makefile.am
> > @@ -59,3 +59,13 @@ MAINTAINERCLEANFILES = gprofng.info $(man_MANS)
> >  EXTRA_DIST = $(man_MANS) version.texi
> >
> >  info: $(man_MANS)
> > +
> > +examples.tar.gz:
> > +       $(AM_V_at)( tar czf $@ $(srcdir)/../examples )
> > +
> > +install-examples:  examples.tar.gz
> > +       $(mkinstalldirs) $(docdir)/gprofng
> > +       $(INSTALL_DATA) examples.tar.gz $(docdir)/gprofng
>
> This breaks "make install DESTDIR=xxx".  I am testing this change:
>
> diff --git a/gprofng/doc/Makefile.am b/gprofng/doc/Makefile.am
> index fcd079671ba..83e6006899b 100644
> --- a/gprofng/doc/Makefile.am
> +++ b/gprofng/doc/Makefile.am
> @@ -64,8 +64,7 @@ examples.tar.gz:
>   $(AM_V_at)( tar czf $@ $(srcdir)/../examples )
>
>  install-examples:  examples.tar.gz
> - $(mkinstalldirs) $(docdir)/gprofng
> - $(INSTALL_DATA) examples.tar.gz $(docdir)/gprofng
> + $(mkinstalldirs) $(DESTDIR)$(docdir)/gprofng
> + $(INSTALL_DATA) examples.tar.gz $(DESTDIR)$(docdir)/gprofng
>
>  install-am: install-examples
> -
> diff --git a/gprofng/doc/Makefile.in b/gprofng/doc/Makefile.in
> index 3e625433f95..98aa1056357 100644
> --- a/gprofng/doc/Makefile.in
> +++ b/gprofng/doc/Makefile.in
> @@ -894,8 +894,8 @@ examples.tar.gz:
>   $(AM_V_at)( tar czf $@ $(srcdir)/../examples )
>
>  install-examples:  examples.tar.gz
> - $(mkinstalldirs) $(docdir)/gprofng
> - $(INSTALL_DATA) examples.tar.gz $(docdir)/gprofng
> + $(mkinstalldirs) $(DESTDIR)$(docdir)/gprofng
> + $(INSTALL_DATA) examples.tar.gz $(DESTDIR)$(docdir)/gprofng
>
>  install-am: install-examples

I am checking in the fix.

> > +
> > +install-am: install-examples
> > +
> > diff --git a/gprofng/doc/Makefile.in b/gprofng/doc/Makefile.in
> > index 9b9f81cb780..3e625433f95 100644
> > --- a/gprofng/doc/Makefile.in
> > +++ b/gprofng/doc/Makefile.in
> > @@ -667,9 +667,6 @@ install-exec: install-exec-am
> >  install-data: install-data-am
> >  uninstall: uninstall-am
> >
> > -install-am: all-am
> > -       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
> > -
> >  installcheck: installcheck-am
> >  install-strip:
> >         if test -z '$(STRIP)'; then \
> > @@ -893,6 +890,15 @@ gprofng-display-text.1: $(srcdir)/gprofng-display-text.texi
> >
> >  info: $(man_MANS)
> >
> > +examples.tar.gz:
> > +       $(AM_V_at)( tar czf $@ $(srcdir)/../examples )
> > +
> > +install-examples:  examples.tar.gz
> > +       $(mkinstalldirs) $(docdir)/gprofng
> > +       $(INSTALL_DATA) examples.tar.gz $(docdir)/gprofng
> > +
> > +install-am: install-examples
> > +
> >  # Tell versions [3.59,3.63) of GNU make to not export all variables.
> >  # Otherwise a system limit (for SysV at least) may be exceeded.
> >  .NOEXPORT:
> > --
> > 2.43.5
> >
>
>
> --
> H.J.
  
Vladimir Mezentsev Oct. 10, 2024, 10:38 p.m. UTC | #3
On 10/10/24 14:51, H.J. Lu wrote:
> On Thu, Oct 10, 2024 at 3:35 AM <vladimir.mezentsev@oracle.com> wrote:
>> From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
>>
>> gprofng/ChangeLog
>> 2024-10-09  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
>>
>>          * doc/Makefile.am: Install gprofng examples.
>>          * doc/Makefile.in: Rebuild.
>> ---
>>   gprofng/doc/Makefile.am | 10 ++++++++++
>>   gprofng/doc/Makefile.in | 12 +++++++++---
>>   2 files changed, 19 insertions(+), 3 deletions(-)
>>
>> diff --git a/gprofng/doc/Makefile.am b/gprofng/doc/Makefile.am
>> index 7c88e144ab6..fcd079671ba 100644
>> --- a/gprofng/doc/Makefile.am
>> +++ b/gprofng/doc/Makefile.am
>> @@ -59,3 +59,13 @@ MAINTAINERCLEANFILES = gprofng.info $(man_MANS)
>>   EXTRA_DIST = $(man_MANS) version.texi
>>
>>   info: $(man_MANS)
>> +
>> +examples.tar.gz:
>> +       $(AM_V_at)( tar czf $@ $(srcdir)/../examples )
>> +
>> +install-examples:  examples.tar.gz
>> +       $(mkinstalldirs) $(docdir)/gprofng
>> +       $(INSTALL_DATA) examples.tar.gz $(docdir)/gprofng
> This breaks "make install DESTDIR=xxx".

yes. I never used "DESTDIR=". gprofng will not work after such 
installation. gprofng reads $(sysconfdir)/gprofng.rc for configuration. 
The location of this file is set at compile time. We set LD_PRELOAD 
using "$(libdir)/gprofng". It is also set at compile time.
>   I am testing this change:

Please apply your fix.

-Vladimir

>
> diff --git a/gprofng/doc/Makefile.am b/gprofng/doc/Makefile.am
> index fcd079671ba..83e6006899b 100644
> --- a/gprofng/doc/Makefile.am
> +++ b/gprofng/doc/Makefile.am
> @@ -64,8 +64,7 @@ examples.tar.gz:
>    $(AM_V_at)( tar czf $@ $(srcdir)/../examples )
>
>   install-examples:  examples.tar.gz
> - $(mkinstalldirs) $(docdir)/gprofng
> - $(INSTALL_DATA) examples.tar.gz $(docdir)/gprofng
> + $(mkinstalldirs) $(DESTDIR)$(docdir)/gprofng
> + $(INSTALL_DATA) examples.tar.gz $(DESTDIR)$(docdir)/gprofng
>
>   install-am: install-examples
> -
> diff --git a/gprofng/doc/Makefile.in b/gprofng/doc/Makefile.in
> index 3e625433f95..98aa1056357 100644
> --- a/gprofng/doc/Makefile.in
> +++ b/gprofng/doc/Makefile.in
> @@ -894,8 +894,8 @@ examples.tar.gz:
>    $(AM_V_at)( tar czf $@ $(srcdir)/../examples )
>
>   install-examples:  examples.tar.gz
> - $(mkinstalldirs) $(docdir)/gprofng
> - $(INSTALL_DATA) examples.tar.gz $(docdir)/gprofng
> + $(mkinstalldirs) $(DESTDIR)$(docdir)/gprofng
> + $(INSTALL_DATA) examples.tar.gz $(DESTDIR)$(docdir)/gprofng
>
>   install-am: install-examples
>
>> +
>> +install-am: install-examples
>> +
>> diff --git a/gprofng/doc/Makefile.in b/gprofng/doc/Makefile.in
>> index 9b9f81cb780..3e625433f95 100644
>> --- a/gprofng/doc/Makefile.in
>> +++ b/gprofng/doc/Makefile.in
>> @@ -667,9 +667,6 @@ install-exec: install-exec-am
>>   install-data: install-data-am
>>   uninstall: uninstall-am
>>
>> -install-am: all-am
>> -       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
>> -
>>   installcheck: installcheck-am
>>   install-strip:
>>          if test -z '$(STRIP)'; then \
>> @@ -893,6 +890,15 @@ gprofng-display-text.1: $(srcdir)/gprofng-display-text.texi
>>
>>   info: $(man_MANS)
>>
>> +examples.tar.gz:
>> +       $(AM_V_at)( tar czf $@ $(srcdir)/../examples )
>> +
>> +install-examples:  examples.tar.gz
>> +       $(mkinstalldirs) $(docdir)/gprofng
>> +       $(INSTALL_DATA) examples.tar.gz $(docdir)/gprofng
>> +
>> +install-am: install-examples
>> +
>>   # Tell versions [3.59,3.63) of GNU make to not export all variables.
>>   # Otherwise a system limit (for SysV at least) may be exceeded.
>>   .NOEXPORT:
>> --
>> 2.43.5
>>
>
  
Sam James Oct. 11, 2024, 1:45 a.m. UTC | #4
Vladimir Mezentsev <vladimir.mezentsev@oracle.com> writes:

> On 10/10/24 14:51, H.J. Lu wrote:
>> On Thu, Oct 10, 2024 at 3:35 AM <vladimir.mezentsev@oracle.com> wrote:
>>> From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
>>>
>>> gprofng/ChangeLog
>>> 2024-10-09  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
>>>
>>>          * doc/Makefile.am: Install gprofng examples.
>>>          * doc/Makefile.in: Rebuild.
>>> ---
>>>   gprofng/doc/Makefile.am | 10 ++++++++++
>>>   gprofng/doc/Makefile.in | 12 +++++++++---
>>>   2 files changed, 19 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/gprofng/doc/Makefile.am b/gprofng/doc/Makefile.am
>>> index 7c88e144ab6..fcd079671ba 100644
>>> --- a/gprofng/doc/Makefile.am
>>> +++ b/gprofng/doc/Makefile.am
>>> @@ -59,3 +59,13 @@ MAINTAINERCLEANFILES = gprofng.info $(man_MANS)
>>>   EXTRA_DIST = $(man_MANS) version.texi
>>>
>>>   info: $(man_MANS)
>>> +
>>> +examples.tar.gz:
>>> +       $(AM_V_at)( tar czf $@ $(srcdir)/../examples )
>>> +
>>> +install-examples:  examples.tar.gz
>>> +       $(mkinstalldirs) $(docdir)/gprofng
>>> +       $(INSTALL_DATA) examples.tar.gz $(docdir)/gprofng
>> This breaks "make install DESTDIR=xxx".
>
> yes. I never used "DESTDIR=". gprofng will not work after such
> installation. gprofng reads $(sysconfdir)/gprofng.rc for
> configuration. The location of this file is set at compile time. We
> set LD_PRELOAD using "$(libdir)/gprofng". It is also set at compile
> time.

Note that DESTDIR and prefix are different.

DESTDIR is for a staging area and it's only to be known at install-time
(it's correct not to bake any paths in for it). Think of a package
manager which installs to /var/tmp/package/binutils/image, then it
merges it to / by itself (not via Makefile).

prefix, on the other hand, is meant to reflect the final running
system. sysconfdir (and so on) usually includes prefix so things
should work as-is for that.

gprofng works OK with this right now :)

>>   I am testing this change:
>
> Please apply your fix.
>
> -Vladimir
>
>>
>> diff --git a/gprofng/doc/Makefile.am b/gprofng/doc/Makefile.am
>> index fcd079671ba..83e6006899b 100644
>> --- a/gprofng/doc/Makefile.am
>> +++ b/gprofng/doc/Makefile.am
>> @@ -64,8 +64,7 @@ examples.tar.gz:
>>    $(AM_V_at)( tar czf $@ $(srcdir)/../examples )
>>
>>   install-examples:  examples.tar.gz
>> - $(mkinstalldirs) $(docdir)/gprofng
>> - $(INSTALL_DATA) examples.tar.gz $(docdir)/gprofng
>> + $(mkinstalldirs) $(DESTDIR)$(docdir)/gprofng
>> + $(INSTALL_DATA) examples.tar.gz $(DESTDIR)$(docdir)/gprofng
>>
>>   install-am: install-examples
>> -
>> diff --git a/gprofng/doc/Makefile.in b/gprofng/doc/Makefile.in
>> index 3e625433f95..98aa1056357 100644
>> --- a/gprofng/doc/Makefile.in
>> +++ b/gprofng/doc/Makefile.in
>> @@ -894,8 +894,8 @@ examples.tar.gz:
>>    $(AM_V_at)( tar czf $@ $(srcdir)/../examples )
>>
>>   install-examples:  examples.tar.gz
>> - $(mkinstalldirs) $(docdir)/gprofng
>> - $(INSTALL_DATA) examples.tar.gz $(docdir)/gprofng
>> + $(mkinstalldirs) $(DESTDIR)$(docdir)/gprofng
>> + $(INSTALL_DATA) examples.tar.gz $(DESTDIR)$(docdir)/gprofng
>>
>>   install-am: install-examples
>>
>>> +
>>> +install-am: install-examples
>>> +
>>> diff --git a/gprofng/doc/Makefile.in b/gprofng/doc/Makefile.in
>>> index 9b9f81cb780..3e625433f95 100644
>>> --- a/gprofng/doc/Makefile.in
>>> +++ b/gprofng/doc/Makefile.in
>>> @@ -667,9 +667,6 @@ install-exec: install-exec-am
>>>   install-data: install-data-am
>>>   uninstall: uninstall-am
>>>
>>> -install-am: all-am
>>> -       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
>>> -
>>>   installcheck: installcheck-am
>>>   install-strip:
>>>          if test -z '$(STRIP)'; then \
>>> @@ -893,6 +890,15 @@ gprofng-display-text.1: $(srcdir)/gprofng-display-text.texi
>>>
>>>   info: $(man_MANS)
>>>
>>> +examples.tar.gz:
>>> +       $(AM_V_at)( tar czf $@ $(srcdir)/../examples )
>>> +
>>> +install-examples:  examples.tar.gz
>>> +       $(mkinstalldirs) $(docdir)/gprofng
>>> +       $(INSTALL_DATA) examples.tar.gz $(docdir)/gprofng
>>> +
>>> +install-am: install-examples
>>> +
>>>   # Tell versions [3.59,3.63) of GNU make to not export all variables.
>>>   # Otherwise a system limit (for SysV at least) may be exceeded.
>>>   .NOEXPORT:
>>> --
>>> 2.43.5
>>>
>>
  
Sam James Oct. 14, 2024, 6:19 a.m. UTC | #5
vladimir.mezentsev@oracle.com writes:

> From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
>
> gprofng/ChangeLog
> 2024-10-09  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
>
> 	* doc/Makefile.am: Install gprofng examples.
> 	* doc/Makefile.in: Rebuild.
> ---
>  gprofng/doc/Makefile.am | 10 ++++++++++
>  gprofng/doc/Makefile.in | 12 +++++++++---
>  2 files changed, 19 insertions(+), 3 deletions(-)
>
> diff --git a/gprofng/doc/Makefile.am b/gprofng/doc/Makefile.am
> index 7c88e144ab6..fcd079671ba 100644
> --- a/gprofng/doc/Makefile.am
> +++ b/gprofng/doc/Makefile.am
> @@ -59,3 +59,13 @@ MAINTAINERCLEANFILES = gprofng.info $(man_MANS)
>  EXTRA_DIST = $(man_MANS) version.texi
>  
>  info: $(man_MANS)
> +
> +examples.tar.gz:
> +	$(AM_V_at)( tar czf $@ $(srcdir)/../examples )
> +
> +install-examples:  examples.tar.gz
> +	$(mkinstalldirs) $(docdir)/gprofng
> +	$(INSTALL_DATA) examples.tar.gz $(docdir)/gprofng
> +
> +install-am: install-examples

It looks like I don't get man pages installed anymore. I guess
install-am like this clobbers the default.

I think we want to use
https://www.gnu.org/software/automake/manual/1.17/html_node/Extending-Installation.html
instead of overriding install-am?

> +
> diff --git a/gprofng/doc/Makefile.in b/gprofng/doc/Makefile.in
> index 9b9f81cb780..3e625433f95 100644
> --- a/gprofng/doc/Makefile.in
> +++ b/gprofng/doc/Makefile.in
> @@ -667,9 +667,6 @@ install-exec: install-exec-am
>  install-data: install-data-am
>  uninstall: uninstall-am
>  
> -install-am: all-am
> -	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
> -
>  installcheck: installcheck-am
>  install-strip:
>  	if test -z '$(STRIP)'; then \
> @@ -893,6 +890,15 @@ gprofng-display-text.1: $(srcdir)/gprofng-display-text.texi
>  
>  info: $(man_MANS)
>  
> +examples.tar.gz:
> +	$(AM_V_at)( tar czf $@ $(srcdir)/../examples )
> +
> +install-examples:  examples.tar.gz
> +	$(mkinstalldirs) $(docdir)/gprofng
> +	$(INSTALL_DATA) examples.tar.gz $(docdir)/gprofng
> +
> +install-am: install-examples
> +
>  # Tell versions [3.59,3.63) of GNU make to not export all variables.
>  # Otherwise a system limit (for SysV at least) may be exceeded.
>  .NOEXPORT:
  
Vladimir Mezentsev Oct. 14, 2024, 6:32 p.m. UTC | #6
On 10/13/24 23:19, Sam James wrote:
> vladimir.mezentsev@oracle.com writes:
>
>> From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
>>
>> gprofng/ChangeLog
>> 2024-10-09  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
>>
>> 	* doc/Makefile.am: Install gprofng examples.
>> 	* doc/Makefile.in: Rebuild.
>> ---
>>   gprofng/doc/Makefile.am | 10 ++++++++++
>>   gprofng/doc/Makefile.in | 12 +++++++++---
>>   2 files changed, 19 insertions(+), 3 deletions(-)
>>
>> diff --git a/gprofng/doc/Makefile.am b/gprofng/doc/Makefile.am
>> index 7c88e144ab6..fcd079671ba 100644
>> --- a/gprofng/doc/Makefile.am
>> +++ b/gprofng/doc/Makefile.am
>> @@ -59,3 +59,13 @@ MAINTAINERCLEANFILES = gprofng.info $(man_MANS)
>>   EXTRA_DIST = $(man_MANS) version.texi
>>   
>>   info: $(man_MANS)
>> +
>> +examples.tar.gz:
>> +	$(AM_V_at)( tar czf $@ $(srcdir)/../examples )
>> +
>> +install-examples:  examples.tar.gz
>> +	$(mkinstalldirs) $(docdir)/gprofng
>> +	$(INSTALL_DATA) examples.tar.gz $(docdir)/gprofng
>> +
>> +install-am: install-examples
> It looks like I don't get man pages installed anymore. I guess
> install-am like this clobbers the default.


Thanks for reporting this.


>
> I think we want to use
> https://www.gnu.org/software/automake/manual/1.17/html_node/Extending-Installation.html
> instead of overriding install-am?

Right. I will do this.

-Vladimir



>
>> +
>> diff --git a/gprofng/doc/Makefile.in b/gprofng/doc/Makefile.in
>> index 9b9f81cb780..3e625433f95 100644
>> --- a/gprofng/doc/Makefile.in
>> +++ b/gprofng/doc/Makefile.in
>> @@ -667,9 +667,6 @@ install-exec: install-exec-am
>>   install-data: install-data-am
>>   uninstall: uninstall-am
>>   
>> -install-am: all-am
>> -	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
>> -
>>   installcheck: installcheck-am
>>   install-strip:
>>   	if test -z '$(STRIP)'; then \
>> @@ -893,6 +890,15 @@ gprofng-display-text.1: $(srcdir)/gprofng-display-text.texi
>>   
>>   info: $(man_MANS)
>>   
>> +examples.tar.gz:
>> +	$(AM_V_at)( tar czf $@ $(srcdir)/../examples )
>> +
>> +install-examples:  examples.tar.gz
>> +	$(mkinstalldirs) $(docdir)/gprofng
>> +	$(INSTALL_DATA) examples.tar.gz $(docdir)/gprofng
>> +
>> +install-am: install-examples
>> +
>>   # Tell versions [3.59,3.63) of GNU make to not export all variables.
>>   # Otherwise a system limit (for SysV at least) may be exceeded.
>>   .NOEXPORT:
  

Patch

diff --git a/gprofng/doc/Makefile.am b/gprofng/doc/Makefile.am
index 7c88e144ab6..fcd079671ba 100644
--- a/gprofng/doc/Makefile.am
+++ b/gprofng/doc/Makefile.am
@@ -59,3 +59,13 @@  MAINTAINERCLEANFILES = gprofng.info $(man_MANS)
 EXTRA_DIST = $(man_MANS) version.texi
 
 info: $(man_MANS)
+
+examples.tar.gz:
+	$(AM_V_at)( tar czf $@ $(srcdir)/../examples )
+
+install-examples:  examples.tar.gz
+	$(mkinstalldirs) $(docdir)/gprofng
+	$(INSTALL_DATA) examples.tar.gz $(docdir)/gprofng
+
+install-am: install-examples
+
diff --git a/gprofng/doc/Makefile.in b/gprofng/doc/Makefile.in
index 9b9f81cb780..3e625433f95 100644
--- a/gprofng/doc/Makefile.in
+++ b/gprofng/doc/Makefile.in
@@ -667,9 +667,6 @@  install-exec: install-exec-am
 install-data: install-data-am
 uninstall: uninstall-am
 
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
 installcheck: installcheck-am
 install-strip:
 	if test -z '$(STRIP)'; then \
@@ -893,6 +890,15 @@  gprofng-display-text.1: $(srcdir)/gprofng-display-text.texi
 
 info: $(man_MANS)
 
+examples.tar.gz:
+	$(AM_V_at)( tar czf $@ $(srcdir)/../examples )
+
+install-examples:  examples.tar.gz
+	$(mkinstalldirs) $(docdir)/gprofng
+	$(INSTALL_DATA) examples.tar.gz $(docdir)/gprofng
+
+install-am: install-examples
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT: