[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Explicit interpreter paths considered harmful
From: |
Ludovic Courtès |
Subject: |
Re: Explicit interpreter paths considered harmful |
Date: |
Fri, 30 Oct 2009 16:57:58 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
Hi Simon,
Simon Josefsson <address@hidden> writes:
> address@hidden (Ludovic Courtès) writes:
>
>> Here's a patch.
>>
>> Likewise, ‘pmccabe2html’ assumes /usr/bin/awk, but I’m not sure what to
>> do here:
>
> See the documentation in pmccabe2html -- the recommended way to use the
> script is already using $(AWK). So I don't think there is any problem,
> is there?
Well, there’s a shebang and the executable bit is set, so it looks like
it can be run as ./pmccabe2html.
>> - ‘gl_PMCCABE2HTML’ does ‘AC_PROG_AWK’, so we could substitute @AWK@
>> in there.
>
> That leads to having a pmccabe2html.in which is somewhat annoying.
Agreed.
>> - OTOH, ‘pmccabe2html’ is typically a maintainer script, so I’d rather
>> remove ‘AC_PROG_AWK’ and do something similar to the patch below.
>
> Will that work of invoked with 'awk -f pmccabe2html'?
Yes, of course.
The trick below appears to allow for both ./pmccabe2html and “awk -f
pmccabe2html” (with GNU Awk and Bash):
diff --git a/build-aux/pmccabe2html b/build-aux/pmccabe2html
index 27bb8f3..4fe4c64 100755
--- a/build-aux/pmccabe2html
+++ b/build-aux/pmccabe2html
@@ -1,4 +1,5 @@
-#!/usr/bin/awk -f
+#!/bin/sh
+exec awk -f "$0" "$@"
# pmccabe2html - pmccabe to html converter
# Copyright (C) 2007, 2008 Free Software Foundation, Inc.
Then I think ‘gl_PMCCABE2HTML’ could be removed altogether, which would
bring the module on par with the other maintainer-only scripts.
What do you think?
Thanks,
Ludo’.
- Explicit interpreter paths considered harmful, Ludovic Courtès, 2009/10/29
- Re: Explicit interpreter paths considered harmful, Paolo Bonzini, 2009/10/29
- Re: Explicit interpreter paths considered harmful, Ludovic Courtès, 2009/10/29
- Re: Explicit interpreter paths considered harmful, Paolo Bonzini, 2009/10/29
- Re: Explicit interpreter paths considered harmful, Jim Meyering, 2009/10/29
- Re: Explicit interpreter paths considered harmful, Ludovic Courtès, 2009/10/29
- Re: Explicit interpreter paths considered harmful, Jim Meyering, 2009/10/29
- Re: Explicit interpreter paths considered harmful, Ludovic Courtès, 2009/10/29
- Re: Explicit interpreter paths considered harmful, Simon Josefsson, 2009/10/30
- Re: Explicit interpreter paths considered harmful,
Ludovic Courtès <=
Re: Explicit interpreter paths considered harmful, Ludovic Courtès, 2009/10/29
Re: Explicit interpreter paths considered harmful, Karl Berry, 2009/10/29
- Re: Explicit interpreter paths considered harmful, Ludovic Courtès, 2009/10/29
- Re: Explicit interpreter paths considered harmful, Jim Meyering, 2009/10/30
- Re: Explicit interpreter paths considered harmful, Eric Blake, 2009/10/30
- Re: Explicit interpreter paths considered harmful, Jim Meyering, 2009/10/30
- Re: Explicit interpreter paths considered harmful, Eric Blake, 2009/10/30
- Re: Explicit interpreter paths considered harmful, Jim Meyering, 2009/10/30