[syslinux:elflink] mk: Add Makefile variable for python

syslinux-bot for Matt Fleming matt.fleming at intel.com
Tue Nov 13 11:06:10 PST 2012


Commit-ID:  4dec62ce9c2c0d170f21b3ae2d7c618eb7a30c05
Gitweb:     http://www.syslinux.org/commit/4dec62ce9c2c0d170f21b3ae2d7c618eb7a30c05
Author:     Matt Fleming <matt.fleming at intel.com>
AuthorDate: Mon, 12 Nov 2012 15:38:33 +0000
Committer:  Matt Fleming <matt.fleming at intel.com>
CommitDate: Mon, 12 Nov 2012 15:38:33 +0000

mk: Add Makefile variable for python

Instead of hard-coding the python executable name use a make variable
like we do for all other executables used during the build. This has
the added bonus of allowing $(PYTHON) to be overridden on the command
line, e.g.

   make PYTHON=python2

which is particularly useful for distributions where /usr/bin/python
is actually python3.

Signed-off-by: Matt Fleming <matt.fleming at intel.com>

---
 com32/cmenu/Makefile |    2 +-
 mk/syslinux.mk       |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/com32/cmenu/Makefile b/com32/cmenu/Makefile
index beb8dd2..181937b 100644
--- a/com32/cmenu/Makefile
+++ b/com32/cmenu/Makefile
@@ -40,7 +40,7 @@ MENUS = $(LIBS) $(CMENUS) $(IMENUS)
 
 .PRECIOUS: %.c
 %.c: %.menu adv_menu.tpl
-	python menugen.py --input=$< --output=$@ --template=adv_menu.tpl
+	$(PYTHON) menugen.py --input=$< --output=$@ --template=adv_menu.tpl
 
 all:	menus
 
diff --git a/mk/syslinux.mk b/mk/syslinux.mk
index 4cf34e3..1378b6d 100644
--- a/mk/syslinux.mk
+++ b/mk/syslinux.mk
@@ -36,6 +36,7 @@ NASM	 = nasm
 NASMOPT  = -Ox
 
 PERL	 = perl
+PYTHON	 = python
 UPX	 = upx
 
 CHMOD	 = chmod


More information about the Syslinux-commits mailing list