Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add foreach_sep and KATI_file_no_rerun functions #270

Merged
merged 2 commits into from
Jun 21, 2023

Conversation

lamontj
Copy link
Contributor

@lamontj lamontj commented Jun 21, 2023

These changes both allow us to remove otherwise unnecessary invocations of the shell.

  • foreach_sep helps with creating variables containing json strings.
  • KATI_file_no_rerun avoids rewriting on every invocation.

syntax: $(KATI_foreach_sep var,separator,list,text)

Rather than using a space to separate items in the expanded result,
`separator` is used.

	comma := ,
	v := $(KATI_foreach_sep w,$(comma) ,a b c,"$(w)")

v will be set to: `"a", "b", "c"`

Change-Id: I426d7b24846dc495b9134319dd452809837fe5f9
@lamontj lamontj requested a review from a team as a code owner June 21, 2023 19:01
The syntax is the same as $(file), but it will only be run once.

Similar to $(KATI_shell_no_rerun), we want to generate files during
kati, but not regenerate them on every invocation of kati.

Test: unit tests pass
Change-Id: I34b7972a0a9f0540da322a995c30fef2efd16145
@Colecf Colecf merged commit 5c48149 into google:master Jun 21, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants