How to check from the command line whether GNU Make is built with support of Guile?
Inside Makefile it can be determined via analyzing .FEATURES
variable (see documentation).
How to check from the command line whether GNU Make is built with support of Guile?
Inside Makefile it can be determined via analyzing .FEATURES
variable (see documentation).
As @ruvim points out, the manual says
You can determine whether GNU Guile support is available by checking the
.FEATURES
variable for the word guile.
$(if $(filter guile,${.FEATURES}) \
,$(info Guile suppoerted, yay!) \
,$(error Guile not supported - update your make))
One possible way is a quasi makefile in stdin.
So, .FEATURES
variable can be printed in the following way:
echo '$(info $(.FEATURES))' | make -f -
The following command outputs guile
string if it is supported or nothing in otherwise:
echo '$(info $(filter guile,$(.FEATURES)))' | make -f - 2>/dev/null
A variation using grep
:
echo '$(info $(.FEATURES))' | make -f - 2>/dev/null | grep -wo guile
As @bobbogo mentioned, we can avoid the pipe at all, using --eval
option:
make --eval '$(info $(filter guile,$(.FEATURES)))' 2>/dev/null
This command will print 'guile' or nothing.