public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Martin Liska <marxin@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/users/marxin/heads/sphinx-v2)] Use proper Makefile file-based dependencies.
Date: Thu, 24 Jun 2021 14:06:32 +0000 (GMT)	[thread overview]
Message-ID: <20210624140632.9275D3948018@sourceware.org> (raw)

https://gcc.gnu.org/g:29d99ae6b1837590a360cc695484d54718f7f052

commit 29d99ae6b1837590a360cc695484d54718f7f052
Author: Martin Liska <mliska@suse.cz>
Date:   Thu Jun 24 14:22:03 2021 +0200

    Use proper Makefile file-based dependencies.

Diff:
---
 gcc/Makefile.in          | 27 +++++++++++++++++----------
 gcc/fortran/Make-lang.in | 10 +++++-----
 2 files changed, 22 insertions(+), 15 deletions(-)

diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 12c38ed25ca..4158f0016f9 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -3378,33 +3378,40 @@ export VERSION_PACKAGE="$(PKGVERSION)"
 export ENABLE_LTO=$(enable_lto)
 export BUGURL="$(BUGURL_s)"
 
-man: man-gcc man-cpp lang.man @GENINSRC@
+man: doc/gcc/man/man/gcc.1 doc/cpp/man/man/cpp.1 lang.man @GENINSRC@
 
-info: info-gcc info-gccint info-cpp info-cppinternals info-install lang.info @GENINSRC@
+info: doc/gcc/info/texinfo/gcc.info \
+      doc/gccint/info/texinfo/gccint.info \
+      doc/cpp/info/texinfo/cpp.info \
+      doc/cppinternals/info/texinfo/cppinternals.info \
+      doc/install/info/texinfo/install.info \
+      lang.info @GENINSRC@
 
 sphinx-build: man info
 
-man-gcc: doc/gcc/man/man/gcc.1
+RST_FILES:=$(shell find $(srcdir) -name *.rst -or -name *.rst.in)
+SPHINX_CONFIG_FILES:=$(shell find $(srcdir)/.. -name conf.py) $(srcdir)/../doc/baseconf.py
+SPHINX_FILES:=$(RST_FILES) $(SPHINX_CONFIG_FILES)
 
-doc/gcc/man/man/gcc.1:
+doc/gcc/man/man/gcc.1: $(SPHINX_FILES)
 	+ make -C $(srcdir)/../doc man SOURCEDIR=$(srcdir)/doc/gcc BUILDDIR=$(objdir)/doc/gcc/man
 
-man-cpp:
+doc/cpp/man/man/cpp.1: $(SPHINX_FILES)
 	+ make -C $(srcdir)/../doc man SOURCEDIR=$(srcdir)/doc/cpp BUILDDIR=$(objdir)/doc/cpp/man
 
-info-gcc:
+doc/gcc/info/texinfo/gcc.info: $(SPHINX_FILES)
 	+ make -C $(srcdir)/../doc info SOURCEDIR=$(srcdir)/doc/gcc BUILDDIR=$(objdir)/doc/gcc/info
 
-info-gccint: s-tm-rst-in
+doc/gccint/info/texinfo/gccint.info: $(SPHINX_FILES)
 	+ make -C $(srcdir)/../doc info SOURCEDIR=$(srcdir)/doc/gccint BUILDDIR=$(objdir)/doc/gccint/info
 
-info-cpp:
+doc/cpp/info/texinfo/cpp.info: $(SPHINX_FILES)
 	+ make -C $(srcdir)/../doc info SOURCEDIR=$(srcdir)/doc/cpp BUILDDIR=$(objdir)/doc/cpp/info
 
-info-cppinternals:
+doc/cppinternals/info/texinfo/cppinternals.info: $(SPHINX_FILES)
 	+ make -C $(srcdir)/../doc info SOURCEDIR=$(srcdir)/doc/cppinternals BUILDDIR=$(objdir)/doc/cppinternals/info
 
-info-install:
+doc/install/info/texinfo/install.info: $(SPHINX_FILES)
 	+ make -C $(srcdir)/../doc info SOURCEDIR=$(srcdir)/doc/install BUILDDIR=$(objdir)/doc/install/info
 
 html-gccint: s-tm-rst-in
diff --git a/gcc/fortran/Make-lang.in b/gcc/fortran/Make-lang.in
index 686788ee868..18dd5d2089a 100644
--- a/gcc/fortran/Make-lang.in
+++ b/gcc/fortran/Make-lang.in
@@ -113,10 +113,10 @@ fortran.tags: force
 	cd $(srcdir)/fortran; etags -o TAGS.sub *.c *.h; \
 	etags --include TAGS.sub --include ../TAGS.sub
 
-fortran.info: info-gfortran info-gfc-internals
+fortran.info: doc/fortran/info/texinfo/gfortran.info doc/gfc-internals/info/texinfo/gfc-internals.info
 fortran.dvi: doc/gfortran.dvi doc/gfc-internals.dvi
 
-info-gfortran:
+doc/fortran/info/texinfo/gfortran.info: $(SPHINX_FILES)
 	+ if [ x$(SPHINX_BUILD) = xsphinx-build ]; then \
 	  make -C $(srcdir)/../doc info SOURCEDIR=$(srcdir)/fortran/doc/gfortran BUILDDIR=$(objdir)/doc/fortran/info; \
 	else true; fi
@@ -156,10 +156,10 @@ fortran.install-pdf: $(F95_PDFFILES)
 	  $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/gcc/$$f"; \
 	done
 
-man-fortran:
+doc/fortran/man/man/gfortran.1: $(SPHINX_FILES)
 	+ make -C $(srcdir)/../doc man SOURCEDIR=$(srcdir)/fortran/doc/gfortran BUILDDIR=$(objdir)/doc/fortran/man
 
-fortran.man: man-fortran
+fortran.man: doc/fortran/man/man/gfortran.1
 
 fortran.srcman: $(F95_MANFILES)
 	-cp -p $^ $(srcdir)/doc
@@ -213,7 +213,7 @@ GFC_INTERNALS_TEXI = \
   $(srcdir)/doc/include/gcc-common.texi \
   gcc-vers.texi
 
-info-gfc-internals:
+doc/gfc-internals/info/texinfo/gfc-internals.info: $(SPHINX_FILES)
 	+ if [ x$(SPHINX_BUILD) = xsphinx-build ]; then \
 	  make -C $(srcdir)/../doc info SOURCEDIR=$(srcdir)/fortran/doc/gfc-internals BUILDDIR=$(objdir)/doc/gfc-internals/info; \
 	else true; fi


             reply	other threads:[~2021-06-24 14:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-24 14:06 Martin Liska [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-06-24 12:22 Martin Liska

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210624140632.9275D3948018@sourceware.org \
    --to=marxin@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).