2019-07-28 10:26:05 +02:00
|
|
|
# Documentation
|
2019-07-10 01:54:15 +02:00
|
|
|
OUTLINE_CMD ?= outline
|
|
|
|
DOCUMENTATION_PATH ?= _documentation
|
2020-03-27 18:33:10 +01:00
|
|
|
DOCUMENTATION_RUNTIME_PATH ?= $(DOCUMENTATION_PATH)/reference
|
2020-03-22 13:49:24 +01:00
|
|
|
EXAMPLES_PATH ?= starlark/types/testdata/examples
|
2019-07-10 01:54:15 +02:00
|
|
|
|
|
|
|
RUNTIME_MODULES = \
|
2019-08-01 20:43:59 +02:00
|
|
|
github.com/mcuadros/ascode/starlark/module/os \
|
2020-03-22 13:49:24 +01:00
|
|
|
github.com/mcuadros/ascode/starlark/types \
|
2019-08-01 20:43:59 +02:00
|
|
|
github.com/mcuadros/ascode/starlark/module/filepath \
|
2019-07-10 01:54:15 +02:00
|
|
|
github.com/qri-io/starlib/encoding/base64 \
|
|
|
|
github.com/qri-io/starlib/encoding/csv \
|
|
|
|
github.com/qri-io/starlib/encoding/json \
|
2019-07-11 18:45:42 +02:00
|
|
|
github.com/qri-io/starlib/encoding/yaml \
|
2019-07-10 01:54:15 +02:00
|
|
|
github.com/qri-io/starlib/re \
|
|
|
|
github.com/qri-io/starlib/http
|
|
|
|
|
2020-03-27 18:33:10 +01:00
|
|
|
# Build Info
|
|
|
|
GO_LDFLAGS_CMD = go run _scripts/goldflags.go
|
|
|
|
GO_LDFLAGS_PACKAGE = cmd
|
|
|
|
GO_LDFLAGS_PACKAGES = \
|
|
|
|
starlarkVersion=go.starlark.net \
|
|
|
|
terraformVersion=github.com/hashicorp/terraform
|
2019-07-28 10:26:05 +02:00
|
|
|
|
2019-07-10 01:54:15 +02:00
|
|
|
|
|
|
|
# Rules
|
2019-07-28 10:26:05 +02:00
|
|
|
.PHONY: $(RUNTIME_MODULES) $(COMMANDS) documentation
|
2019-07-10 01:54:15 +02:00
|
|
|
|
|
|
|
documentation: $(RUNTIME_MODULES)
|
|
|
|
$(RUNTIME_MODULES): $(DOCUMENTATION_RUNTIME_PATH)
|
2020-03-22 13:49:24 +01:00
|
|
|
$(OUTLINE_CMD) package -t _scripts/template.md -d $(EXAMPLES_PATH) $@ \
|
|
|
|
> $(DOCUMENTATION_RUNTIME_PATH)/`basename $@`.md
|
2019-07-10 01:54:15 +02:00
|
|
|
|
|
|
|
$(DOCUMENTATION_RUNTIME_PATH):
|
2019-07-28 10:26:05 +02:00
|
|
|
mkdir -p $@
|
|
|
|
|
2020-03-27 18:33:10 +01:00
|
|
|
goldflags:
|
|
|
|
@$(GO_LDFLAGS_CMD) $(GO_LDFLAGS_PACKAGE) . $(GO_LDFLAGS_PACKAGES)
|