News for hackers. Stuff that matters.
Re:A Tutorial on Portable Makefiles by frankzinger on Tuesday August 22, 2017 @02:11AM (#15070140)
There's a -MT flag which does what the sed line does. From the gcc man page:

  Change the target of the rule emitted by
  dependency generation... An -MT option will
  set the target to be exactly the string you
  specify...
So in your example one might do something like

  -MT "$@ $(basename $@).d"
which would output

  main.o main.d : main.c defs.h
for the main.o target.

There are no comments on this comment yet.