mirror of https://gerrit.osmocom.org/libusrp
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:
parent
d20c118fd2
commit
4edd1ab6fb
|
@ -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 \
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue