github.com/m3db/m3@v1.5.1-0.20231129193456-75a402aa583b/src/metrics/generated-source-files.mk (about) 1 SELF_DIR := $(dir $(lastword $(MAKEFILE_LIST))) 2 include $(SELF_DIR)/../../.ci/common.mk 3 4 gopath_prefix := $(GOPATH)/src 5 m3metrics_package := github.com/m3db/m3/src/metrics 6 m3metrics_package_path := $(gopath_prefix)/$(m3metrics_package) 7 m3x_package := github.com/m3db/m3/src/x 8 m3x_package_path := $(gopath_prefix)/$(m3x_package) 9 10 # Generation rule for all generated types 11 .PHONY: genny-all 12 genny-all: genny-map-all 13 14 # Map generation rule for all generated maps 15 .PHONY: genny-map-all 16 genny-map-all: genny-map-matcher-cache-elem genny-map-matcher-namespace-results genny-map-matcher-namespace-rule-sets genny-map-matcher-rule-namespaces 17 18 # Map generation rule for matcher/cache/elemMap 19 .PHONY: genny-map-matcher-cache-elem 20 genny-map-matcher-cache-elem: 21 cd $(m3x_package_path) && make byteshashmap-gen \ 22 pkg=cache \ 23 value_type=elementPtr \ 24 target_package=$(m3metrics_package)/matcher/cache \ 25 rename_type_prefix=elem \ 26 rename_constructor=newElemMap \ 27 rename_constructor_options=elemMapOptions 28 # Rename both generated map and constructor files 29 mv -f $(m3metrics_package_path)/matcher/cache/map_gen.go $(m3metrics_package_path)/matcher/cache/elem_map_gen.go 30 mv -f $(m3metrics_package_path)/matcher/cache/new_map_gen.go $(m3metrics_package_path)/matcher/cache/elem_new_map_gen.go 31 32 # Map generation rule for matcher/cache/namespaceResultsMap 33 .PHONY: genny-map-matcher-namespace-results 34 genny-map-matcher-namespace-results: 35 cd $(m3x_package_path) && make byteshashmap-gen \ 36 pkg=cache \ 37 value_type=results \ 38 target_package=$(m3metrics_package)/matcher/cache \ 39 rename_type_prefix=namespaceResults \ 40 rename_constructor=newNamespaceResultsMap \ 41 rename_constructor_options=namespaceResultsMapOptions 42 # Rename both generated map and constructor files 43 mv -f $(m3metrics_package_path)/matcher/cache/map_gen.go $(m3metrics_package_path)/matcher/cache/namespace_results_map_gen.go 44 mv -f $(m3metrics_package_path)/matcher/cache/new_map_gen.go $(m3metrics_package_path)/matcher/cache/namespace_results_new_map_gen.go 45 46 # Map generation rule for matcher/namespaceRuleSetsMap 47 .PHONY: genny-map-matcher-namespace-rule-sets 48 genny-map-matcher-namespace-rule-sets: 49 cd $(m3x_package_path) && make byteshashmap-gen \ 50 pkg=matcher \ 51 value_type=RuleSet \ 52 target_package=$(m3metrics_package)/matcher \ 53 rename_type_prefix=namespaceRuleSets \ 54 rename_constructor=newNamespaceRuleSetsMap \ 55 rename_constructor_options=namespaceRuleSetsMapOptions 56 # Rename both generated map and constructor files 57 mv -f $(m3metrics_package_path)/matcher/map_gen.go $(m3metrics_package_path)/matcher/namespace_rule_sets_map_gen.go 58 mv -f $(m3metrics_package_path)/matcher/new_map_gen.go $(m3metrics_package_path)/matcher/namespace_rule_sets_new_map_gen.go 59 60 # Map generation rule for matcher/ruleNamespacesMap 61 .PHONY: genny-map-matcher-rule-namespaces 62 genny-map-matcher-rule-namespaces: 63 cd $(m3x_package_path) && make byteshashmap-gen \ 64 pkg=matcher \ 65 value_type=rulesNamespace \ 66 target_package=$(m3metrics_package)/matcher \ 67 rename_type_prefix=ruleNamespaces \ 68 rename_constructor=newRuleNamespacesMap \ 69 rename_constructor_options=ruleNamespacesMapOptions 70 # Rename both generated map and constructor files 71 mv -f $(m3metrics_package_path)/matcher/map_gen.go $(m3metrics_package_path)/matcher/rule_namespaces_map_gen.go 72 mv -f $(m3metrics_package_path)/matcher/new_map_gen.go $(m3metrics_package_path)/matcher/rule_namespaces_new_map_gen.go 73