thimc / lfimg

Image preview support for lf (list files) using Überzug
GNU General Public License v3.0
252 stars 45 forks source link

Fix Makefile issues #15

Closed XPhyro closed 3 years ago

XPhyro commented 3 years ago

The Makefile has issues:

This pull request fixes these issues.

thimc commented 3 years ago

Thanks for the pull request.

I haven't actually tried the request yet but I am wondering and am well aware of what a shell is but I do not know what the command is used for? Is this something that is only used in makefiles?

XPhyro commented 3 years ago

The previous syntax, "$(command)", was just substituting a variable called command. Since such a variable did not exist, it was just substituting nothing and the test was always returning a 0 (i.e. true). The "$(shell command)" syntax is special. It tells make to evaluate command, and substitute its output. This is indeed something that is special and is not valid shell (bash, sh, etc.) syntax. Notice that this is a GNU make extension.

thimc commented 3 years ago

Thanks for clearing things up. Merged.