public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] libctf: merge doc subdir up a level
@ 2021-11-30  1:45 Mike Frysinger
  2021-12-01 15:16 ` Nick Clifton
  0 siblings, 1 reply; 4+ messages in thread
From: Mike Frysinger @ 2021-11-30  1:45 UTC (permalink / raw)
  To: binutils

This avoids a recursive make into the doc subdir and speeds up the
build slightly.  It also allows for more parallelism.
---
 libctf/Makefile.am                   |  15 +-
 libctf/Makefile.in                   | 583 ++++++++++++-------
 libctf/configure.ac                  |   2 +-
 libctf/doc/Makefile.in               | 808 ---------------------------
 libctf/doc/{Makefile.am => local.mk} |  16 +-
 5 files changed, 410 insertions(+), 1014 deletions(-)
 delete mode 100644 libctf/doc/Makefile.in
 rename libctf/doc/{Makefile.am => local.mk} (71%)

diff --git a/libctf/Makefile.am b/libctf/Makefile.am
index 3d757e443818..3e51b7b30d0c 100644
--- a/libctf/Makefile.am
+++ b/libctf/Makefile.am
@@ -19,11 +19,12 @@
 
 ACLOCAL_AMFLAGS = -I .. -I ../config -I ../bfd
 
-AUTOMAKE_OPTIONS = dejagnu foreign no-texinfo.tex
+AUTOMAKE_OPTIONS = dejagnu foreign info-in-builddir no-texinfo.tex
 
-if BUILD_INFO
-SUBDIRS = doc
-endif
+# Variables that we might accumulate conditionally or in subdirs.
+info_TEXINFOS =
+DISTCLEANFILES =
+MAINTAINERCLEANFILES =
 
 # This is where we get zlib from.  zlibdir is -L../zlib and zlibinc is
 # -I../zlib, unless we were configured with --with-system-zlib, in which
@@ -110,5 +111,9 @@ CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/development.sh
 
 EXTRA_DEJAGNU_SITE_CONFIG = development.exp
 
-DISTCLEANFILES = site.exp development.exp
+DISTCLEANFILES += site.exp development.exp
+endif
+
+if BUILD_INFO
+include doc/local.mk
 endif
diff --git a/libctf/configure.ac b/libctf/configure.ac
index a5d6585521a3..19005fda9e26 100644
--- a/libctf/configure.ac
+++ b/libctf/configure.ac
@@ -290,7 +290,7 @@ fi
 AC_SUBST(VERSION_FLAGS)
 AC_SUBST(VERSION_FLAGS_NOBFD)
 
-AC_CONFIG_FILES(Makefile doc/Makefile)
+AC_CONFIG_FILES(Makefile)
 AC_CONFIG_HEADERS(config.h)
 AC_OUTPUT
 
diff --git a/libctf/doc/Makefile.in b/libctf/doc/Makefile.in
deleted file mode 100644
index 6e4833c5fa60..000000000000
diff --git a/libctf/doc/Makefile.am b/libctf/doc/local.mk
similarity index 71%
rename from libctf/doc/Makefile.am
rename to libctf/doc/local.mk
index fb6b0a87703b..a2bc40a6a68f 100644
--- a/libctf/doc/Makefile.am
+++ b/libctf/doc/local.mk
@@ -17,17 +17,15 @@
 # <http://www.gnu.org/licenses/>.
 #
 
-AUTOMAKE_OPTIONS = info-in-builddir foreign no-texinfo.tex
-
-info_TEXINFOS = ctf-spec.texi
+info_TEXINFOS += %D%/ctf-spec.texi
 libctf_TEXINFOS = $(info_TEXINFOS)
 
 AM_MAKEINFOFLAGS = --no-split
 
-DISTCLEANFILES = texput.log
-MAINTAINERCLEANFILES = ctf-spec.info
+DISTCLEANFILES += texput.log
+MAINTAINERCLEANFILES += %D%/ctf-spec.info
 
-html-local: ctf-spec/index.html
-ctf-spec/index.html: ctf-spec.texi
-	$(AM_V_at)$(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) \
-	  --split=node -I$(srcdir) $(srcdir)/ctf-spec.texi
+html-local: %D%/ctf-spec/index.html
+%D%/ctf-spec/index.html: %D%/ctf-spec.texi
+	$(AM_V_GEN)$(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) \
+	  --split=node -I$(srcdir) --output %D%/ctf-spec $(srcdir)/%D%/ctf-spec.texi
-- 
2.33.0


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

* Re: [PATCH] libctf: merge doc subdir up a level
  2021-11-30  1:45 [PATCH] libctf: merge doc subdir up a level Mike Frysinger
@ 2021-12-01 15:16 ` Nick Clifton
  2021-12-01 16:53   ` Nick Alcock
  2021-12-02  4:41   ` Mike Frysinger
  0 siblings, 2 replies; 4+ messages in thread
From: Nick Clifton @ 2021-12-01 15:16 UTC (permalink / raw)
  To: Mike Frysinger, binutils

Hi Mike,

> This avoids a recursive make into the doc subdir and speeds up the
> build slightly.  It also allows for more parallelism.

Will this have the same problems as the change for the bfd directory's documentation ?


>   libctf/Makefile.am                   |  15 +-
>   libctf/Makefile.in                   | 583 ++++++++++++-------
>   libctf/configure.ac                  |   2 +-
>   libctf/doc/Makefile.in               | 808 ---------------------------
>   libctf/doc/{Makefile.am => local.mk} |  16 +-
>   5 files changed, 410 insertions(+), 1014 deletions(-)
>   delete mode 100644 libctf/doc/Makefile.in
>   rename libctf/doc/{Makefile.am => local.mk} (71%)

If not then approved - please apply.

Cheers
   Nick


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

* Re: [PATCH] libctf: merge doc subdir up a level
  2021-12-01 15:16 ` Nick Clifton
@ 2021-12-01 16:53   ` Nick Alcock
  2021-12-02  4:41   ` Mike Frysinger
  1 sibling, 0 replies; 4+ messages in thread
From: Nick Alcock @ 2021-12-01 16:53 UTC (permalink / raw)
  To: binutils

On 1 Dec 2021, Nick Clifton via Binutils said:

> Hi Mike,
>
>> This avoids a recursive make into the doc subdir and speeds up the
>> build slightly.  It also allows for more parallelism.
>
> Will this have the same problems as the change for the bfd directory's documentation ?

I just copied the bfd directory's documentation framework, so I would
expect at least some problems to be shared with it. (However, we're not
using chew here -- at least, not yet -- so chew-associated problems
would not be expected.)

>>   libctf/Makefile.am                   |  15 +-
>>   libctf/Makefile.in                   | 583 ++++++++++++-------
>>   libctf/configure.ac                  |   2 +-
>>   libctf/doc/Makefile.in               | 808 ---------------------------
>>   libctf/doc/{Makefile.am => local.mk} |  16 +-
>>   5 files changed, 410 insertions(+), 1014 deletions(-)
>>   delete mode 100644 libctf/doc/Makefile.in
>>   rename libctf/doc/{Makefile.am => local.mk} (71%)
>
> If not then approved - please apply.

Looks good to me too -- less build-system noise and faster, good all
round (assuming it works :) ).

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

* Re: [PATCH] libctf: merge doc subdir up a level
  2021-12-01 15:16 ` Nick Clifton
  2021-12-01 16:53   ` Nick Alcock
@ 2021-12-02  4:41   ` Mike Frysinger
  1 sibling, 0 replies; 4+ messages in thread
From: Mike Frysinger @ 2021-12-02  4:41 UTC (permalink / raw)
  To: Nick Clifton; +Cc: binutils

[-- Attachment #1: Type: text/plain, Size: 966 bytes --]

On 01 Dec 2021 15:16, Nick Clifton wrote:
> > This avoids a recursive make into the doc subdir and speeds up the
> > build slightly.  It also allows for more parallelism.
> 
> Will this have the same problems as the change for the bfd directory's documentation ?

binutil's troubles centered around the man page generation and some of
the generated texinfo fragments.  libctf doesn't do any of that, so it
shouldn't run into the same issues.

i'll add a dirstamp dep for the html dep too though.
-mike

--- a/libctf/doc/local.mk
+++ b/libctf/doc/local.mk
@@ -26,6 +26,6 @@ DISTCLEANFILES += texput.log
 MAINTAINERCLEANFILES += %D%/ctf-spec.info
 
 html-local: %D%/ctf-spec/index.html
-%D%/ctf-spec/index.html: %D%/ctf-spec.texi
+%D%/ctf-spec/index.html: %D%/ctf-spec.texi %D%/$(am__dirstamp)
 	$(AM_V_GEN)$(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) \
 	  --split=node -I$(srcdir) --output %D%/ctf-spec $(srcdir)/%D%/ctf-spec.texi

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2021-12-02  4:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-30  1:45 [PATCH] libctf: merge doc subdir up a level Mike Frysinger
2021-12-01 15:16 ` Nick Clifton
2021-12-01 16:53   ` Nick Alcock
2021-12-02  4:41   ` Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).