[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Makefiles guidance
From: |
Bob Friesenhahn |
Subject: |
Re: Makefiles guidance |
Date: |
Thu, 14 Jun 2018 14:41:10 -0500 (CDT) |
User-agent: |
Alpine 2.20 (GSO 67 2015-01-07) |
On Fri, 15 Jun 2018, Anmol Mishra wrote:
https://pastebin.com/gDiMCEpC
https://github.com/Shopify/pyoozie/blob/master/Makefile
What actually is my_cmd.python.2 and my_cmd.python.3 really do.
In these, What actually is happening in these lines?
1. python_version_full := $(wordlist 2,4,$(subst ., ,$(shell python
--version 2>&1)))
2. python_version_major := $(word 1,${python_version_full}
This is GNU make specific syntax (not portable) and so you should
consult the GNU make manual.
As a quick check you can add something this at the bottom of the
Makefile to see what these variables end up being defined to:
test_vars:
echo $(python_version_full)
echo $(python_version_major)
and then do
make test_vars
to see what gets printed.
Bob
--
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/