This is an automated email from the ASF dual-hosted git repository.

alsay pushed a commit to branch func_create_order
in repository https://gitbox.apache.org/repos/asf/datasketches-bigquery.git

commit ca3fc38eab1ca37a2f7e584d521a0a18cf43eb3e
Author: AlexanderSaydakov <[email protected]>
AuthorDate: Mon Nov 4 10:58:44 2024 -0800

    create functions with longer signatures first
---
 kll/Makefile     | 6 +++++-
 tdigest/Makefile | 6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/kll/Makefile b/kll/Makefile
index 77ae79c..d1935b7 100644
--- a/kll/Makefile
+++ b/kll/Makefile
@@ -49,8 +49,12 @@ upload: all
          gcloud storage cp $$file $(JS_BUCKET)/ ; \
        done
 
+# some functions (with shorter name) can call other functions (with suffix)
+# so reversing the order should create full-signature functions first
+reverse = $(if $(wordlist 2,2,$(1)),$(call reverse,$(wordlist 2,$(words 
$(1)),$(1))) $(firstword $(1)),$(1))
+
 create:
-       @for file in $(wildcard sqlx/*.sqlx); do \
+       @for file in $(call reverse,$(wildcard sqlx/*.sqlx)); do \
          echo creating $$file; \
          ../substitute_and_run.sh $$file ; \
        done
diff --git a/tdigest/Makefile b/tdigest/Makefile
index be14f58..2fc80e3 100644
--- a/tdigest/Makefile
+++ b/tdigest/Makefile
@@ -48,8 +48,12 @@ upload: all
          gcloud storage cp $$file $(JS_BUCKET)/ ; \
        done
 
+# some functions (with shorter name) can call other functions (with suffix)
+# so reversing the order should create full-signature functions first
+reverse = $(if $(wordlist 2,2,$(1)),$(call reverse,$(wordlist 2,$(words 
$(1)),$(1))) $(firstword $(1)),$(1))
+
 create:
-       @for file in $(wildcard sqlx/*.sqlx); do \
+       @for file in $(call reverse,$(wildcard sqlx/*.sqlx)); do \
          echo creating $$file; \
          ../substitute_and_run.sh $$file ; \
        done


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to