Merge pull request #32215 from tiborvass/docs-yaml-fix-makefile

docs: fix Makefile for yaml docs generation
(cherry picked from commit 5ec88474b78faf721e4d90a902e0266d4388699c)
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
diff --git a/Makefile b/Makefile
index 102ffd3..1b1a129 100644
--- a/Makefile
+++ b/Makefile
@@ -118,7 +118,7 @@
 	$(DOCKER_RUN_DOCKER) bash
 
 yaml-docs-gen: build ## generate documentation YAML files consumed by docs repo
-	$(DOCKER_RUN_DOCKER) sh -c 'hack/make.sh yaml-docs-generator && ( cd bundles/latest/yaml-docs-generator; mkdir docs; ./yaml-docs-generator --target $$(pwd)/docs )'
+	$(DOCKER_RUN_DOCKER) sh -c 'hack/make.sh yaml-docs-generator && ( root=$$(pwd); cd bundles/latest/yaml-docs-generator; mkdir docs; ./yaml-docs-generator --root $${root} --target $$(pwd)/docs )'
 
 test: build ## run the unit, integration and docker-py tests
 	$(DOCKER_RUN_DOCKER) hack/make.sh dynbinary cross test-unit test-integration-cli test-docker-py