> Please replace
>
> $(shell $(COPY) \
> $(subst /,$(SEP),submodules/dlg/include/dlg/dlg.h src/dlg/dlg))
> $(shell $(COPY) \
> $(subst /,$(SEP),submodules/dlg/include/dlg/output.h src/dlg/dlg))
> $(shell $(COPY) \
> $(subst /,$(SEP),submodules/dlg/src/dlg/dlg.c src/dlg))
>
> with
>
> $(shell $(COPY) $(subst /,$(SEP),submodules/dlg/include/dlg/dlg.h src/dlg/dlg))
> $(shell $(COPY) $(subst /,$(SEP),submodules/dlg/include/dlg/output.h src/dlg/dlg))
> $(shell $(COPY) $(subst /,$(SEP),submodules/dlg/src/dlg/dlg.c src/dlg))
>
> Does this work?
No, that does not work. The issue is probably with the 'shell' command. It paste the output
of the 'copy' command on the same line as the 'shell' command ( or it replaces the line with
the $(shell) to the output of 'copy' command ), which is something like:
1 file(s) copied.
Assigning the output of the 'shell' command to the temporary variable fixes the error.
_temp := $(shell $(COPY) \
$(subst /,$(SEP),submodules/dlg/include/dlg/dlg.h src/dlg/dlg))
_temp := $(shell $(COPY) \
$(subst /,$(SEP),submodules/dlg/include/dlg/output.h src/dlg/dlg))
_temp := $(shell $(COPY) \
$(subst /,$(SEP),submodules/dlg/src/dlg/dlg.c src/dlg))