On Fri, Sep 01, 2023 at 11:06:39AM +0200, Nicola Vetrini wrote:
> diff --git a/docs/misra/Makefile b/docs/misra/Makefile
> new file mode 100644
> index 000000000000..8ea0505c8a20
> --- /dev/null
> +++ b/docs/misra/Makefile
> @@ -0,0 +1,17 @@
> +TARGETS := C-runtime-failures.o
> +
> +all: $(TARGETS)
> +
> +# sed is used in place of cat to prevent occurrences of '*/'
> +# in the .rst from breaking the compilation
> +$(TARGETS:.o=.c): %.c: %.rst
> +     echo "/*\n" > [email protected]

This doesn't really works as you expect. Depending on the shell used or
the echo binary used, the "\n" would write a <new-line> or justs "\n".
Bash just write "\n" for example, while dash does write a <new-line>.
But, you can use `printf` instead:
    printf "/*\n\n" > [email protected]

> +     sed -e 's|\*/|*//*|g' $< >> [email protected]
> +     echo "\n*/" >> [email protected]

Same here.


Thanks,

-- 
Anthony PERARD

Reply via email to