Skip to content

Commit e7acdcb

Browse files
committed
Small Makefile tweaks
- some versions of macOS don't come with the `realpath` command - if no error was raised whilst building a target, `make` blindly continues following subsequent rules (see https://stackoverflow.com/q/55424550), regardless of whether the requested dependency was actually created! So raise an error if `make docs` doesn't actually create the expected directory (which happens if `doxygen` isn't installed)
1 parent 486f241 commit e7acdcb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@ clean_submodules:
5757

5858
# Create the pico-sdk Doxygen HTML files
5959
$(DOXYGEN_HTML_DIR): | $(ALL_SUBMODULE_CMAKELISTS) $(DOXYGEN_PICO_SDK_BUILD_DIR)
60-
cmake -S $(PICO_SDK_DIR) -B $(DOXYGEN_PICO_SDK_BUILD_DIR) -DPICO_EXAMPLES_PATH=`realpath $(PICO_EXAMPLES_DIR)`
60+
cmake -S $(PICO_SDK_DIR) -B $(DOXYGEN_PICO_SDK_BUILD_DIR) -DPICO_EXAMPLES_PATH=../$(PICO_EXAMPLES_DIR)
6161
$(MAKE) -C $(DOXYGEN_PICO_SDK_BUILD_DIR) docs
62+
test -d "$@"
6263

6364
build_doxygen_html: | $(DOXYGEN_HTML_DIR)
6465

0 commit comments

Comments
 (0)