Skip to contentSkip to conversation

Makefile: drop explicit undefine PYLIB for compatibility with make 3.81

PATCH New Peter Korsgaard 1 participant 1 message May 12, 2021 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Makefile: drop explicit undefine PYLIB for compatibility with make 3.81

GNU make 3.81 does not like the explicit tab-indented undefine:

Makefile:41: *** commands commence before first target. Stop.

Dropping the indentation also doesn't work:

Makefile:41: *** missing separator. Stop.

So simply drop the undefine logic. As explained in the GNU make manual, undefine is not commonly needed as E.G. ifdef checks for a non-zero string:

https://www.gnu.org/software/make/manual/html_node/Undefine-Directive.html
https://www.gnu.org/software/make/manual/html_node/Conditional-Syntax.html

Fixes:
http://autobuild.buildroot.net/results/cf7c4f360f5464c700788cc8299fd086544c80e8/build-end.log

---
 Makefile | 5 -----
 1 file changed, 5 deletions(-)
Makefile +0 -5
index b17ac09..ec85ac8 100644
@@ -36,11 +36,6 @@ LDFLAGS ?=
 
 PYLIB  ?= $(shell python3 -c 'import distutils.sysconfig;  print (distutils.sysconfig.get_python_lib())')
 
-# Check for errors, such as python3 not available
-ifeq (${PYLIB},)
-	undefine PYLIB
-endif
-
 MANPAGES = src/cyclictest/cyclictest.8 \
 	   src/pi_tests/pi_stress.8 \
 	   src/ptsematest/ptsematest.8 \
Signature · 1 line
2.20.1