public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-3982] Revert "avr: sphinx: port gen-avr-mmcu to RST"
@ 2022-11-14  8:38 Martin Liska
  0 siblings, 0 replies; only message in thread
From: Martin Liska @ 2022-11-14  8:38 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:3c1d0356cfae9b8e7920f2929ea808ade7988075

commit r13-3982-g3c1d0356cfae9b8e7920f2929ea808ade7988075
Author: Martin Liska <mliska@suse.cz>
Date:   Sun Nov 13 21:58:13 2022 +0100

    Revert "avr: sphinx: port gen-avr-mmcu to RST"
    
    This reverts commit 79f1313608b468fd6a0f329d2e265fa67bba7cc1.

Diff:
---
 gcc/Makefile.in                                    |  7 ----
 gcc/config/avr/avr-devices.cc                      | 42 +++++++++++-----------
 gcc/config/avr/avr-mcus.def                        |  2 +-
 .../{gen-avr-mmcu-rst.cc => gen-avr-mmcu-texi.cc}  | 33 +++++++++--------
 gcc/config/avr/t-avr                               |  6 ++--
 .../machine-dependent-options/avr-mmcu.rst         |  3 +-
 6 files changed, 44 insertions(+), 49 deletions(-)

diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 0b48e276565..838c5ad906a 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -113,13 +113,6 @@ target_objdir := $(toplevel_builddir)/$(target_subdir)
 # Directory where sources are, from where we are.
 VPATH = @srcdir@
 
-# We define a vpath for the sources of the .rst files here because they
-# are split between multiple directories and we would rather use one implicit
-# pattern rule for everything.
-# This vpath could be extended within the Make-lang fragments.
-
-vpath %.rst $(gcc_docdir)
-
 # --------
 # UNSORTED
 # --------
diff --git a/gcc/config/avr/avr-devices.cc b/gcc/config/avr/avr-devices.cc
index 611b35f7a27..aa284217f50 100644
--- a/gcc/config/avr/avr-devices.cc
+++ b/gcc/config/avr/avr-devices.cc
@@ -64,54 +64,54 @@ avr_arch_types[] =
 };
 
 const avr_arch_info_t
-avr_rst[] =
+avr_texinfo[] =
 {
   { ARCH_AVR1,
     "This ISA is implemented by the minimal AVR core and supported "
     "for assembler only." },
   { ARCH_AVR2,
-    "\"Classic\" devices with up to 8 |nbsp| KiB of program memory." },
+    "``Classic'' devices with up to 8@tie{}KiB of program memory." },
   { ARCH_AVR25,
-    "\"Classic\" devices with up to 8 |nbsp| KiB of program memory and with "
-    "the ``MOVW`` instruction." },
+    "``Classic'' devices with up to 8@tie{}KiB of program memory and with "
+    "the @code{MOVW} instruction." },
   { ARCH_AVR3,
-    "\"Classic\" devices with 16 |nbsp| KiB up to 64 |nbsp| KiB of "
+    "``Classic'' devices with 16@tie{}KiB up to 64@tie{}KiB of "
     "program memory." },
   { ARCH_AVR31,
-    "\"Classic\" devices with 128 |nbsp| KiB of program memory." },
+    "``Classic'' devices with 128@tie{}KiB of program memory." },
   { ARCH_AVR35,
-    "\"Classic\" devices with 16 |nbsp| KiB up to 64 |nbsp| KiB of "
-    "program memory and with the ``MOVW`` instruction." },
+    "``Classic'' devices with 16@tie{}KiB up to 64@tie{}KiB of "
+    "program memory and with the @code{MOVW} instruction." },
   { ARCH_AVR4,
-    "\"Enhanced\" devices with up to 8 |nbsp| KiB of program memory." },
+    "``Enhanced'' devices with up to 8@tie{}KiB of program memory." },
   { ARCH_AVR5,
-    "\"Enhanced\" devices with 16 |nbsp| KiB up to 64 |nbsp| KiB of "
+    "``Enhanced'' devices with 16@tie{}KiB up to 64@tie{}KiB of "
     "program memory." },
   { ARCH_AVR51,
-    "\"Enhanced\" devices with 128 |nbsp| KiB of program memory." },
+    "``Enhanced'' devices with 128@tie{}KiB of program memory." },
   { ARCH_AVR6,
-    "\"Enhanced\" devices with 3-byte PC, i.e.: with more than 128 |nbsp| KiB "
+    "``Enhanced'' devices with 3-byte PC, i.e.@: with more than 128@tie{}KiB "
     "of program memory." },
   { ARCH_AVRTINY,
-    "\"TINY\" Tiny core devices with 512 |nbsp| B up to 4 |nbsp| KiB of "
+    "``TINY'' Tiny core devices with 512@tie{}B up to 4@tie{}KiB of "
     "program memory." },
   { ARCH_AVRXMEGA2,
-    "\"XMEGA\" devices with more than 8 |nbsp| KiB and up to 64 |nbsp| KiB "
+    "``XMEGA'' devices with more than 8@tie{}KiB and up to 64@tie{}KiB "
     "of program memory." },
   { ARCH_AVRXMEGA3,
-    "\"XMEGA\" devices with up to 64 |nbsp| KiB of combined program memory "
+    "``XMEGA'' devices with up to 64@tie{}KiB of combined program memory "
     "and RAM, and with program memory visible in the RAM address space." },
   { ARCH_AVRXMEGA4,
-    "\"XMEGA\" devices with more than 64 |nbsp| KiB and up to 128 |nbsp| KiB "
+    "``XMEGA'' devices with more than 64@tie{}KiB and up to 128@tie{}KiB "
     "of program memory." },
   { ARCH_AVRXMEGA5,
-    "\"XMEGA\" devices with more than 64 |nbsp| KiB and up to 128 |nbsp| KiB "
-    "of program memory and more than 64 |nbsp| KiB of RAM." },
+    "``XMEGA'' devices with more than 64@tie{}KiB and up to 128@tie{}KiB "
+    "of program memory and more than 64@tie{}KiB of RAM." },
   { ARCH_AVRXMEGA6,
-    "\"XMEGA\" devices with more than 128 |nbsp| KiB of program memory." },
+    "``XMEGA'' devices with more than 128@tie{}KiB of program memory." },
   { ARCH_AVRXMEGA7,
-    "\"XMEGA\" devices with more than 128 |nbsp| KiB of program memory "
-    "and more than 64 |nbsp| KiB of RAM." }
+    "``XMEGA'' devices with more than 128@tie{}KiB of program memory "
+    "and more than 64@tie{}KiB of RAM." }
 };
 
 const avr_mcu_t
diff --git a/gcc/config/avr/avr-mcus.def b/gcc/config/avr/avr-mcus.def
index 26c38a5c7aa..fa5e6685227 100644
--- a/gcc/config/avr/avr-mcus.def
+++ b/gcc/config/avr/avr-mcus.def
@@ -23,7 +23,7 @@
 
    This will regenerate / update the following source files:
 
-   -  $(srcdir)/doc/avr-mmcu.rst
+   -  $(srcdir)/doc/avr-mmcu.texi
 
    After that, rebuild everything and check-in the new sources to the repo.
    The device list below should be kept in sync with AVR-LibC.
diff --git a/gcc/config/avr/gen-avr-mmcu-rst.cc b/gcc/config/avr/gen-avr-mmcu-texi.cc
similarity index 80%
rename from gcc/config/avr/gen-avr-mmcu-rst.cc
rename to gcc/config/avr/gen-avr-mmcu-texi.cc
index 19b903c2760..0e013e90bd0 100644
--- a/gcc/config/avr/gen-avr-mmcu-rst.cc
+++ b/gcc/config/avr/gen-avr-mmcu-texi.cc
@@ -137,11 +137,11 @@ print_mcus (size_t n_mcus)
     
   qsort (mcus, n_mcus, sizeof (avr_mcu_t*), comparator);
 
-  printf ("  :samp:`{mcu}=`");
+  printf ("@*@var{mcu}@tie{}=");
 
   for (i = 0; i < n_mcus; i++)
     {
-      printf (" ``%s``%s", mcus[i]->name, i == n_mcus-1 ? ".\n\n" : ",");
+      printf (" @code{%s}%s", mcus[i]->name, i == n_mcus-1 ? ".\n\n" : ",");
 
       if (i && !strcmp (mcus[i]->name, mcus[i-1]->name))
 	{
@@ -162,18 +162,20 @@ int main (void)
   size_t i, n_mcus = 0;
   const avr_mcu_t *mcu;
 
-  printf ("..\n");
-  printf ("  Copyright 1988-2022 Free Software Foundation, Inc.\n");
-  printf ("  This is part of the GCC manual.\n");
-  printf ("  For copying conditions, see the copyright.rst file.\n\n");
+  printf ("@c Copyright (C) 2012-2022 Free Software Foundation, Inc.\n");
+  printf ("@c This is part of the GCC manual.\n");
+  printf ("@c For copying conditions, see the file "
+	  "gcc/doc/include/fdl.texi.\n\n");
 
-  printf ("  This file is generated automatically using\n");
-  printf ("  gcc/config/avr/gen-avr-mmcu-texi.cc from:\n");
-  printf ("    gcc/config/avr/avr-arch.h\n");
-  printf ("    gcc/config/avr/avr-devices.cc\n");
-  printf ("    gcc/config/avr/avr-mcus.def\n\n");
+  printf ("@c This file is generated automatically using\n");
+  printf ("@c gcc/config/avr/gen-avr-mmcu-texi.cc from:\n");
+  printf ("@c	 gcc/config/avr/avr-arch.h\n");
+  printf ("@c	 gcc/config/avr/avr-devices.cc\n");
+  printf ("@c	 gcc/config/avr/avr-mcus.def\n\n");
 
-  printf ("  Please do not edit manually.\n\n");
+  printf ("@c Please do not edit manually.\n\n");
+
+  printf ("@table @code\n\n");
 
   for (mcu = avr_mcu_types; mcu->name; mcu++)
     {
@@ -185,9 +187,9 @@ int main (void)
 	  print_mcus (n_mcus);
 	  n_mcus = 0;
 
-	  for (i = 0; i < ARRAY_SIZE (avr_rst); i++)
-	    if (arch_id == avr_rst[i].arch_id)
-	      printf ("``%s``\n  %s\n\n", mcu->name, avr_rst[i].texinfo);
+	  for (i = 0; i < ARRAY_SIZE (avr_texinfo); i++)
+	    if (arch_id == avr_texinfo[i].arch_id)
+	      printf ("@item %s\n%s\n", mcu->name, avr_texinfo[i].texinfo);
 	}
       else if (arch_id == (enum avr_arch_id) mcu->arch_id)
 	{
@@ -196,6 +198,7 @@ int main (void)
     }
 
   print_mcus (n_mcus);
+  printf ("@end table\n");
 
   return EXIT_SUCCESS;
 }
diff --git a/gcc/config/avr/t-avr b/gcc/config/avr/t-avr
index 8ee31862938..d7b1751b3b6 100644
--- a/gcc/config/avr/t-avr
+++ b/gcc/config/avr/t-avr
@@ -78,10 +78,10 @@ AVR_MCUS = $(srcdir)/config/avr/avr-mcus.def
 
 .PHONY: avr-mcus
 
-avr-mcus: $(srcdir)/doc/gcc/gcc-command-options/machine-dependent-options/avr-mmcu.rst ; @true
+avr-mcus: $(srcdir)/doc/avr-mmcu.texi ; @true
 
 # Make sure that native -mmcu= support is in sync with -mmcu= documentation.
-gen-avr-mmcu-rst$(build_exeext): $(srcdir)/config/avr/gen-avr-mmcu-rst.cc \
+gen-avr-mmcu-texi$(build_exeext): $(srcdir)/config/avr/gen-avr-mmcu-texi.cc \
   $(AVR_MCUS) $(srcdir)/config/avr/avr-devices.cc \
   $(srcdir)/config/avr/avr-arch.h
 	$(CXX_FOR_BUILD) $(CXXFLAGS_FOR_BUILD) $< -o $@
@@ -91,7 +91,7 @@ gen-avr-mmcu-specs$(build_exeext): $(srcdir)/config/avr/gen-avr-mmcu-specs.cc \
   $(srcdir)/config/avr/avr-arch.h $(TM_H)
 	$(CXX_FOR_BUILD) $(CXXFLAGS_FOR_BUILD) $< -o $@ $(INCLUDES)
 
-$(srcdir)/doc/gcc/gcc-command-options/machine-dependent-options/avr-mmcu.rst: gen-avr-mmcu-rst$(build_exeext)
+$(srcdir)/doc/avr-mmcu.texi: gen-avr-mmcu-texi$(build_exeext)
 	$(RUN_GEN) ./$< > $@
 
 s-device-specs: gen-avr-mmcu-specs$(build_exeext)
diff --git a/gcc/doc/gcc/gcc-command-options/machine-dependent-options/avr-mmcu.rst b/gcc/doc/gcc/gcc-command-options/machine-dependent-options/avr-mmcu.rst
index 120f919e331..df82d0cf906 100644
--- a/gcc/doc/gcc/gcc-command-options/machine-dependent-options/avr-mmcu.rst
+++ b/gcc/doc/gcc/gcc-command-options/machine-dependent-options/avr-mmcu.rst
@@ -94,5 +94,4 @@
 ``avr1``
   This ISA is implemented by the minimal AVR core and supported for assembler only.
 
-  :samp:`{mcu}=` ``attiny11``, ``attiny12``, ``attiny15``, ``attiny28``, ``at90s1200``.
-
+  :samp:`{mcu}=` ``attiny11``, ``attiny12``, ``attiny15``, ``attiny28``, ``at90s1200``.
\ No newline at end of file

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-11-14  8:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-14  8:38 [gcc r13-3982] Revert "avr: sphinx: port gen-avr-mmcu to RST" Martin Liska

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).