edit-gpif: Fix build for distros with python3 as default

Fix the script so it is python2 and python3 compatible, then let the
distro decide which python version to use.

Change-Id: If805c8167e2cf57ce3d6143dddfd4685ad729142
This commit is contained in:
Pau Espin 2019-02-06 18:14:58 +01:00
parent d20c118fd2
commit 4edd1ab6fb
4 changed files with 4 additions and 6 deletions

View File

@ -39,7 +39,7 @@ EXTRA_DIST = \
all: usrp_gpif.c
usrp_gpif.c usrp_gpif_inline.h : gpif.c
srcdir=$(srcdir) $(PYTHON) $(srcdir)/edit-gpif $(srcdir)/gpif.c usrp_gpif.c usrp_gpif_inline.h
srcdir=$(srcdir) $(srcdir)/edit-gpif $(srcdir)/gpif.c usrp_gpif.c usrp_gpif_inline.h
CLEANFILES = \
*.ihx *.lnk *.lst *.map *.mem *.rel *.rst *.sym *.asm *.lib \

View File

@ -27,7 +27,6 @@
# uses.
import re
import string
import sys
def check_flow_state (line, flow_state_dict):
@ -93,7 +92,7 @@ def edit_gpif (input_name, output_name, inline_name):
while 1:
line = input.readline ()
line = string.replace (line, '\r','')
line = line.replace ('\r','')
line = re.sub (r' *$', r'', line)
check_flow_state (line, flow_state_dict)

View File

@ -159,7 +159,7 @@ DISTCLEANFILES = \
all: usrp_gpif.c
usrp_gpif.c usrp_gpif_inline.h : gpif.c
srcdir=$(srcdir) $(PYTHON) $(srcdir)/edit-gpif $(srcdir)/gpif.c usrp_gpif.c usrp_gpif_inline.h
srcdir=$(srcdir) $(srcdir)/edit-gpif $(srcdir)/gpif.c usrp_gpif.c usrp_gpif_inline.h
# dependencies

View File

@ -27,7 +27,6 @@
# uses.
import re
import string
import sys
def check_flow_state (line, flow_state_dict):
@ -93,7 +92,7 @@ def edit_gpif (input_name, output_name, inline_name):
while 1:
line = input.readline ()
line = string.replace (line, '\r','')
line = line.replace ('\r','')
line = re.sub (r' *$', r'', line)
check_flow_state (line, flow_state_dict)