Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,12 @@ recurse_dir = $(foreach d, $(wildcard $1*), $(call recurse_dir, $d/) $d)
# For output from recurse_dir this removes all dirs, but in other cases beware.
drop_parents = $(filter-out $(patsubst %/,%,$(dir $1)), $1)

# Generates a list of regular files at any depth inside its argument
files_in_dir = $(call drop_parents, $(call recurse_dir, $1))
# Generates a list of regular files at any depth inside its argument,
# excluding those in any `docs` folder
files_in_dir = $(filter-out \
${1}/docs/%, \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason for not using this ?
reads same to me though, since next char is / so there's no $1docs concat risk,
just wanna make sure i am not missing something on second expan

Suggested change
${1}/docs/%, \
$1/docs/%, \

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I know* $1 and ${1} will act identically here, I just chose the delimited one on principle -- my rule is that if I'm even starting to ask "is there concat risk here", I add braces rather than think about it.

*(but note I'm saying this without looking anything up; Make variable syntax does differ from shell variable syntax in various weird little ways)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's fair, they are identical here so no behaviour change either way

$(call drop_parents, $(call recurse_dir,$1)))


# Git hash + clean status for this directory
git_rev = $(shell \
Expand Down Expand Up @@ -118,9 +122,8 @@ check_modules: $(BASE_I) $(MODULES_C)

document: $(ALL_PKGS_D) .doc/base/all

pkgdocs:
pkgdocs: $(ALL_PKGS_D) .doc/base/all
Rscript scripts/build_pkgdown.R $(ALL_PKGS) base/all || exit 1


install: $(ALL_PKGS_I) .install/base/all
check: $(ALL_PKGS_C) .check/base/all
Expand Down
1 change: 1 addition & 0 deletions scripts/build_pkgdown.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ build_and_copy <- function(pkg, branch, outdir) {

pkgdown::build_site(
pkg = ".",
lazy = TRUE,
override = list(
"llm-docs" = FALSE,
repo = list(url = list(source = url_str)),
Expand Down
Loading