From 83521dbc51d8e26e97c644b4384a43e9b5650af7 Mon Sep 17 00:00:00 2001 From: Marius Vikhammer Date: Fri, 13 Dec 2019 10:48:21 +0800 Subject: [PATCH] doc: Include paths for chip specific headers now depend on target Input for Doxygen now depend on idf_target for some paths, updated path name generated in run_doxygen.py to show the target dependent path. --- docs/Doxyfile | 8 ++++---- docs/idf_extensions/run_doxygen.py | 8 ++++++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/Doxyfile b/docs/Doxyfile index 6ff8d2f76a..b642f6033c 100644 --- a/docs/Doxyfile +++ b/docs/Doxyfile @@ -217,7 +217,7 @@ INPUT = \ ## Himem $(IDF_PATH)/components/esp32/include/esp32/himem.h \ ## Interrupt Allocation - $(IDF_PATH)/components/esp32/include/esp_intr_alloc.h \ + $(IDF_PATH)/components/$(IDF_TARGET)/include/esp_intr_alloc.h \ ## Watchdogs ## NOTE: for two lines below header_file.inc is not used $(IDF_PATH)/components/esp_common/include/esp_int_wdt.h \ @@ -233,7 +233,7 @@ INPUT = \ ## ESP HTTPS OTA $(IDF_PATH)/components/esp_https_ota/include/esp_https_ota.h \ ## Sleep - $(IDF_PATH)/components/esp32/include/esp_sleep.h \ + $(IDF_PATH)/components/$(IDF_TARGET)/include/esp_sleep.h \ ## Logging $(IDF_PATH)/components/log/include/esp_log.h \ ## Base MAC address @@ -245,7 +245,7 @@ INPUT = \ ## ULP Coprocessor - API Guides ## ## NOTE: for line below header_file.inc is not used - $(IDF_PATH)/components/ulp/include/esp32/ulp.h \ + $(IDF_PATH)/components/ulp/include/$(IDF_TARGET)/ulp.h \ $(IDF_PATH)/components/ulp/include/ulp_common.h \ ## ## Application Level Tracing - API Reference @@ -254,7 +254,7 @@ INPUT = \ $(IDF_PATH)/components/app_trace/include/esp_sysview_trace.h \ ### Power management $(IDF_PATH)/components/esp_common/include/esp_pm.h \ - $(IDF_PATH)/components/esp32/include/esp32/pm.h \ + $(IDF_PATH)/components/$(IDF_TARGET)/include/$(IDF_TARGET)/pm.h \ ### esp_timer, High Resolution Timer $(IDF_PATH)/components/esp_timer/include/esp_timer.h \ ### esp_event, Event Loop Library diff --git a/docs/idf_extensions/run_doxygen.py b/docs/idf_extensions/run_doxygen.py index b14c5c747d..7c3a6d21a8 100644 --- a/docs/idf_extensions/run_doxygen.py +++ b/docs/idf_extensions/run_doxygen.py @@ -99,7 +99,7 @@ def convert_api_xml_to_inc(app, doxyfile): if not os.path.exists(inc_directory_path): os.makedirs(inc_directory_path) - header_paths = get_doxyfile_input_paths(doxyfile) + header_paths = get_doxyfile_input_paths(app, doxyfile) print("Generating 'api_name.inc' files with Doxygen directives") for header_file_path in header_paths: api_name = get_api_name(header_file_path) @@ -116,7 +116,7 @@ def convert_api_xml_to_inc(app, doxyfile): inc_file.write(rst_output) -def get_doxyfile_input_paths(doxyfile_path): +def get_doxyfile_input_paths(app, doxyfile_path): """Get contents of Doxyfile's INPUT statement. Returns: @@ -148,6 +148,10 @@ def get_doxyfile_input_paths(doxyfile_path): # extract header file path inside components folder m = re.search("components/(.*\.h)", line) # noqa: W605 - regular expression header_file_path = m.group(1) + + # Replace env variable used for multi target header + header_file_path = header_file_path.replace("$(IDF_TARGET)", app.config.idf_target) + doxyfile_INPUT.append(header_file_path) # proceed reading next line