From 908528caae573a379a13ce8dbf626e1c4fd47f59 Mon Sep 17 00:00:00 2001 From: Andrew Scheller Date: Mon, 12 Aug 2024 23:47:56 +0100 Subject: [PATCH] Move doxygentoasciidoc submodule into the lib directory, in common with other submodules Also set a branch for the submodule, for easier updating --- .gitmodules | 3 ++- Makefile | 15 ++++++++------- doxygentoasciidoc | 1 - lib/doxygentoasciidoc | 1 + 4 files changed, 11 insertions(+), 9 deletions(-) delete mode 160000 doxygentoasciidoc create mode 160000 lib/doxygentoasciidoc diff --git a/.gitmodules b/.gitmodules index 4532ebbdf2..9f315972ef 100644 --- a/.gitmodules +++ b/.gitmodules @@ -8,5 +8,6 @@ branch = master [submodule "doxygentoasciidoc"] - path = doxygentoasciidoc + path = lib/doxygentoasciidoc url = https://github.com/raspberrypi/doxygentoasciidoc.git + branch = main diff --git a/Makefile b/Makefile index c6e7e3c86a..5f99db6a8b 100644 --- a/Makefile +++ b/Makefile @@ -16,6 +16,7 @@ AUTO_NINJABUILD = $(BUILD_DIR)/autogenerated.ninja PICO_SDK_DIR = lib/pico-sdk PICO_EXAMPLES_DIR = lib/pico-examples +DOXYGEN_TO_ASCIIDOC_DIR = lib/doxygentoasciidoc ALL_SUBMODULE_CMAKELISTS = $(PICO_SDK_DIR)/CMakeLists.txt $(PICO_EXAMPLES_DIR)/CMakeLists.txt DOXYGEN_PICO_SDK_BUILD_DIR = build-pico-sdk-docs DOXYGEN_XML_DIR = $(DOXYGEN_PICO_SDK_BUILD_DIR)/combined/docs/doxygen/xml @@ -51,10 +52,10 @@ $(PICO_EXAMPLES_DIR)/CMakeLists.txt: | $(PICO_SDK_DIR)/CMakeLists.txt $(PICO_EXA git submodule update --init $(PICO_EXAMPLES_DIR) # Initialise doxygentoasciidoc submodule -doxygentoasciidoc/__main__.py: - git submodule update --init doxygentoasciidoc +$(DOXYGEN_TO_ASCIIDOC_DIR)/__main__.py: + git submodule update --init $(DOXYGEN_TO_ASCIIDOC_DIR) -fetch_submodules: $(ALL_SUBMODULE_CMAKELISTS) doxygentoasciidoc/__main__.py +fetch_submodules: $(ALL_SUBMODULE_CMAKELISTS) $(DOXYGEN_TO_ASCIIDOC_DIR)/__main__.py # Get rid of the submodules clean_submodules: @@ -79,11 +80,11 @@ clean_doxygen_xml: rm -rf $(DOXYGEN_PICO_SDK_BUILD_DIR) # create the sdk adoc and the json file -$(ASCIIDOC_DOXYGEN_DIR)/picosdk_index.json $(ASCIIDOC_DOXYGEN_DIR)/index_doxygen.adoc: $(ASCIIDOC_DOXYGEN_DIR) $(DOXYGEN_XML_DIR)/index.xml doxygentoasciidoc/__main__.py doxygentoasciidoc/cli.py doxygentoasciidoc/nodes.py doxygentoasciidoc/helpers.py | $(BUILD_DIR) +$(ASCIIDOC_DOXYGEN_DIR)/picosdk_index.json $(ASCIIDOC_DOXYGEN_DIR)/index_doxygen.adoc: $(ASCIIDOC_DOXYGEN_DIR) $(DOXYGEN_XML_DIR)/index.xml $(DOXYGEN_TO_ASCIIDOC_DIR)/__main__.py $(DOXYGEN_TO_ASCIIDOC_DIR)/cli.py $(DOXYGEN_TO_ASCIIDOC_DIR)/nodes.py $(DOXYGEN_TO_ASCIIDOC_DIR)/helpers.py | $(BUILD_DIR) $(MAKE) clean_ninja - python3 -m doxygentoasciidoc -f $(DOXYGEN_XML_DIR)/index.xml > $(ASCIIDOC_DOXYGEN_DIR)/all_groups.adoc - python3 -m doxygentoasciidoc -f $(DOXYGEN_XML_DIR)/indexpage.xml -c > $(ASCIIDOC_DOXYGEN_DIR)/index_doxygen.adoc - python3 -m doxygentoasciidoc -f $(DOXYGEN_XML_DIR)/examples_page.xml -c > $(ASCIIDOC_DOXYGEN_DIR)/examples_page.adoc + PYTHONPATH=$(DOXYGEN_TO_ASCIIDOC_DIR)/.. python3 -m doxygentoasciidoc -f $(DOXYGEN_XML_DIR)/index.xml > $(ASCIIDOC_DOXYGEN_DIR)/all_groups.adoc + PYTHONPATH=$(DOXYGEN_TO_ASCIIDOC_DIR)/.. python3 -m doxygentoasciidoc -f $(DOXYGEN_XML_DIR)/indexpage.xml -c > $(ASCIIDOC_DOXYGEN_DIR)/index_doxygen.adoc + PYTHONPATH=$(DOXYGEN_TO_ASCIIDOC_DIR)/.. python3 -m doxygentoasciidoc -f $(DOXYGEN_XML_DIR)/examples_page.xml -c > $(ASCIIDOC_DOXYGEN_DIR)/examples_page.adoc python3 $(SCRIPTS_DIR)/postprocess_doxygen_adoc.py $(ASCIIDOC_DOXYGEN_DIR) -cp $(DOXYGEN_XML_DIR)/*.png $(ASCIIDOC_DOXYGEN_DIR) 2>/dev/null || true diff --git a/doxygentoasciidoc b/doxygentoasciidoc deleted file mode 160000 index 70569f25b4..0000000000 --- a/doxygentoasciidoc +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 70569f25b411d1381232b2997975cc34ac9df629 diff --git a/lib/doxygentoasciidoc b/lib/doxygentoasciidoc new file mode 160000 index 0000000000..278bc08748 --- /dev/null +++ b/lib/doxygentoasciidoc @@ -0,0 +1 @@ +Subproject commit 278bc087489951a22c776ee611965d600db4547f