Ludovic Courtès wrote: ... > because perl eventually execs /bin/sh: > > 4473 execve("./build-aux/gitlog-to-changelog", > ["./build-aux/gitlog-to-changelog"], [/* 60 vars */]) = 0 > 4473 execve("/var/run/current-system/sw/bin/perl", ["perl", "-S", > "./build-aux/gitlog-to-changelog"], [/* 59 vars */]) = 0 > 4473 execve("/bin/sh", ["/bin/sh", "-S", "./build-aux/gitlog-to-changelog"], > [/* 59 vars */]) = 0 > > Actually perlrun(1) reads this: > > #!/bin/sh -- # -*- perl -*- -p > eval 'exec perl -wS $0 ${1+"$@"}' > if $running_under_some_shell; > > ... which can’t possibly work. > > So I guess I’ll stick to what I suggested.
As Simon pointed out, if you start the script with #!/bin/sh, it breaks any existing user who happens to invoke it via the suggested $(PERL) gitlog-to-changelog Earlier, you mentioned running announce-gen manually. I would recommend not to do that. There is already an "announcement" target in maint.mk, but even that requires a manual RELEASE_TYPE setting. I invoke it only via "make beta" or "make stable". If the existing "alpha beta stable" rule in maint.mk doesn't work for you, please suggest an improvement -- or you can always adapt it for your own use.