I'm having a problem using these two together. There's a program which
spits out a series of variable assignments so I need $(shell) to
invoke it, but the shell function strips newlines which garbles the
result. Example below. Ideas?

% cat Makefile
$(eval $(shell ./vars.sh))

.PHONY: all
all:
        @echo VAR1=$(VAR1)
        @echo VAR2=$(VAR2)

% cat ./vars.sh
#!/bin/sh
echo "VAR1=val1"
echo "VAR2=val2"

% make
VAR1=val1 VAR2=val2
VAR2=

_______________________________________________
Help-make mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-make

Reply via email to