Skip to content

Commit f130f6f

Browse files
committed
Apply suggestions from code review
Signed-off-by: Simone Orru <simone.orru@secomind.com>
1 parent ee58c26 commit f130f6f

2 files changed

Lines changed: 16 additions & 14 deletions

File tree

doc/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ configure:
2727
-DEDGEHOG_DEVICE_EXTENDED_DOCS=${EDGEHOG_DEVICE_EXTENDED_DOCS}
2828

2929
clean:
30-
rm -rf ${BUILDDIR}
30+
cmake --build ${BUILDDIR} --target clean

scripts/docs.py

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -81,19 +81,21 @@ def do_run(self, args, unknown_args):
8181
"""
8282
module_path = Path(self.topdir).joinpath("edgehog-zephyr-device")
8383
if args.clean:
84-
log.inf(stylize("make -C doc clean", fore("cyan")))
85-
subprocess.run(
86-
"make -C doc clean",
87-
shell=True,
88-
cwd=module_path,
89-
timeout=60,
90-
check=True,
91-
env=dict(
92-
os.environ,
93-
EDGEHOG_DEVICE_BASE=f"{module_path}",
94-
EDGEHOG_DEVICE_EXTENDED_DOCS="yes" if args.extended else "no",
95-
),
96-
)
84+
build_path = os.path.join(module_path, "doc", "_build")
85+
if os.path.exists(build_path):
86+
log.inf(stylize("make -C doc clean", fore("cyan")))
87+
subprocess.run(
88+
"make -C doc clean",
89+
shell=True,
90+
cwd=module_path,
91+
timeout=60,
92+
check=True,
93+
env=dict(
94+
os.environ,
95+
EDGEHOG_DEVICE_BASE=f"{module_path}",
96+
EDGEHOG_DEVICE_EXTENDED_DOCS="yes" if args.extended else "no",
97+
),
98+
)
9799
log.inf(stylize("make -C doc doxygen", fore("cyan")))
98100
subprocess.run(
99101
"make -C doc doxygen",

0 commit comments

Comments
 (0)