Messages in this thread | | | From | David Laight <> | Subject | RE: [PATCH v4 3/4] perf jevents: Switch build to use jevents.py | Date | Wed, 15 Jun 2022 10:44:50 +0000 |
| |
From: Ian Rogers > Sent: 15 June 2022 04:05 > > Generate pmu-events.c using jevents.py rather than the binary built from > jevents.c. Add a new config variable NO_JEVENTS that is set when there > is no architecture json or an appropriate python interpreter isn't present. > When NO_JEVENTS is defined the file pmu-events/empty-pmu-events.c is copied > and used as the pmu-events.c file. > ... > + # jevents.py uses f-strings present in Python 3.6 released in Dec. 2016. > + JEVENTS_PYTHON_GOOD := $(shell $(PYTHON) -c 'import sys;print("1" if(sys.version_info.major >= 3 > and sys.version_info.minor >= 6) else "0")')
You probably want a "2>/dev/null" in there.
I also think I remember seeing a `which python` in one of these patches. 'which' is a bourne shell script that is trying to emulate a csh builtin. It can't actually work, and ISTR one of the distros might be trying to remove it. In a traditional bourne shell you should use `type python`, the posix equivalent (which any shell written in the last 30 years out to get right) is `command -V python`. Both type and command have to be shell builtins. Although I suspect some shells get command -V wrong.
David
- Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)
| |