Escaping parentheses in Makefile rule with bash <(curl ...) Escaping parentheses in Makefile rule with bash <(curl ...) curl curl

Escaping parentheses in Makefile rule with bash <(curl ...)


The reason is because, you are not using the bash shell. Your makefile does not use the bourne again shell (bash) in which process substitution is supported(<()), so the system executes it with /bin/sh. The default /bin/sh bourne shell is designed to run only with standard features.

Use the SHELL := /bin/bash in your Makefile to make the bash shell by default for all the recipes, or you could define it per recipe.

foo: SHELL := /bin/bashfoo:    docker run $(IMAGE_NAME) bash <(curl SOME_URL) \        --some-param1 \        --some-param2

From GNU make documentation: Choosing the Shell. Quoting from it to show the actual lines

The program used as the shell is taken from the variable SHELL. If this variable is not set in your makefile, the program /bin/sh is used as the shell