From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1851) id BE02C3857B99; Wed, 19 Oct 2022 13:58:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BE02C3857B99 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666187898; bh=dXE+y75ACUec/lMEK/bzRekthWi8yVN4bMy1zhXGVVw=; h=From:To:Subject:Date:From; b=cCHNuuKTkqfGXIopeURw7/JCtHL6k0t4Z9JgdiMgou3gX3jl0cLXVkiW2Lo2Pvk7a apej9512HQs7Es4oXAzYbhuYlM+56CeKMsirATT6BFuf3WJHVrTd0VPMEoyTuBrzRI G+s0hGMDmjukaR3faxDY6nWa2OtKHAlssHzria/c= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Martin Liska To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/marxin/heads/sphinx-avr-mmcu)] Convert to RST. X-Act-Checkin: gcc X-Git-Author: Martin Liska X-Git-Refname: refs/users/marxin/heads/sphinx-avr-mmcu X-Git-Oldrev: 09fed44cabd50f3d8e050f91cc2db02364ce9176 X-Git-Newrev: b97039ac93bb903bf7b9abea2571dfd8598990b0 Message-Id: <20221019135818.BE02C3857B99@sourceware.org> Date: Wed, 19 Oct 2022 13:58:18 +0000 (GMT) List-Id: https://gcc.gnu.org/g:b97039ac93bb903bf7b9abea2571dfd8598990b0 commit b97039ac93bb903bf7b9abea2571dfd8598990b0 Author: Martin Liska Date: Wed Oct 19 15:56:00 2022 +0200 Convert to RST. Diff: --- gcc/Makefile.in | 2 +- gcc/config/avr/avr-devices.cc | 42 +++++++++++----------- .../{gen-avr-mmcu-texi.cc => gen-avr-mmcu-rst.cc} | 33 ++++++++--------- gcc/config/avr/t-avr | 6 ++-- 4 files changed, 40 insertions(+), 43 deletions(-) diff --git a/gcc/Makefile.in b/gcc/Makefile.in index f672e6ea549..daebf18b253 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -3332,7 +3332,7 @@ TEXI_GCC_FILES = gcc.texi gcc-common.texi gcc-vers.texi frontends.texi \ standards.texi invoke.texi extend.texi md.texi objc.texi \ gcov.texi trouble.texi bugreport.texi service.texi \ contribute.texi compat.texi funding.texi gnu.texi gpl_v3.texi \ - fdl.texi contrib.texi cppenv.texi cppopts.texi avr-mmcu.texi \ + fdl.texi contrib.texi cppenv.texi cppopts.texi avr-mmcu.rst \ implement-c.texi implement-cxx.texi gcov-tool.texi gcov-dump.texi \ lto-dump.texi diff --git a/gcc/config/avr/avr-devices.cc b/gcc/config/avr/avr-devices.cc index aa284217f50..7107e3f0566 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_texinfo[] = +avr_rst[] = { { ARCH_AVR1, "This ISA is implemented by the minimal AVR core and supported " "for assembler only." }, { ARCH_AVR2, - "``Classic'' devices with up to 8@tie{}KiB of program memory." }, + "``Classic`` devices with up to 8 |nbsp| KiB of program memory." }, { ARCH_AVR25, - "``Classic'' devices with up to 8@tie{}KiB of program memory and with " - "the @code{MOVW} instruction." }, + "``Classic`` devices with up to 8 |nbsp| KiB of program memory and with " + "the ``MOVW`` instruction." }, { ARCH_AVR3, - "``Classic'' devices with 16@tie{}KiB up to 64@tie{}KiB of " + "``Classic`` devices with 16 |nbsp| KiB up to 64 |nbsp| KiB of " "program memory." }, { ARCH_AVR31, - "``Classic'' devices with 128@tie{}KiB of program memory." }, + "``Classic`` devices with 128 |nbsp| KiB of program memory." }, { ARCH_AVR35, - "``Classic'' devices with 16@tie{}KiB up to 64@tie{}KiB of " - "program memory and with the @code{MOVW} instruction." }, + "``Classic`` devices with 16 |nbsp| KiB up to 64 |nbsp| KiB of " + "program memory and with the ``MOVW`` instruction." }, { ARCH_AVR4, - "``Enhanced'' devices with up to 8@tie{}KiB of program memory." }, + "``Enhanced`` devices with up to 8 |nbsp| KiB of program memory." }, { ARCH_AVR5, - "``Enhanced'' devices with 16@tie{}KiB up to 64@tie{}KiB of " + "``Enhanced`` devices with 16 |nbsp| KiB up to 64 |nbsp| KiB of " "program memory." }, { ARCH_AVR51, - "``Enhanced'' devices with 128@tie{}KiB of program memory." }, + "``Enhanced`` devices with 128 |nbsp| KiB of program memory." }, { ARCH_AVR6, - "``Enhanced'' devices with 3-byte PC, i.e.@: with more than 128@tie{}KiB " + "``Enhanced`` devices with 3-byte PC, i.e.@: with more than 128 |nbsp| KiB " "of program memory." }, { ARCH_AVRTINY, - "``TINY'' Tiny core devices with 512@tie{}B up to 4@tie{}KiB of " + "``TINY`` Tiny core devices with 512 |nbsp| B up to 4 |nbsp| KiB of " "program memory." }, { ARCH_AVRXMEGA2, - "``XMEGA'' devices with more than 8@tie{}KiB and up to 64@tie{}KiB " + "``XMEGA`` devices with more than 8 |nbsp| KiB and up to 64 |nbsp| KiB " "of program memory." }, { ARCH_AVRXMEGA3, - "``XMEGA'' devices with up to 64@tie{}KiB of combined program memory " + "``XMEGA`` devices with up to 64 |nbsp| 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@tie{}KiB and up to 128@tie{}KiB " + "``XMEGA`` devices with more than 64 |nbsp| KiB and up to 128 |nbsp| KiB " "of program memory." }, { ARCH_AVRXMEGA5, - "``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." }, + "``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." }, { ARCH_AVRXMEGA6, - "``XMEGA'' devices with more than 128@tie{}KiB of program memory." }, + "``XMEGA`` devices with more than 128 |nbsp| KiB of program memory." }, { ARCH_AVRXMEGA7, - "``XMEGA'' devices with more than 128@tie{}KiB of program memory " - "and more than 64@tie{}KiB of RAM." } + "``XMEGA`` devices with more than 128 |nbsp| KiB of program memory " + "and more than 64 |nbsp| KiB of RAM." } }; const avr_mcu_t diff --git a/gcc/config/avr/gen-avr-mmcu-texi.cc b/gcc/config/avr/gen-avr-mmcu-rst.cc similarity index 80% rename from gcc/config/avr/gen-avr-mmcu-texi.cc rename to gcc/config/avr/gen-avr-mmcu-rst.cc index 0e013e90bd0..19b903c2760 100644 --- a/gcc/config/avr/gen-avr-mmcu-texi.cc +++ b/gcc/config/avr/gen-avr-mmcu-rst.cc @@ -137,11 +137,11 @@ print_mcus (size_t n_mcus) qsort (mcus, n_mcus, sizeof (avr_mcu_t*), comparator); - printf ("@*@var{mcu}@tie{}="); + printf (" :samp:`{mcu}=`"); for (i = 0; i < n_mcus; i++) { - printf (" @code{%s}%s", mcus[i]->name, i == n_mcus-1 ? ".\n\n" : ","); + printf (" ``%s``%s", mcus[i]->name, i == n_mcus-1 ? ".\n\n" : ","); if (i && !strcmp (mcus[i]->name, mcus[i-1]->name)) { @@ -162,20 +162,18 @@ int main (void) size_t i, n_mcus = 0; const avr_mcu_t *mcu; - 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 ("..\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 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 (" 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 Please do not edit manually.\n\n"); - - printf ("@table @code\n\n"); + printf (" Please do not edit manually.\n\n"); for (mcu = avr_mcu_types; mcu->name; mcu++) { @@ -187,9 +185,9 @@ int main (void) print_mcus (n_mcus); n_mcus = 0; - 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); + 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); } else if (arch_id == (enum avr_arch_id) mcu->arch_id) { @@ -198,7 +196,6 @@ 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 d7b1751b3b6..9c5632a8210 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/avr-mmcu.texi ; @true +avr-mcus: $(srcdir)/doc/avr-mmcu.rst ; @true # Make sure that native -mmcu= support is in sync with -mmcu= documentation. -gen-avr-mmcu-texi$(build_exeext): $(srcdir)/config/avr/gen-avr-mmcu-texi.cc \ +gen-avr-mmcu-rst$(build_exeext): $(srcdir)/config/avr/gen-avr-mmcu-rst.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/avr-mmcu.texi: gen-avr-mmcu-texi$(build_exeext) +$(srcdir)/doc/avr-mmcu.rst: gen-avr-mmcu-rst$(build_exeext) $(RUN_GEN) ./$< > $@ s-device-specs: gen-avr-mmcu-specs$(build_exeext)