[PATCH] Implement a workaround for GNU mak jobserver

H.J. Lu hjl.tools@gmail.com
Tue Oct 27 15:25:01 GMT 2020


On Tue, Oct 27, 2020 at 8:14 AM Andreas Schwab <schwab@linux-m68k.org> wrote:
>
> On Okt 27 2020, H.J. Lu via Binutils wrote:
>
> > +touch --reference=Makefile Makefile.tmp \
>
> This is not portable.
>

Since it must keep the same timestamps on config.status and Makefile, I used

if touch --reference=config.status config.status.tmp > /dev/null 2>&1; then
  sed '/as_fn_exit 0/i \
sed -e \"s/^\t\\\(\\\$(AM_V_CCLD)\\\)/\t+ \\\1/\" Makefile > Makefile.tmp \
touch --reference=Makefile Makefile.tmp \

If touch doesn't support --reference, the workaround isn't applied.

-- 
H.J.


More information about the Binutils mailing list