Sample Header Ad - 728x90

shell saying "not found" for a command within a makefile

1 vote
1 answer
1521 views
When defining a **command** as a constant **within a Makefile**: MY_COMMANDLINE="prog arg1 arg2" and using this constant later to get the command invoked, you could get: /bin/sh: prog arg1 arg2: not found although prog definitely exists.
Explicitly giving the whole path of prog does not help. ---- There are other questions regarding shell saying "**not found**" (e.g. [this](https://unix.stackexchange.com/questions/18061/why-does-sh-say-not-found-when-its-definitely-there?newreg=efc98d3e21f54520baa1f9f6d158cf45) or [that](https://unix.stackexchange.com/questions/43481/file-not-found-for-file-which-is-there?noredirect=1&lq=1)) . By linking this question others may find this possible cause easier.
Asked by MattTT (121 rep)
Nov 29, 2022, 07:00 AM
Last activity: Nov 29, 2022, 07:06 AM