Fix make compatibility issues

This commit is contained in:
Andrea Cardaci 2018-06-04 20:00:09 +02:00
parent 7e5bcab249
commit 2696bc3cde

View File

@ -1,18 +1,8 @@
--- ---
description: | description: |
All these examples only work with GNU `make` due to the lack of support of the All these examples only work with GNU `make` due to the lack of support of the
`--eval` flag. The same can be achieved by using a proper `Makefile` of by `--eval` flag. The same can be achieved by using a proper `Makefile` or by
passing the content via stdin, that is: passing the content via stdin using `-f -`.
```
make -s --eval=<commands>
```
becomes:
```
make -s -f <(echo <commands>)
```
functions: functions:
execute-interactive: execute-interactive:
- code: | - code: |
@ -27,7 +17,8 @@ functions:
COMMAND='/bin/sh -p' COMMAND='/bin/sh -p'
./make -s --eval=$'x:\n\t-'"$COMMAND" ./make -s --eval=$'x:\n\t-'"$COMMAND"
file-write: file-write:
- code: | - description: Requires a newer GNU `make` version.
code: |
LFILE=file_to_write LFILE=file_to_write
make -s --eval="\$(file >$LFILE,data)" . make -s --eval="\$(file >$LFILE,data)" .
--- ---