Skip to content

Commit d37bb86

Browse files
committed
Fix convert_to_utf8 failing on systems where python3 is not in /usr/bin
scripts/convert_to_utf8 had a hardcoded #!/usr/bin/python3 shebang which fails on FreeBSD and other systems where Python 3 lives in /usr/local/bin. - Change shebang to #!/usr/bin/env python3 for portability - Add PYTHON= @python@ to templates/Makefile.in and invoke the script via $(PYTHON) so the build uses the exact interpreter detected by configure, consistent with all other Makefiles in the tree
1 parent 0a19519 commit d37bb86

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

scripts/convert_to_utf8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python3
1+
#!/usr/bin/env python3
22

33
import os
44
import sys

templates/Makefile.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ CC= @CC@
3131
CHMOD= @CHMOD@
3232
INSTALL= @INSTALL@
3333
TRUE= @TRUE@
34+
PYTHON= @PYTHON@
3435

3536
DEFS= @DEFS@
3637

@@ -61,7 +62,7 @@ all: converttemplates
6162

6263
# Use a stamp file to track conversion, so it only happens once
6364
.converted.stamp:
64-
../scripts/convert_to_utf8 -d .
65+
$(PYTHON) ../scripts/convert_to_utf8 -d .
6566
touch .converted.stamp
6667

6768
converttemplates: .converted.stamp

0 commit comments

Comments
 (0)