On 29 March 2018 at 03:20, Ben Hutchings <b...@decadent.org.uk> wrote:
> On Wed, 2018-03-28 at 11:58 +0300, Riku Voipio wrote:
> [...]
>> One option:
>>
>> +++ b/scripts/package/mkdebian
>> cat <<EOF > debian/rules
>> -#!/usr/bin/make -f
>> #!$(which $MAKE)  -f
> [..]
>
> Shebang lines are interpreted by the kernel, not by a shell.  So you
> can't do anything clever like that.

Look more closely ;) Shell expands the variables into the herefile. So
if make is picked from a nonstandard location, the debian/rules
shebang becomes #!/home/masahiro/bin/make -f

As I said the price of this hack is that if use make from non-standard
location, the source package won't build anywhere else. Then again,
you probably shouldn't use non-standard tools when building source
packages for others to consume.

Riku

Reply via email to